No hash on browse pages, closes #35

This commit is contained in:
Aaron Lidman 2013-11-14 17:41:12 -08:00
parent e9c6e57bcc
commit fec9dc84c0
8 changed files with 56 additions and 19 deletions

View file

@ -64,6 +64,7 @@ OSM.Export = function(map) {
$("#sidebar_content .close").on("click", page.minimizeSidebar);
update();
return map.getState();
};
page.unload = function() {

View file

@ -149,6 +149,8 @@ OSM.NewNote = function(map) {
e.preventDefault();
createNote(newNote, e.target.form, '/api/0.6/notes.json');
});
return map.getState();
};
page.unload = function () {

View file

@ -72,6 +72,9 @@ OSM.Note = function (map) {
if (!noteState) map.addLayer(noteLayer);
if (window.location.hash == "") {
var coords = data.coordinates.split(',');
OSM.route.moveListenerOff();
map.once('moveend', OSM.route.moveListenerOn);
map.getZoom() > 15 ? map.panTo(coords) : map.setView(coords, 16);
}

View file

@ -70,6 +70,8 @@ OSM.Search = function(map) {
}
});
});
return map.getState();
};
page.unload = function() {