X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/db66e4884772629ba51db905f55c0e48f4cebb94..945ff7911ca51dc250ffaba71f62821b5c0c0a95:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 17476bb51..fdbeaba22 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -54,7 +54,7 @@ $(document).ready(function () { if (xhr.getResponseHeader('X-Page-Title')) { var title = xhr.getResponseHeader('X-Page-Title'); - document.title = decodeURIComponent(escape(title)); + document.title = decodeURIComponent(title); } $('head') @@ -192,10 +192,8 @@ $(document).ready(function () { map.setView([params.lat, params.lon], params.zoom); } - var marker = L.marker([0, 0], {icon: OSM.getUserIcon()}); - if (params.marker) { - marker.setLatLng([params.mlat, params.mlon]).addTo(map); + L.marker([params.mlat, params.mlon]).addTo(map); } $("#homeanchor").on("click", function(e) { @@ -205,7 +203,7 @@ $(document).ready(function () { center = L.latLng(data.lat, data.lon); map.setView(center, data.zoom); - marker.setLatLng(center).addTo(map); + L.marker(center, {icon: OSM.getUserIcon()}).addTo(map); }); function remoteEditHandler(bbox, object) {