feat: add movable marker on map
This commit is contained in:
parent
b472e99fcc
commit
256c2eb6bb
1 changed files with 3 additions and 0 deletions
|
@ -37,6 +37,9 @@
|
|||
L.geoJSON(feature, options).addTo(map);
|
||||
});
|
||||
}
|
||||
|
||||
const marker = L.marker([centerLat, centerLon]);
|
||||
map.on("click", (e) => marker.setLatLng(e.latlng).addTo(map));
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue