1. 程式人生 > >獲取layer.open彈出層的返回值

獲取layer.open彈出層的返回值

複製程式碼
    <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>
複製程式碼