Embed a Baidu map with markers and routing into a web app
Quando usar: Google Maps isn't viable for your audience; Baidu Maps is the standard.
Fluxo
-
Scaffold with bmap-jsapi-glUse bmap-jsapi-gl skill — init a BMapGL map in <div id='map'>, center on Beijing, add markers for 5 lat/lng pairs.✓ Copiado→ Claude uses correct BMapGL constructors, not the old BMap JSAPI
-
Add routingNow add driving directions between the first two markers.✓ Copiado→ DrivingRoute usage with correct event wiring
Resultado: A working map component in your app.
Armadilhas
- Mixing legacy BMap JSAPI with BMapGL (WebGL) APIs — Skill keeps them distinct; pick one family and stick with it