Skip to content

Commit 074bbc3

Browse files
committed
Allow only providing the map-id in the page-adress, fixes: #589
1 parent 48fa5b6 commit 074bbc3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

common/webapp/src/js/BlueMapApp.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,18 @@ export class BlueMapApp {
710710
let hash = window.location.hash?.substring(1) || this.settings.startLocation || "";
711711
let values = hash.split(":");
712712

713+
// only world is provided
714+
if (values.length === 1 && (!this.mapViewer.map || this.mapViewer.map.data.id !== values[0])) {
715+
try {
716+
await this.switchMap(values[0]);
717+
} catch (e) {
718+
return false;
719+
}
720+
721+
return true;
722+
}
723+
724+
// load full location
713725
if (values.length !== 10) return false;
714726

715727
let controls = this.mapViewer.controlsManager;

0 commit comments

Comments
 (0)