X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1ae4483c6939a93f96eb6cdb02ac38c0f36479ae..8435b1bf60e0b4e2de092213ad6965793c6db190:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index ddad384ab..4f0dfb148 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -12,7 +12,7 @@ $(document).ready(function () { map.attributionControl.setPrefix(permalinks); - map.on("moveend layeradd layerremove", updateLocation); + map.on("moveend baselayerchange", updateLocation); if (!params.object_zoom) { if (params.bbox) { @@ -107,14 +107,7 @@ $(document).ready(function () { remoteEditHandler(); } - $(window).resize(function() { - var centre = map.getCenter(); - var zoom = map.getZoom(); - - handleResize(); - - map.setCenter(centre, zoom); - }); + $(window).resize(handleResize); $("#search_form").submit(function () { var bounds = map.getBounds();