X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3d7eb387a7c3573f1a1d17df00adcaa1fb9b9fa5..549372323700eff5855baffecdfd095d2f8a4555:/app/assets/javascripts/changeset.js diff --git a/app/assets/javascripts/changeset.js b/app/assets/javascripts/changeset.js index 9e393ad5a..0aecced85 100644 --- a/app/assets/javascripts/changeset.js +++ b/app/assets/javascripts/changeset.js @@ -1,6 +1,6 @@ -$(document).ready(function () { +function initializeChangesets(map) { var changesets = [], rects = {}; - var map = createMap("changeset_list_map"); + var group = L.featureGroup().addTo(map); $("[data-changeset]").each(function () { @@ -52,12 +52,4 @@ $(document).ready(function () { unHighlightChangeset($(this).data("changeset").id); } }); - - var params = OSM.mapParams(); - if (params.bbox) { - map.fitBounds([[params.minlat, params.minlon], - [params.maxlat, params.maxlon]]); - } else { - map.fitBounds(group.getBounds()); - } -}); +}