mobidata-bw / ipl-orchestration

MobiData-BW Integrationsplattform (IPL), an API platform that provides mobility data for Baden-Württemberg across many domains.
https://api.mobidata-bw.de
European Union Public License 1.2
0 stars 0 forks source link

Add TMS support for roadworks layer #198

Closed hbruch closed 1 month ago

hbruch commented 1 month ago

This PR adds TMS support for geoserver layer MobiData-BW:roadworks. To support TMS, the mirrored geoserver-vectortiles plugin is installed.

To add this e.g. to Leaflet, you could now add roadworks as

L.tileLayer('https://api.mobidata-bw.de/geoserver/gwc/service/tms/1.0.0/MobiData-BW:roadworks@EPSG:900913@png/{z}/{x}/{-y}.png', {
         maxZoom: 18
      }).addTo(map);

Note the -y, which is one way to declare that this is a TMS layer which has y tileRow ordered from South to North, in contrast to standard XYZ having them ordered from North to South. The y-value which will be requested by Leaflet effectively calculated as 2^zoom-1 - y. To learn more about differences of different standards, see e.g. this Tiled Web Map Wikipedia article.

hbruch commented 1 month ago

Direct download from sf was successful. I added a reminder note to update the plugin dependency and moved both vars in .env in subsequent lines.