Releases: openlayers/ol-mapbox-style
v12.1.0
Overview
- New 'updateMapboxSource()' utility function.
- Accept
Promise
as return type fortransformRequest()
- Do not overwrite existing search param with access token
What's Changed
- Changes for 12.0.0 by @ahocevar in #986
- New 'updateMapboxSource()' utility function by @ahocevar in #1009
- Accept Promise as return type for transformRequest by @ahocevar in #1012
- Do not overwrite existing search param with key accessTokenParam by @ahocevar in #1013
- Bump postcss from 8.4.24 to 8.4.31 by @dependabot in #997
- Bump @babel/traverse from 7.17.3 to 7.23.2 by @dependabot in #1002
- Bump @types/topojson-specification from 1.0.2 to 1.0.4 by @dependabot in #1003
- Bump eslint from 8.49.0 to 8.52.0 by @dependabot in #1004
- Bump @types/offscreencanvas from 2019.7.0 to 2019.7.2 by @dependabot in #1005
- Bump sinon from 15.2.0 to 17.0.0 by @dependabot in #1007
- Bump puppeteer from 21.1.0 to 21.4.1 by @dependabot in #1011
Full Changelog: v12.0.0...v12.1.0
v12.0.0
Backwards incompatible changes
- The
transformRequest
hook is now called for every singleTiles
request with the final url, instead of just once with the url template. - Generated OpenLayers Tile and VectorTile sources previously used the template urls obtained by
source.getUrl()
orsource.getUrls()
. Now they use atileLoadFunction
configured by ol-mapbox-style instead. - Generated OpenLayers Vector sources are now always configured with a
loader
by ol-mapbox-style. ThegetUrl()
method will return the url without thetransformRequest
transform. When the url is templated ({bbox-...}
),getUrl()
will returnundefined
.
Other changes
- The
transformRequest
hook now also accepts a url string as return value. When aRequest
is returned, it will be fully respected - not just the request'surl
.
What's Changed
- Make transformRequest more useful by @ahocevar in #985
- Changes for v11.0.3 by @ahocevar in #978
- Bump typedoc-plugin-missing-exports from 2.0.1 to 2.1.0 by @dependabot in #979
- Bump typedoc-plugin-markdown from 3.15.4 to 3.16.0 by @dependabot in #980
- Bump @rollup/plugin-node-resolve from 15.2.0 to 15.2.1 by @dependabot in #983
- Bump eslint from 8.47.0 to 8.49.0 by @dependabot in #984
- Bump typescript from 5.1.6 to 5.2.2 by @dependabot in #982
Full Changelog: v11.0.3...v12.0.0
v11.0.3
v11.0.2
v11.0.1
Summary
- Use ol >= 7.x || v8.0.0-dev to allow deduping
What's Changed
- Changes for v11.0.0 by @ahocevar in #967
- Use ol@dev by @ahocevar in #973
- Bump puppeteer from 21.0.3 to 21.1.0 by @dependabot in #969
- Bump webpack from 5.88.1 to 5.88.2 by @dependabot in #970
- Bump @rollup/plugin-node-resolve from 15.1.0 to 15.2.0 by @dependabot in #971
- Bump eslint from 8.46.0 to 8.47.0 by @dependabot in #972
Full Changelog: v11.0.0...v11.0.1
v11.0.0
Summary
Backwards incompatible changes
- The ol-mapbox-style package now contains untranspiled modern JavaScript code. When targeting older browsers, make sure to configure your build tools to transpile the code accordingly.
Other changes
- New
MapboxVectorLayer
export, which replacesol/layer/MapboxVector
from OpenLayers.
What's Changed
- Updates for v10.7.0 by @ahocevar in #958
- Move MapboxVectorLayer over from ol by @ahocevar in #960
- Export MapboxVectorLayer with index module by @ahocevar in #966
- Bump puppeteer from 21.0.1 to 21.0.3 by @dependabot in #961
- Bump ol from 7.4.0 to 7.5.0 by @dependabot in #964
- Bump typedoc-plugin-markdown from 3.15.3 to 3.15.4 by @dependabot in #965
- Bump typedoc-plugin-missing-exports from 2.0.0 to 2.0.1 by @dependabot in #962
- Bump @rollup/plugin-commonjs from 25.0.3 to 25.0.4 by @dependabot in #963
Full Changelog: v10.7.0...v11.0.0
v10.7.0
Summary
- Small fixes for add/update/removeMapboxLayer
- Support for SDF sprites
- Improved documentation for
applyStyle
What's Changed
- Changes for v10.6.0 by @ahocevar in #923
- Small fixes for add/update/removeMapboxLayer by @ahocevar in #925
- Bump style-loader from 3.3.2 to 3.3.3 by @dependabot in #926
- Bump typedoc-plugin-markdown from 3.15.2 to 3.15.3 by @dependabot in #930
- Bump typedoc from 0.24.7 to 0.24.8 by @dependabot in #927
- Bump @rollup/plugin-commonjs from 24.0.1 to 25.0.0 by @dependabot in #928
- Bump webpack-cli from 5.1.1 to 5.1.3 by @dependabot in #929
- Fix type of applyBackground args by @ahocevar in #931
- Bump ol from 7.3.0 to 7.4.0 by @dependabot in #933
- Bump css-loader from 6.7.3 to 6.8.1 by @dependabot in #934
- Bump webpack from 5.84.1 to 5.88.1 by @dependabot in #941
- Bump karma from 6.4.1 to 6.4.2 by @dependabot in #935
- Bump webpack-dev-server from 4.13.3 to 4.15.1 by @dependabot in #936
- Add support for SDF sprites by @petrsloup in #947
- Bump typescript from 5.1.3 to 5.1.6 by @dependabot in #942
- Bump html-webpack-plugin from 5.5.1 to 5.5.3 by @dependabot in #943
- Bump eslint from 8.41.0 to 8.44.0 by @dependabot in #944
- Bump @rollup/plugin-node-resolve from 15.0.2 to 15.1.0 by @dependabot in #945
- Bump webpack-cli from 5.1.3 to 5.1.4 by @dependabot in #946
- Clarify source update behavior by @ahocevar in #957
- Bump babel-loader from 9.1.2 to 9.1.3 by @dependabot in #949
- Bump @rollup/plugin-commonjs from 25.0.0 to 25.0.3 by @dependabot in #950
- Bump sinon from 15.1.0 to 15.2.0 by @dependabot in #952
- Bump word-wrap from 1.2.3 to 1.2.4 by @dependabot in #953
- Bump eslint from 8.44.0 to 8.46.0 by @dependabot in #955
- Bump puppeteer from 20.2.0 to 21.0.1 by @dependabot in #956
Full Changelog: v10.6.0...v10.7.0
v10.6.0
Summary
addMapboxLayer()
can now also add a layer as first layer in the layer stack.addMapboxLayer()
is no longer restricted go layers with the same source.
What's Changed
- Changes for v10.5.0 by @ahocevar in #891
- Bump @rollup/plugin-node-resolve from 15.0.1 to 15.0.2 by @dependabot in #892
- Bump html-webpack-plugin from 5.5.0 to 5.5.1 by @dependabot in #894
- Bump eslint from 8.36.0 to 8.38.0 by @dependabot in #895
- Bump webpack-dev-server from 4.13.2 to 4.13.3 by @dependabot in #896
- Bump typedoc from 0.23.28 to 0.24.4 by @dependabot in #893
- Fix metadata prefix in README by @ahocevar in #908
- Bump sinon from 15.0.3 to 15.0.4 by @dependabot in #898
- Bump engine.io and socket.io by @dependabot in #903
- Bump eslint from 8.38.0 to 8.40.0 by @dependabot in #905
- Bump typedoc from 0.24.4 to 0.24.7 by @dependabot in #907
- Bump webpack-cli from 5.0.1 to 5.1.1 by @dependabot in #909
- Bump puppeteer from 19.8.3 to 20.2.0 by @dependabot in #910
- Match added layer to source of any adjacent layer by @ahocevar in #918
- Create layer for added mapbox layer by @ahocevar in #920
- Bump mini-css-extract-plugin from 2.7.5 to 2.7.6 by @dependabot in #913
- Bump eslint from 8.40.0 to 8.41.0 by @dependabot in #914
- Bump karma-chrome-launcher from 3.1.1 to 3.2.0 by @dependabot in #915
- Bump sinon from 15.0.4 to 15.1.0 by @dependabot in #916
- Bump webpack from 5.79.0 to 5.84.1 by @dependabot in #921
- Bump socket.io-parser from 4.2.1 to 4.2.4 by @dependabot in #922
Full Changelog: v10.5.0...v10.6.0
v10.5.0
Summary
- Add terrarium hillshade example
- Add getStyleForLayer() function for more efficient legend creation without
recordStyleLayer(true)
What's Changed
- Changes for v10.4.0 by @ahocevar in #881
- Add a working Terrarium example by @mike-000 in #882
- Add getStyleForLayer() function by @ahocevar in #889
- Bump webpack-dev-server from 4.13.1 to 4.13.2 by @dependabot in #884
- Bump typescript from 5.0.3 to 5.0.4 by @dependabot in #888
- Bump webpack from 5.77.0 to 5.79.0 by @dependabot in #890
- Bump typedoc from 0.23.28 to 0.24.1 by @dependabot in #885
- Bump eslint-config-openlayers from 17.0.0 to 18.0.0 by @dependabot in #887
Full Changelog: v10.4.0...v10.5.0
v10.4.0
Changes that require attention
Font handling and loading
ol-mapbox-style no longer defaults to loading Google fonts when a required font is not available. Instead, it respects the new metadata.ol:webfonts
field in the Mapbox Style document. Example:
{
"version": 8,
"metadata": {
"ol:webfonts": "https://mytileservergl.com/fonts/{font-family}/{fontweight}{-fontstyle}.css"
}
// ...
}
The supported template placeholders are
- {font-family}: CSS font family converted to lowercase, blanks replaced with
-
, e.g.noto-sans
- {Font+Family}: CSS font family in original case, blanks replaced with
+
, e.g.Noto+Sans
- {fontweight}: CSS font weight (numeric), e.g.
400
,700
- {fontstyle}: CSS font style, e.g.
normal
,italic
- {-fontstyle}: CSS font style other than normal, e.g.
-italic
or empty string for normal
In addition to providing fonts along with the style, this can be used to retrieve fonts from a CDN (e.g. @fontsource
) or Google fonts. If this metadata field is not set to the style, the following default template will be used:
https://cdn.jsdelivr.net/npm/@fontsource/{font-family}/{fontweight}{-fontstyle}.css
To retain the current behavior (i.e. use Google Fonts), the template URL will have to be
https://fonts.googleapis.com/css?family={Font+Family}:{fontweight}{fontstyle}
Summary of other changes
- Fix a potential tile cache issue
- Fix problem caused by
getUid
function missing in the full build - Make
updateMapboxStyle()
work with objects that are not a reference to the original one - Add support for the
tms
tile scheme forraster
andvector
layers - Add support for the
terrarium
encoding forraster-dem
sources - Fix an issue where the
icon-offset
layout property modifies the underlying Mapbox Style object - Set the correct input projection for
geojson
sources when theprojection
option is used
What's Changed
- Changes for v10.3.4 by @ahocevar in #850
- Ensure sources have a unique key by @ahocevar in #852
- Fix full build by fixing getUid import by @ahocevar in #863
- Make updateMapboxStyle work with new object literals by @ahocevar in #864
- Add support for the tms tile scheme by @ahocevar in #865
- Bump webpack from 5.76.1 to 5.76.2 by @dependabot in #853
- Bump puppeteer from 19.7.4 to 19.7.5 by @dependabot in #854
- Bump mini-css-extract-plugin from 2.7.3 to 2.7.5 by @dependabot in #855
- Bump typedoc from 0.23.26 to 0.23.28 by @dependabot in #856
- Bump webpack-dev-server from 4.11.1 to 4.13.1 by @dependabot in #857
- ✨Add 'terrarium' encoding option to raster-dem hillshading by @V-Roger in #866
- Fix icon offset flip by @RobertOrthofer in #875
- Set projection from projection option as GeoJSON dataProjection by @ahocevar in #880
- Flexible font handling without Google Fonts default by @ahocevar in #851
- Bump style-loader from 3.3.1 to 3.3.2 by @dependabot in #872
- Bump sinon from 15.0.2 to 15.0.3 by @dependabot in #873
- Bump puppeteer from 19.7.5 to 19.8.3 by @dependabot in #877
- Bump typescript from 4.9.5 to 5.0.3 by @dependabot in #878
- Bump webpack from 5.76.2 to 5.77.0 by @dependabot in #879
New Contributors
- @RobertOrthofer made their first contribution in #875
Full Changelog: v10.3.4...v10.4.0