Breaking changes
Zoom handling
The way how we handle zoom
, minzoom
and maxzoom
throughout the library has been reworked:
- When ol-mapbox-style creates an
ol/View
instance, it will be configured with the zoom level range that mapbox-gl uses. When updating from previous versions, you will notice that the zoom levels of the OpenLayers view will now match those in the Mapbox Style object. Previously OpenLayers zoom levels were higher by 1. - When a Mapbox Style object is configured with a
zoom
, the zoom level will now be interpreted like in mapbox-gl, i.e. you will be zoomed in one level deeper than before the update. minzoom
andmaxzoom
on a Mapbox Style layer were previously determined by the tile size of the underlying source. For raster sources with a tile size of 256, this means thatminzoom
andmaxzoom
are zoomed in one level deeper than before the update. For sources with a tile size of 512, nothing changes.minzoom
andmaxzoom
on a Mapbox Style source now influence theol/tilegrid/TileGrid
that ol-mapbox-style creates for a source in a different way. The resolutions will always match mapbox-gl default zoom levels.minzoom
andmaxzoom
on Mapbox Style layers no longer influences whether theol/layer/Layer
instance is setvisible
at a certain resolution. Instead, the layer'smaxResolution
andminResolution
are set.
Other changes
- Add support for
text-letter-spacing