-
Hi guys If I try to open that in the web browser it doesn't work but if I replace few values (https://api.mapy.cz/v1/maptiles/outdoor/256/1/1/1?apikey=my_api_key) than it works normally. From my understanding Maplibre automaticlly is URL-encoding values into format from the first link but I don't know why. I tried using openstreetmap and it ended with same issues. This is part of the code that I think is responsible for the issue ` private fun initializeMapLayer(selectedLayer: String) {
private fun removeExistingLayerAndSource(style: Style) {
Log cat: From my understanding it should put values into z/x/y so that it could render tiles but it url-encodes them first. PS: my_api_key I put in the logcat logs where my real Api key is so that it stayes private. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I would recommend using a vector-tile source with MapLibre Native. But if you are set on using mapy.cz, you can also use their TileJSON endpoint. Try setting this as style: {
"version": 8,
"name": "Empty Style",
"metadata": {"maputnik:renderer": "mlgljs"},
"sources": {
"mapy": {
"type": "raster",
"url": "https://api.mapy.cz/v1/maptiles/outdoor/tiles.json?apikey=your_api_key"
}
},
"sprite": "",
"glyphs": "https://orangemug.github.io/font-glyphs/glyphs/{fontstack}/{range}.pbf",
"layers": [{"id": "", "type": "raster", "source": "mapy"}],
"id": "srots50"
} |
Beta Was this translation helpful? Give feedback.
I would recommend using a vector-tile source with MapLibre Native.
But if you are set on using mapy.cz, you can also use their TileJSON endpoint. Try setting this as style: