<!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width"> <title>地图加载完成事件</title> <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/> <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=您申请的key值"></script> <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script> </head> <body> <div id="container"></div> <div id="tip"></div> <script type="text/javascript"> //初始化地图对象,加载地图 var map = new AMap.Map("container", { resizeEnable: true }); map.on('complete', function() { document.getElementById('tip').innerHTML = "地图图块加载完毕!当前地图中心点为:" + map.getCenter(); }); </script> </body> </html>