0

web: add layer fallback to goToHash

With the changes to things being indexed by path instead of name,
old hashes would stop working. To make this a bit less jarring, we
can fall back to the default tileset of a world, which means the
map would still load.
This commit is contained in:
Nicolas F
2019-02-28 13:33:21 +01:00
parent b57db703ae
commit 311d3eacc2

View File

@@ -811,6 +811,11 @@ overviewer.util = {
}
var target_layer = overviewer.collections.mapTypes[world_name][tileset_name];
if (!target_layer) {
var default_tset_name = Object.keys(
overviewer.collections.mapTypes[world_name])[0];
target_layer = overviewer.collections.mapTypes[world_name][default_tset_name];
}
var ovconf = target_layer.tileSetConfig;
var latlngcoords = overviewer.util.fromWorldToLatLng(parseInt(coords[1]),