Recenter marker when shown
This commit is contained in:
parent
6dcd087abc
commit
669393a6cb
1 changed files with 1 additions and 0 deletions
|
@ -226,6 +226,7 @@ L.OSM.share = function (options) {
|
|||
|
||||
function toggleMarker() {
|
||||
if ($(this).is(':checked')) {
|
||||
marker.setLatLng(map.getCenter());
|
||||
map.addLayer(marker);
|
||||
} else {
|
||||
map.removeLayer(marker);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue