此代碼用于在百度地圖中標(biāo)注某個指定的坐標(biāo),并當(dāng)鼠標(biāo)指向時顯示批定內(nèi)容
JavaScript代碼
- <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
- <div style="width:520px;height:340px;border:1px solid gray" id="container"></div>
- <script type="text/javascript">
- var map = new BMap.Map("container");
-
-
-
- map.centerAndZoom(new BMap.Point(115.759973,33.863148), 15);
- map.addControl(new BMap.NavigationControl());
- var point = new BMap.Point(115.759973,33.863148);
- map.centerAndZoom(point, 15);
-
- var marker = new BMap.Marker(point);
- map.addOverlay(marker);
- marker.setAnimation(BMAP_ANIMATION_BOUNCE);
-
- </script>