Quadkey Placeholder not working

sfoxona month ago

I recently upgraded to the latest version of Traccar, and wondered if there was something I was doing wrong as my custom map has stopped working,

I was using the {quadkey} placeholder in the custom map URL, which was working fine until the Jan 2025 update.
However, since the update, the requests going to the tile server read %7Bquadkey%7D? instead of being replaced with the Quad.
Is this fix to roll back versions?

Anton Tananaeva month ago

Do you have a URL to try?

sfoxona month ago

Found the issue...

The validation for the custom map is looking for the Z co-ordinate in order to resolve the placeholders.

{quadkey} won't resolve unless the URL also includes {z} - a temporary fix was to put &foo={z}& into the URL which satisfies the validation and is ingored by the tileserver.

image.jpg

Anton Tananaeva month ago

Yes, but need a URL for testing it.

sfoxona month ago

As an example:
This custom map will NOT work:
https://t.ssl.ak.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=15047&n=z&prx=1
as the placeholder will not be replaced with the required Quadkey due to useMapStyles.js line 279

This custom map WILL work:
https://t.ssl.ak.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=15047&n=z&prx=1&random={z}
as the Z value will fool the validation in useMapStyles.js line 279

You can see the results during my testing:

Untitled.png

Anton Tananaeva month ago