nitaliano / react-native-mapbox-gl

A Mapbox GL react native module for creating custom maps
Other
2.16k stars 697 forks source link

Set RasterLayer min/max zoomLevel and keep rendering tiles with clamped zoomLevel to [min,max] range #1476

Open rcstanciu opened 5 years ago

rcstanciu commented 5 years ago

There should be a way of setting the minimum/maximum zoom level for raster tiles, but keep rendering them and clamping the zoomLevel to set [minimum,maximum] range.

Is very useful when rendering thumbnail maps.

Is there any workaround at the moment for doing this?

Thank you!

rcstanciu commented 5 years ago

As I understood, minZoomLevel and maxZoomLevel set on a RasterSource define the range of zooms at which tiles are available on the server. Going above/below this range of zooms, should mean that tiles will be over-zoomed or under-zoomed but visible at all times.

What happens now is that setting the minZoomLevel and maxZoomLevel on the RasterSource does the same thing as not setting them at all: tiles disappear when going below/above available zoom levels.

rcstanciu commented 5 years ago

Bump

rcstanciu commented 5 years ago

Bump