Stops and Routes vector tiles return 204 HTTP code starting from zoom level 15 #416
-
Hi community, In my application, I'm trying to integrate stops and routes vector tiles from Transit Land per https://www.transit.land/documentation/vector-tiles#mapbox-gl-example guide. I was able to connect them, however, I've noticed that I'm getting 204 HTTPS responses if I try to fetch stops/routes starting from the zoom level 15 and deeper. Is there any reason why Transit Land does now have those areas generated? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The Transitland v2 Vector Tiles for routes and for stops are both generated up to zoom level 14. As included in the example code at https://www.transit.land/documentation/vector-tiles, you can set a "max zoom" value of 14 to ensure that Mapbox GL JS (or Maplibre or Leaflet) does not try to load and display tiles past that zoom level. Some libraries can also do their own client-side interpolation at higher zoom levels. In Leaflet, set a |
Beta Was this translation helpful? Give feedback.
-
That piece of info was not specified in an obvious way but thanks for a quick reply. I've already adjusted my code so it shows stops and routes. |
Beta Was this translation helpful? Give feedback.
The Transitland v2 Vector Tiles for routes and for stops are both generated up to zoom level 14.
As included in the example code at https://www.transit.land/documentation/vector-tiles, you can set a "max zoom" value of 14 to ensure that Mapbox GL JS (or Maplibre or Leaflet) does not try to load and display tiles past that zoom level.
Some libraries can also do their own client-side interpolation at higher zoom levels. In Leaflet, set a
maxNativeZoom
value of 14 and then it will calculate how to display those tiles at higher zoom levels.