$(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.OSM.zoom()
+ .addTo(map);
+
var group = L.featureGroup().addTo(map);
$("[data-changeset]").each(function () {
function highlightChangeset(id) {
rects[id].setStyle({fillOpacity: 0.5});
- $("#tr-changeset-" + id).addClass("selected");
+ $("#changeset_" + id).addClass("selected");
}
function unHighlightChangeset(id) {
rects[id].setStyle({fillOpacity: 0});
- $("#tr-changeset-" + id).removeClass("selected");
+ $("#changeset_" + id).removeClass("selected");
}
group.on({
}
});
+ $(window).scroll(function() {
+ if ($(window).scrollTop() > $('.content-heading').outerHeight() + $('#top-bar').outerHeight() ) {
+ $('#changeset_list_map_wrapper').addClass('scrolled');
+ } else {
+ $('#changeset_list_map_wrapper').removeClass('scrolled');
+ }
+ });
+
var params = OSM.mapParams();
if (params.bbox) {
map.fitBounds([[params.minlat, params.minlon],