獲取layer.open彈出層的返回值
阿新 • • 發佈:2019-02-02
<script type="text/javascript"> var map = new AMap.Map("container", { resizeEnable: true }); //在地圖中新增MouseTool外掛 var mouseTool = new AMap.MouseTool(map); AMap.event.addDomListener(document.getElementById('point'), 'click', function () { mouseTool.marker({ offset:new AMap.Pixel(-14, -11) }); }, false); AMap.event.addDomListener(document.getElementById('line'), 'click', function () { mouseTool.polyline(); }, false); AMap.event.addDomListener(document.getElementById('polygon'), 'click', function () { mouseTool.polygon(); },false); var callbackdata = function () { var data = { username: 'zhangfj' }; return data; } </script>