X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a36f3558dd43dd5a598e36dd21fd5f7d2b4a94f5..d414ffc61a0f6505f1d06e89e8668fa5b49d607e:/app/assets/javascripts/changeset.js?ds=sidebyside 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()); - } -}); +}