fix map panning to objects when url hash is not empty but has no map location, fixes #865
This commit is contained in:
parent
8ecbe9b07d
commit
b14965e4b2
3 changed files with 17 additions and 17 deletions
|
@ -12,9 +12,10 @@ OSM.Changeset = function (map) {
|
|||
const changesetData = content.find("[data-changeset]").data("changeset");
|
||||
changesetData.type = "changeset";
|
||||
|
||||
var hashParams = OSM.parseHash(window.location.hash);
|
||||
initialize();
|
||||
map.addObject(changesetData, function (bounds) {
|
||||
if (!window.location.hash && bounds.isValid()) {
|
||||
if (!hashParams.center && bounds.isValid()) {
|
||||
OSM.router.withoutMoveListener(function () {
|
||||
map.fitBounds(bounds);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue