X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/800f014486588b01eaaeca69be327b7e2c40ed43..a0c9cc7d0abee25f733bcf4ff9c8363bc5490427:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 4f0dfb148..90c57f976 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -34,7 +34,7 @@ $(document).ready(function () { } if (params.marker) { - marker = addMarkerToMap([params.mlat, params.mlon]); + marker = L.marker([params.mlat, params.mlon]).addTo(map); } if (params.object) { @@ -57,10 +57,10 @@ $(document).ready(function () { } if (marker) { - removeMarkerFromMap(marker); + map.removeLayer(marker); } - marker = addMarkerToMap(centre, getArrowIcon()); + marker = L.marker(centre).addTo(map); }); function updateLocation() {