npm / ol-mapbox-style
ol-mapbox-style
What changed in ol-mapbox-style 7 to 13, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-28.
17 breaking20 new APIs and options4 performance9 behavior and defaults14 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initol-mapbox-style 1341 changes
Breaking changes 4
A failed extent stays marked as loaded and is not retried automatically on every render; retry with source.refresh(), or source.removeLoadedExtent(extent) followed by source.changed().
Style objects without an id no longer receive a generated id that was used only as an internal cache key.
Maps loading the same style URL at the same time receive separate style objects, so changes to one map do not affect the other.
MVT features now store their tile source-layer in mvt:layer instead of layer, which may require changes to feature-info code or style-function customizations.
New APIs and options 14
Use PatternDescriptor instead of patterns as color for fill-pattern, enabling rendering techniques beyond Canvas 2D.
Adds support for the raster-resampling raster layer property.
New hillshading options are supported, allowing developers to configure hillshading.
The line-offset paint property is supported.
Zoom exaggeration is added for DEM.
Supports retrieving defaults from the style's schema root properties.
Adds support for the hsl expression from the latest Mapbox style spec.
Adds support for the hsla expression from the latest Mapbox style spec.
Adds support for the to-hsla expression from the latest Mapbox style spec.
Supports data-driven visibility from the latest Mapbox style spec.
Adds support for the raster-hue-rotate operation.
Adds support for the raster-opacity operation.
Adds support for the raster-saturation operation.
ol-mapbox-style now has basic support for running in web workers.
Performance 3
Layers and styles are released once no longer used, preventing them and their map from staying in memory after map.dispose().
Optimized style spec data reduces build size.
Font-weight ranges prevent redundant font loading requests.
Behavior and default changes 6
applyStyle() now allows layers other than Vector or VectorTile.
Updated support for the latest style specification.
Text color and halo are isolated from each other.
Outlines for fill-extrusion layers darken depending on fill-extrusion-height.
Hillshade appearance is adjusted to better match MapLibre.
Supports data-driven text-font array entries from the latest Mapbox style spec.
Fixes and other changes 14
Cached style values are no longer shared between style objects with the same id, preventing cross-map rendering and visibility changes.
Relative ol:webfonts URLs in style metadata are resolved against the style URL.
Retains support for fill-translate in styles.
Retains support for fill-translate-anchor in styles.
Avoids losing patterns after SDFing them.
Cached icons now consider declutterMode, affecting how they are decluttered.
Fixed icon-rotate behavior for icons along lines.
The function/filter cache is invalidated when a layer is removed or added with addMapboxLayer, preventing stale cached values after layer changes.
The library no longer fails when used with OpenLayers versions that do not have Stroke#setOffset().
Raster contrast and alpha handling are fixed.
Improves robustness against failures caused by unsupported features.
Fixes background layer source reuse that could break vector layers.
Fixes hillshade colors.
Font detection and loading were improved to ensure that the correct fonts are downloaded.
ol-mapbox-style 125 changes
Breaking changes 3
For generated Vector sources, getUrl() returns the URL without the transformRequest transform, and returns undefined when the URL is templated with {bbox-...}.
Generated OpenLayers Tile and VectorTile sources now use a tileLoadFunction configured by ol-mapbox-style instead of template URLs from getUrl() or getUrls().
The hook is called for every individual Tiles request with the final URL, rather than once with the URL template.
Behavior and default changes 2
Generated OpenLayers Vector sources are now always configured with a loader by ol-mapbox-style.
The hook can return a URL string; returned Request objects are fully respected, not just for their URL.
ol-mapbox-style 112 changes
Breaking changes 2
A new MapboxVectorLayer export replaces ol/layer/MapboxVector from OpenLayers.
The package now contains untranspiled modern JavaScript; configure build tools to transpile it when targeting older browsers.
ol-mapbox-style 101 changes
Breaking changes 1
BBOX template replacements now include only the bounding box, not the projection’s SRS identifier. WFS source URLs and other URLs that need the SRS identifier must add it explicitly.
ol-mapbox-style 93 changes
Breaking changes 2
The x-value now moves right as the offset increases; remove any workaround for the previous direction.
ol-mapbox-style now requires OpenLayers 7.
New APIs and options 1
Support was added for
text-justify.
ol-mapbox-style 810 changes
Breaking changes 4
apply() is now an alias of the default export and returns a Promise<Map> instead of a Map.
Types are stricter because they reference OpenLayers types correctly instead of using any.
The umd bundle is now dist/olms.js; dist/index.js is the ejs bundle, and no other JavaScript files are provided in dist/.
Imports from the dist/ folder are no longer supported; import from the package instead.
New APIs and options 4
The options can include accessToken, making it easier to use maps and styles from Mapbox alongside support for mapbox:// URLs.
Support for mapbox:// URLs makes it easier to use maps and styles from Mapbox in combination with accessToken.
A set of resolutions can now be configured in options, making it easier to work with layers or maps in projections other than Web Mercator.
The options argument for apply(), applyStyle() and applyBackground() can include transformRequest to modify URLs and requests for styles, sprites, tiles and data.
Performance 1
The build is at least 80 kB smaller; removing accidental OpenLayers code from the umd bundle accounts for almost 400 kB of the reduction.
Behavior and default changes 1
applyStyle() can now create and populate the source of the provided layer.
ol-mapbox-style 72 changes
Breaking changes 1
ol-mapbox-style now requires ol >= 6.13.
New APIs and options 1
Adds support for rich text labels with OpenLayers v6.13+.