Embed a Baidu map with markers and routing into a web app
Quand l'utiliser : Google Maps isn't viable for your audience; Baidu Maps is the standard.
Déroulement
-
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.✓ Copié→ Claude uses correct BMapGL constructors, not the old BMap JSAPI
-
Add routingNow add driving directions between the first two markers.✓ Copié→ DrivingRoute usage with correct event wiring
Résultat : A working map component in your app.
Pièges
- Mixing legacy BMap JSAPI with BMapGL (WebGL) APIs — Skill keeps them distinct; pick one family and stick with it