X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4563244fd1cb43dca00b427e1f13ac890b7f00a0..1a5f14d338b1e809947232e0dc0a59040f265395:/app/assets/javascripts/changeset.js?ds=sidebyside diff --git a/app/assets/javascripts/changeset.js b/app/assets/javascripts/changeset.js index 7f21ae744..d9c09bab4 100644 --- a/app/assets/javascripts/changeset.js +++ b/app/assets/javascripts/changeset.js @@ -6,13 +6,9 @@ $(document).ready(function () { zoomControl: false }).addLayer(new L.OSM.Mapnik()); - L.control.zoom({position: 'topright'}) + L.OSM.zoom() .addTo(map); - $("#changeset_list_map").on("resized", function () { - map.invalidateSize(); - }); - var group = L.featureGroup().addTo(map); $("[data-changeset]").each(function () { @@ -73,11 +69,5 @@ $(document).ready(function () { } }); - var params = OSM.mapParams(); - if (params.bbox) { - map.fitBounds([[params.minlat, params.minlon], - [params.maxlat, params.maxlon]]); - } else { - map.fitBounds(group.getBounds()); - } + map.fitBounds(OSM.mapParams().bounds || group.getBounds()); });