index.html aktualisiert
This commit is contained in:
parent
27e4f1bb15
commit
9a6e4392dc
|
|
@ -107,18 +107,19 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// === check URL hash ===
|
// === check URL hash ===
|
||||||
// Format: #X,Y,Z (z.B. #22884,8249,5)
|
// Format: #X,Y,Z (z.B. #22884,8249,5)
|
||||||
const hash = window.location.hash.slice(1).split(',');
|
const hash = window.location.hash.slice(1).split(',');
|
||||||
if (hash.length >= 2) {
|
if (hash.length >= 2) {
|
||||||
const x = parseFloat(hash[0]);
|
const x = parseFloat(hash[0]);
|
||||||
const y = parseFloat(hash[1]);
|
const y = parseFloat(hash[1]);
|
||||||
const z = hash.length >= 3 ? parseInt(hash[2]) : 5;
|
const z = hash.length >= 3 ? parseInt(hash[2]) : 5;
|
||||||
}
|
if (!isNaN(x) && !isNaN(y)) {
|
||||||
if (!isNaN(x) && !isNaN(y)) {
|
|
||||||
map.setView([y, x], isNaN(z) ? 5 : z);
|
map.setView([y, x], isNaN(z) ? 5 : z);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
new CenteredTiles({
|
new CenteredTiles({
|
||||||
tileSize: TILE,
|
tileSize: TILE,
|
||||||
noWrap: true,
|
noWrap: true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user