Update history feed URL with bbox parameter
https://lists.openstreetmap.org/pipermail/dev/2013-December/027599.html
This commit is contained in:
parent
944f3ebb67
commit
6053ed4124
1 changed files with 9 additions and 4 deletions
|
@ -46,7 +46,7 @@ OSM.History = function(map) {
|
|||
$("#changeset_" + id).find("a.changeset_id").simulate("click", e);
|
||||
}
|
||||
|
||||
function loadData() {
|
||||
function update() {
|
||||
var data = {list: '1'};
|
||||
|
||||
if (window.location.pathname === '/history') {
|
||||
|
@ -62,6 +62,11 @@ OSM.History = function(map) {
|
|||
updateMap();
|
||||
}
|
||||
});
|
||||
|
||||
var feedLink = $('link[type="application/atom+xml"]'),
|
||||
feedHref = feedLink.attr('href').split('?')[0];
|
||||
|
||||
feedLink.attr('href', feedHref + '?bbox=' + data.bbox);
|
||||
}
|
||||
|
||||
function loadMore(e) {
|
||||
|
@ -121,17 +126,17 @@ OSM.History = function(map) {
|
|||
map.addLayer(group);
|
||||
|
||||
if (window.location.pathname === '/history') {
|
||||
map.on("moveend", loadData)
|
||||
map.on("moveend", update)
|
||||
}
|
||||
|
||||
loadData();
|
||||
update();
|
||||
};
|
||||
|
||||
page.unload = function() {
|
||||
map.removeLayer(group);
|
||||
|
||||
if (window.location.pathname === '/history') {
|
||||
map.off("moveend", loadData)
|
||||
map.off("moveend", update)
|
||||
}
|
||||
|
||||
$("#history_tab").removeClass("current");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue