2024年09月07日 建站教程
<!DOCTYPE html> <html> <head> <title>在网页中绘制三维地图</title> <style type="text/css"> #map { width: 1000px; height: 800px; } </style> <script type="text/javascript" src="/statichttp://api.map.baidu.com/api?v=2.0&ak={your_api_key}"></script> </head> <body> <div id="map"></div> <script type="text/javascript"> var map = new BMap.Map("map"); var point = new BMap.Point(<?php echo $coordinates['lng']; ?>, <?php echo $coordinates['lat']; ?>); map.centerAndZoom(point, 15); var marker = new BMap.Marker(point); map.addOverlay(marker); marker.setAnimation(BMAP_ANIMATION_BOUNCE); </script> </body> </html>
本文链接:http://so.lmcjl.com/news/12450/