【Leaflet】鼠标提取坐标
map.on('mousemove', function (e) { document.getElementById('info').innerHTML = /* innerHTML 属性设置或返回表格行的开始和结束标签之间的 HTML */ // e.point is the x, y coordinates of the mousemove event relative // to the top-left corner of the map JSON.stringify(e.containerPoint) + '<br />' + // e.lngLat is the longitude, latitude geographical position of the event JSON.stringify(e.latlng); /* JSON.stringify() 方法可以将任意的 JavaScript 值序列化成 JSON 字符串 */ });
博客地址: http://www.cnblogs.com/defineconst/
博客版权: 本文以学习、研究和分享为主,欢迎转载和各类爬虫,但必须在文章页面明显位置给出原文链接。 如果文中有不妥或者错误的地方还望高手的您指出,以免误人子弟。如果您有更好的建议,不如留言一起讨论,共同进步! 再次感谢您耐心的读完本篇文章。
博客版权: 本文以学习、研究和分享为主,欢迎转载和各类爬虫,但必须在文章页面明显位置给出原文链接。 如果文中有不妥或者错误的地方还望高手的您指出,以免误人子弟。如果您有更好的建议,不如留言一起讨论,共同进步! 再次感谢您耐心的读完本篇文章。