Handle flipped y-coordinates

This commit is contained in:
Robin van der Linde 2023-09-02 23:23:46 +02:00
parent d06c515ec1
commit 86a797a75f
No known key found for this signature in database
GPG key ID: 53956B3252478F0D

View file

@ -172,7 +172,8 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
tileSize: layer["tile-size"] ?? 256,
minzoom: layer["min_zoom"] ?? 1,
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,
"{height}": "" + size,
"{zoom}": "{z}",
"{-y}": "{y}",
}
for (const key in toReplace) {