forked from MapComplete/MapComplete
Handle flipped y-coordinates
This commit is contained in:
parent
d06c515ec1
commit
86a797a75f
1 changed files with 3 additions and 1 deletions
|
@ -172,7 +172,8 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
||||||
tileSize: layer["tile-size"] ?? 256,
|
tileSize: layer["tile-size"] ?? 256,
|
||||||
minzoom: layer["min_zoom"] ?? 1,
|
minzoom: layer["min_zoom"] ?? 1,
|
||||||
maxzoom: layer["max_zoom"] ?? 25,
|
maxzoom: layer["max_zoom"] ?? 25,
|
||||||
// scheme: background["type"] === "tms" ? "tms" : "xyz",
|
// Bit of a hack, but seems to work
|
||||||
|
scheme: layer.url.includes("{-y}") ? "tms" : "xyz",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,6 +204,7 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
||||||
"{width}": "" + size,
|
"{width}": "" + size,
|
||||||
"{height}": "" + size,
|
"{height}": "" + size,
|
||||||
"{zoom}": "{z}",
|
"{zoom}": "{z}",
|
||||||
|
"{-y}": "{y}",
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const key in toReplace) {
|
for (const key in toReplace) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue