<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.11&key=9de88a718781910c9a1c81230827d1ce&plugin=AMap.ControlBar"></script> <title>5-4添加标记练习</title> <style> *{ padding: 0; margin: 0; } #container{ position: absolute; top: 0; left: 0; 100%; height: 100%; } </style> </head> <body> <div id="container"></div> <script> var map = new AMap.Map('container',{ zoom:10, center:[116.379391,39.861536], pitch:90, //倾斜度数 viewMode:'3D', //默认2D buildingAnimation:true //默认false,表示是否将建筑物动画显示 }); map.addControl(new AMap.ControlBar({ //添加控件 showZoomBar:true, //显示zoom条控件,false表示不显示 showControlButton:true, //默认false,false表示取消,旋转按钮将变成南北指南针 position:{ //控件的定位 right:'50px', top:'30px' } })) </script> </body> </html>