tumic0 / GPXSee

GPS log file viewer and analyzer with support for GPX, TCX, KML, FIT, IGC, NMEA, SLF, SML, LOC, GPI, GeoJSON and OziExplorer files.
https://www.gpxsee.org
GNU General Public License v3.0
938 stars 129 forks source link

Odd results with TraceStack tile server #533

Closed wavexx closed 6 months ago

wavexx commented 6 months ago

I'm trying to use TraceStack's Topo map (see https://console.tracestrack.com/explorer) which is one of the layers available on OSM, although it requires an API key.

I've created the following XML file:

<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.gpxsee.org/map/1">
        <name>TraceStack Topo</name>
        <url>https://tile.tracestrack.com/topo__/$z/$x/$y.png?key=ABC</url>
</map>

and while it loads the tiles, the result is a jumbled mess, with some of the tiles actually overlapping on top of each other (something which is visible both as a double-refresh while loading and by setting some transparency).

I tried to use thunderforest's cycle map, which uses a similar tile url and it works correctly, so I'm a bit at loss why this isn't working as expected.

tumic0 commented 6 months ago

The tiles seem to be HiDPI tiles (they are 512x512px), so you need to set them up properly as HiDPI tiles:

 <?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.gpxsee.org/map/1">
        <name>TraceStack Topo</name>
        <url>https://tile.tracestrack.com/topo__/$z/$x/$y.png?key=ABC</url>
        <tile pixelRatio="2"/>
</map>
wavexx commented 6 months ago

Could the tile size be detected automatically perhaps? I wasn't aware of this distinction of tile size, and I used this tile url in a few other programs without even knowing..

tumic0 commented 6 months ago

No, there is no automatic way (maybe except chatGPT...) to distinguish the tiles as regular 512x512px tiles and HiDPI tiles, so you have to define the map correctly anyway.

wavexx commented 6 months ago

Understood. Thanks again for the help!