Clean up some of the map JS, reduce scope of globals

This commit is contained in:
John Firebaugh 2013-06-10 13:36:28 -07:00
parent ff52509d5a
commit 4563244fd1
6 changed files with 131 additions and 126 deletions

View file

@ -1,6 +1,18 @@
$(document).ready(function () {
var changesets = [], rects = {};
var map = createMap("changeset_list_map");
var map = L.map("changeset_list_map", {
attributionControl: false,
zoomControl: false
}).addLayer(new L.OSM.Mapnik());
L.control.zoom({position: 'topright'})
.addTo(map);
$("#changeset_list_map").on("resized", function () {
map.invalidateSize();
});
var group = L.featureGroup().addTo(map);
$("[data-changeset]").each(function () {