X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4563244fd1cb43dca00b427e1f13ac890b7f00a0..dc931c4ac47b340c9a2a8d855fa57a290e838260:/app/assets/javascripts/changeset.js 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()); });