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 字符串 */ });