No hash on browse pages, closes #35
This commit is contained in:
parent
e9c6e57bcc
commit
fec9dc84c0
8 changed files with 56 additions and 19 deletions
|
@ -64,6 +64,7 @@ OSM.Export = function(map) {
|
|||
$("#sidebar_content .close").on("click", page.minimizeSidebar);
|
||||
|
||||
update();
|
||||
return map.getState();
|
||||
};
|
||||
|
||||
page.unload = function() {
|
||||
|
|
|
@ -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 () {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,8 @@ OSM.Search = function(map) {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
return map.getState();
|
||||
};
|
||||
|
||||
page.unload = function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue