顯示效果:javascript
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <title></title> <!--高德地圖密鑰--> <script src="https://webapi.amap.com/maps?v=1.4.15&key=a71dea33936786f48d7116552f951618"></script> <style type="text/css"> #ditu{ height:500px; border: 1px solid black; } </style> </head> <body> <div id="ditu"></div> </body> </html> <script type="text/javascript"> var map = new AMap.Map('ditu', { //顯示地區的經緯度 center:[113.015383, 25.83216], //放大值 zoom:10 }); </script>