Releases: openlayers/openlayers
v7.2.2
The 7.2.2 release adds back missing symbols to the full build. See the changelog for 7.2.0 for new features and fixes since 7.1.
What's Changed
Full Changelog: v7.2.1...v7.2.2
v7.2.1
The 7.2.1 release is a patch to provide a working full build. See the changelog for 7.2.0 for new features and fixes since 7.1.
What's Changed
- Updates for the 7.2.0 release by @marcjansen in #14396
- Use custom query function to replace missing taffydb query features by @ahocevar in #14398
Full Changelog: v7.2.0...v7.2.1
v7.2.0
The 7.2 release includes β¦
- β¦some new features (e.g. for icon styling),
- β¦performance optimisations (e.g. for canvas rendering),
- β¦better interoperability (e.g. OGC API - Tiles support, saner projection-handling for GeoTIFFs and a new PMTiles example),
- β¦the usual smaller bugfixes, and
- β¦a lot of dependency updates.
Please find below four aspects of this release that we want to highlight and make
sure to scan over the full list of included changes (even further below).
OGC vector and map tile sources are now a stable part of the API
The OGC API βΒ Tiles core v1 spec has been published, and as a consequence we marked the long existing vector and map tile sources as part of the stable API.
Introduce width
and height
configuration options to Icon
styles
It is now possible to create an icon symbolizer with an explicit width
and/or height
, e.g.:
const myIcon = new Icon({
src: 'data/icon.png',
width: 32,
height: 32
});
This is an additional configuration option to make working with image icons easier.
Rendered resolutions of ol/source/Raster
Previously, ol/source/Raster
processed input sources at the current view resolution, which caused interpolation artefacts in cases where input sources were up- or downsampled. Now, ol/source/Raster
picks up the resolutions from the first input source that has resolutions configured (either implicitly through a tile grid in the case of tile sources, or directly when configured through the resolutions
constructor option). This improves the rendered output in most cases.
If the previous behavior is desired, configure the source with resolutions: null
.
Fixed wrapX
behavior of ol/control/MousePosition
Previously, ol/control/MousePosition
always displayed coordinates as-is. Now it has a wrapX
option,
which is true
by default. This avoids longitudes aoutside the -180 to 180 degrees range.
If you want the previous behavior, which displays coordinates with longitudes less than -180 or greater than 180, configure the control with wrapX: false
.
List of all changes
See below for a complete list of features and fixes.
- Fix types and docs for GeolocationError (by @ahocevar in #14395)
- Introduce
width
andheight
to Icon style (by @KaiVolland in #14364) - Fix typo in Helper.js & inconsistency in ShaderBuilder.js comment. (by @Tomcariello in #14368)
- Rendering tests instead of unit tests for MapboxVector layer background (by @openlayers in #14355)
- Mark OGC tile sources as stable (by @tschaub in #14354)
- Calculate snap tolerance extent allowing for rotation (by @mike-000 in #14344)
- Updated extensions for Stamen tiles (by @tschaub in #14347)
- Convert closest point on geometry edge to user coordinates for snap (by @mike-000 in #14349)
- Fix immediate renderer image and text rotation in rotated canvas (by @mike-000 in #14333)
- Consider rotation when obtaining vector context pixel ratio (by @mike-000 in #14332)
- Update ArcGIS REST Feature Service example (by @mike-000 in #14296)
- Assign variable to work around swc minification problem (by @openlayers in #14320)
- Support better detection of projection in GeoTIFF files (by @ahocevar in #14321)
- Use ResizeObserver to detect resizes, also when in Shadow DOM (by @ahocevar in #14305)
- Ensure
change:position
event is fired if identify transform used (by @mike-000 in #14319) - Rename numberSafeCompareFunction to ascending (by @tschaub in #14311)
- Change ela-compil url (by @fredj in #14301)
- Update sponsors (by @ahocevar in #14293)
- Remove unused arguments (by @ahocevar in #14292)
- Also set version in full build (by @openlayers in #14288)
- Update example showing COG with external overviews (by @tschaub in #14286)
- Add resolutions option to Raster source (by @ahocevar in #14282)
- Handle layers that do not have a source yet (by @openlayers in #14280)
- Remove Babel (by @tschaub in #14279)
- Configurable log level (by @tschaub in #14278)
- Update geotiff to v2.0.7 (by @ahocevar in #14257)
- Include file extensions in examples and docs (by @tschaub in #14263)
- Avoid creating tiles with one row each (by @tschaub in #14260)
- Add support for images in data tiles (by @tschaub in #14258)
- Add a PMTiles example (by @tschaub in #14256)
- Update more COG paths (by @mike-000 in #14252)
- Update ArcGIS MapServer examples service url (by @mike-000 in #14251)
- Use wkt definitions in EPSG.io Search example (by @mike-000 in #14239)
- Update COG path (by @mike-000 in #14236)
- Add wrapX support to the MousePosition control (by @openlayers in #14232)
- Minor fixes to ReprojDataTile tests (by @mike-000 in #14217)
- Pass transition option along to reproj data tile (by @tschaub in #14216)
- Set willReadFrequently option on
ol/source/Raster
shared context (by @mike-000 in #14215) - Do not use .getImageData where .createImageData can be used (by @mike-000 in #14213)
- Set willReadFrequently option on pixel contexts (by @ahocevar in #14204)
- Create hit and taint detection canvas with willReadFrequently set to true (by @ahocevar in #14203)
- Use jsdelivr instead of unpkg (by @openlayers in #14200)
- Take scale transform into account for viewport pixels (by @ahocevar in #14199)
- Typo were => where (by @nboisteault in #14197)
- RenderFeature cannot be modified (by @MoonE in #14194)
- Typo (by @JakobMiksch in #14195)
- Translate interaction can't work with RenderFeature (by @MoonE in #14172)
- Only TileImage as ReprojTile source tile type (by @MoonE in #14173)
- Correct return type for ol/layer/VectorTile~getFeatures() (by @MoonE in #14165)
- Use arrow functions instead of binding anonymous functions (by @tschaub in #14170)
- Fix if condition in clusters-dynamic example (by @ahocevar in #14150)
- hitdetect GeometryCollection (by @MoonE in #14138)
- Make track properties in Link interaction configurable (by @ahocevar in #14126)
- Add a sourceready event to layers (by @tschaub in #14124)
- Add support for fetching proj4 definitions from epsg.io (by @tschaub in #14122)
- Avoid the redirect to the OL 2 page (by @tschaub in #14118)
- No else after return (by @tschaub in #14103)
- Fix WMTS source key (by @ahocevar in #14100)
- Reproject DataTiles (by @mike-000 in #13654)
- Updates for ol-mapbox-style v9.2 (by @ahocevar in #14086)
- Add version dropdown for API link (by @KaiVolland in #14085)
- Updates for the 7.1.0 release (by @openlayers in #14082)
Dependency Updates
- Bump @metalsmith/markdown from 1.6.0 to 1.8.0 (by @openlayers in #14386)
- Bump globby from 13.1.2 to 13.1.3 (by @openlayers in #14382)
- Bump eslint from 8.29.0 to 8.30.0 (by @openlayers in #14388)
- Bump puppeteer from 19.4.0 to 19.4.1 (by @openlayers in #14387)
- Bump jquery from 3.6.1 to 3.6.2 (by @op...
v7.1.0
The 7.1 release adds a handful of new features and updates the story for users of the full library build.
Draw with tracing
The draw interaction has a new trace
option. When this is set, you can click on existing features to trace their outlines while creating new polygons or lines.
New GeoTIFF options
The GeoTIFF source now supports imagery with internal masks. In addition, the GeoTIFF source accepts a convertToRGB: 'auto'
setting. With this new setting, the values will be converted to RGB in cases where the input data has three bands and the photometric interpretation is one of CMYK, YCbCr, CIELab, or ICCLab.
Notice to full build users
If you have been using the full build of the library, we now include this full build in the release package. This should mean stable URLs that you can point to in a <script>
tag. See the https://openlayers.org/download/ page for more detail.
Deprecation of ol/AssertionError
and error codes
Future versions will no longer throw ol/AssertionError
with an error code
. Instead, they will throw Error
with just the error message.
Updating parameters in ol/source/ImageWMS
and ol/source/TileWMS
The updateParams()
method is the only way to update WMS parameters. Changes made directly to the params
object passed as a constructor option will have no effect.
List of all changes
See below for a complete list of features and fixes.
- Fix control styles on Full Screen Mobile example (by @mike-000 in #14079)
- Include the full build in the ol package (by @openlayers in #14067)
- Add support for auto conversion to RGB (by @tschaub in #14066)
- Avoid stuck maps when resolving views from a GeoTIFF (by @tschaub in #14064)
- GeoTIFF mask support (by @tschaub in #14063)
- Use preferred tile.openstreetmap.org URL (by @Firefishy in #14062)
- Clarify proj4 version (by @ahocevar in #14061)
- Fix register import (by @openlayers in #14059)
- Clone the WMS params option (by @mike-000 in #14048)
- Clear cache when WebGL tile layer source reset (by @mike-000 in #14015)
- Consider both tracing directions when within snap tolerance (by @tschaub in #14057)
- Fix WebGL preload and empty reproj tiles (by @mike-000 in #14051)
- Avoid rate limits from the GitHub API (by @tschaub in #14056)
- Support tracing with the draw interaction (by @tschaub in #14046)
- Improve some examples (by @MoonE in #14039)
- Show how to use Skypack (by @ahocevar in #14038)
- Update to bootstrap 5.2 (by @MoonE in #13996)
- Move assertion messages into code and deprecate AssertionError (by @ahocevar in #14030)
- New URL to check for latest release (by @tschaub in #14025)
- Link to latest 6.x release (by @tschaub in #14026)
- Do not display TileJSON attributions if empty string (by @mike-000 in #14023)
- Updates for the 7.0.0 release (by @openlayers in #14019)
Dependency Updates
- Bump typescript from 4.7.4 to 4.8.2 (by @openlayers in #14073)
- Bump eslint from 8.22.0 to 8.23.0 (by @openlayers in #14069)
- Bump @babel/core from 7.18.10 to 7.18.13 (by @openlayers in #14071)
- Bump puppeteer from 16.2.0 to 17.0.0 (by @openlayers in #14072)
- Bump ol-mapbox-style from 9.0.0 to 9.1.0 (by @openlayers in #14070)
- Bump jquery from 3.6.0 to 3.6.1 (by @openlayers in #14074)
- Bump puppeteer from 16.1.0 to 16.2.0 (by @openlayers in #14035)
- Bump marked from 4.0.18 to 4.0.19 (by @openlayers in #14033)
- Bump rollup from 2.78.0 to 2.78.1 (by @openlayers in #14036)
- Bump @octokit/rest from 19.0.3 to 19.0.4 (by @openlayers in #14034)
New Contributors
- @Firefishy made their first contribution in #14062
Full Changelog: v7.0.0...v7.1.0
v7.0.0
The 7.0 release includes an impressive batch of features and fixes from over 90 pull requests. We're excited about a new foundation for WebGL vector rendering. The previous point rendering functionality has been extended to include lines and polygons. The rendering API is still low level and experimental. Future releases will include a higher level styling API.
In developing the new WebGL rendering functionality, we changed the signature for a number of methods on a helper class that had been marked as part of the API in 6.x releases. While this is technically a breaking change, it is unlikely that applications were using this helper class, so upgrades should be straightforward.
We took advantage of the breaking change in the WebGL helper class to remove a few other deprecated parts of the API. In addition, since Microsoft ended support for Internet Explorer a few months ago, we decided to do the same.
Backwards incompatible changes
Removal of deprecated properties and methods
- The
tilePixelRatio
has been removed from theDataTile
source. - The
imageSmoothing
option has been removed from sources. - The
undefinedHTML
option has been removed from theMousePosition
control. - The
forEachLayerAtPixel
method has been removed from theMap
class. - Deprecated options have been removed from the
Overlay
component. - The
labelCache
has been removed from theol/render/canvas.js
module.
Internet Explorer is no longer supported
Please see https://docs.microsoft.com/en-us/lifecycle/announcements/internet-explorer-11-end-of-support.
ol/webgl/Helper.js
The Helper
constructor from the ol/webgl/Helper.js
module is no longer part of the public API.
ol/coordinate.js
The toStringHDMS
function from the ol/coordinate.js
module now formats longitude, latitude pairs so that the minutes and seconds are omitted if they are zero. This changes the values displayed on graticules.
ol/layer/Graticule
The default intervals
now align with integer minutes and seconds better suited to the default label formatter. If formatting in decimal degrees you may wish to specify custom intervals
suited to that format.
ol/Collection
Inserting with setAt
or insertAt
beyond the current length used to create a sparse Collection with undefined
inserted for any missing indexes. This will now throw an error instead.
ol/control/MousePosition
The control will now by default keep displaying the last mouse position when the mouse leaves the viewport. With placeholder: ' '
you can keep the old behaviour. The placeholder
option no longer accepts false
as a valid value, instead simply omit the option. The undefinedHTML
option has been removed. You should use placeholder
instead.
ol/PluggableMap
The PluggableMap
class has been removed. If you want to create a custom map class, extend the Map
class instead.
ol/style/Icon and ol/style/RegularShape
ol/style/Image
and subclasses displacement
is no longer scaled with the image. If you previously expected this unintended behavior you should now increase the displacement when setting the scale.
List of all changes
See below for a complete list of features and fixes.
- Make the website deploy job succeed even if there are no changes (by @tschaub in #14017)
- Release actions (by @tschaub in #14014)
- Properly clear and refresh reprojected sources (by @ahocevar in #14013)
- Remove ENABLE_RASTER_REPROJECTION flag (by @ahocevar in #14011)
- Force render after update in Icon Scale example (by @mike-000 in #14012)
- Update ol-mapbox-style to v9.0.0 (by @ahocevar in #14009)
- Replace the Icon Scale example (by @mike-000 in #14007)
- Improve description of displacement in docs (by @mike-000 in #14006)
- Remove IE workarounds for legacy build, examples, and workers (by @tschaub in #13995)
- Use the full table for constructor options (by @tschaub in #13998)
- Do not scale Icon and RegularShape displacement (by @mike-000 in #13975)
- Support user projections in Drag and Drop (by @mike-000 in #14003)
- Avoid append only cache in WebGL tile layers (by @tschaub in #13997)
- Fix immediate renderer text rotation with offset (by @mike-000 in #13981)
- Build and deploy the website (by @openlayers in #13984)
- Small example template fixes (by @marcjansen in #13992)
- Fix wording in API docs (by @marcjansen in #13991)
- Nicer links in the API docs (by @tschaub in #13970)
- Minor adjustments to the website style (by @tschaub in #13989)
- Fix copying of non-linked ol.css, clean example build (by @MoonE in #13988)
- Fix kml-timezone example calculations (by @MoonE in #13982)
- Fix some errors in examples (by @MoonE in #13977)
- Update FontAwesome to v6.1.2 (by @MoonE in #13978)
- Use correct bands with
LUMINANCE_ALPHA
(by @mike-000 in #13974) - Remove opt_ prefix (by @tschaub in #13972)
- Fix bandcount per texture for 8, 12, 16, etc. bands (by @mike-000 in #13973)
- Do not apply #12467 change to Icons (by @mike-000 in #13955)
- Remove more IE compatibility (by @MoonE in #13971)
- Remove workaround and docs for IE 11 (by @tschaub in #13965)
- Remove circular dependency (by @tschaub in #13967)
- Update link to sponsors (by @tschaub in #13968)
- Bundle code for the map on the homepage (by @tschaub in #13966)
- Website build (by @tschaub in #13961)
- Remove polyfills for IE and Android 4 (by @tschaub in #13963)
- Replace VERSION in un-transpiled source (by @MoonE in #13957)
- Use const in docs and other places (by @MoonE in #13958)
- Add few missing new lines in example source listing (by @MoonE in #13959)
- Fix js error in api pages on load (by @MoonE in #13956)
- Minor simplification (by @JakobMiksch in #13953)
- Fix typo and formatting in upgrade notes (by @mike-000 in #13946)
- Fixes to export examples (by @mike-000 in #13947)
- Fix WebGL points layer flaky test (by @jahow in #13944)
- Scaleline (by @MoonE in #13943)
- Improve loading of kmz file in example (by @MoonE in #13942)
- Fix KML default icon anchor with https icon url (by @MoonE in #13941)
- Use nicer functions, remove old code (by @MoonE in #13937)
- Render vector tile vectors in correct sequence for the postrender event (by @ahocevar in #13939)
- Remove workaround for missing TypedArray.from function (by @MoonE in #13936)
- Remove check for context.setLineDash (by @MoonE in #13933)
- Remove deprecated DataTile source
tilePixelRatio
(by @mike-000 in #13930) - Remove input type="range"
change
event listeners whereinput
events are also used (by @mike-000 in #13932) - Remove deprecated
imageSmoothing
source options (by @mike-000 in #13931) - Updated map background (by @tschaub in #13926)
- Include babel for CodeSandbox (by @tschaub in #13923)
- Remove reference to ES6 as ES2017 already listed (by @mike-000 in #13922)
- Style updates for examples and API docs (by @tschaub in #13917)
- Remove Google Analytics and cookie consent (by @tschaub in #13916)
- Fix map render test (by @MoonE in #13915)
- Uniformly grayscale controls (by @tschaub in #13908)
- Remove PluggableMap (by @tschaub in #13914)
- Remove Mou...
v6.15.1
The 6.15.1 release is a patch to ensure that a layer gets rendered when its source has completed loading. See the changelog for 6.15.0 for new features and fixes since 6.14.
List of all changes:
Full Changelog: v6.15.0...v6.15.1
v6.15.0
Overview
The 6.15 release brings several fixes and improvements:
- Faster vector tile rendering for soures with non-standard tile grids
- Reduced canvas memory footprint for increased stability on iOS devices and better rendering performance
- Fixed a bug that prevented tiles from expiring from the tile cache in the correct order
- Better type safety with an increasing number of
null
checks and union types - New
setFill
andsetStroke
methods forRegularShape
symbols - Vector symbol and text decluttering on the style level
- Fixed pointer event handling on touch devices when layer visibility changes
- New
justify
option for text styles - New
Link
interation for adding center, zoom, rotation and active layers to the URL - Easier css styling of the scale bar, and in addition to
minWidth
, the scale line can now also be configured with amaxWidth
Details
Deprecated tilePixelRatio
option for data tile sources.
If you were previously trying to scale data tiles using the tilePixelRatio
property for data tile sources (this is rare), you should now use the explicit tileSize
and tileGrid
properties. The source's tileSize
represents the source tile dimensions and the tile grid's tileSize
represents the desired rendered dimensions.
const source = new DataTileSource({
tileSize: [512, 512], // source tile size
tileGrid: createXYZ({tileSize: [256, 256]}), // rendered tile size
});
Fixed coordinate dimension handling in ol/proj
's addCoordinateTransforms
The forward
and inverse
functions passed to addCooordinateTransforms
now receive a coordinate with all dimensions of the original coordinate, not just two. If you previosly had coordinates with more than two dimensions and added a transform like
addCoordinateTransforms(
'EPSG:4326',
new Projection({code: 'latlong', units: 'degrees'}),
function(coordinate) { return coordinate.reverse(); },
function(coordinate) { return coordinate.reverse(); }
);
you have to change that to
addCoordinateTransforms(
'EPSG:4326',
new Projection({code: 'latlong', units: 'degrees'}),
function(coordinate) { return coordinate.slice(0, 2).reverse() },
function(coordinate) { return coordinate.slice(0, 2).reverse() }
);
Replacement of string enums with union types
This change only affects users that were using the non-API string enums
- ol/OverlayPositioning
- ol/extent/Corner
- ol/format/FormatType
- ol/geom/GeometryType
- ol/source/State
- ol/source/WMSServerType
- ol/source/WMTSRequestEncoding
Instead of these, use the respective string
s, which are now typesafe by means of union types.
List of all changes
See below for a complete list of features and fixes.
- Base vector tile render tile grid on the source grid (by @mike-000 in #13832)
- ability to change the color of the scalebar (by @jipexu in #13834)
- Reduce canvas memory footprint for better iOS stability (by @ahocevar in #13823)
- Use union types instead of enums (by @ahocevar in #12696)
- remove XYZ-ESRI -4326-512 example (by @jipexu in #13817)
- Remove HERE Maps example (by @mike-000 in #13819)
- Checkcontenteditable (by @jipexu in #13787)
- Add null return type for TileGrid functions (by @EvertEt in #13674)
- Add setFill and setStroke to Shapes (by @theduckylittle in #13747)
- Include displacement and declutterMode in Icon style clone (by @mike-000 in #13803)
- Do not refresh use time for tiles when collecting used source tiles (by @M393 in #13799)
- Change WKB readFeature(s) return type to Feature (by @mike-000 in #13800)
- d3 version update (by @jipexu in #13784)
- Better fix for changing pointer ids on event target change (by @ahocevar in #13771)
- Fix source band calculation when configured with multiple sources (by @ahocevar in #13762)
- Clean up tracked pointers when the event target has changed (by @ahocevar in #13770)
- Fix modifying polygons with overlapping vertices (by @hargasinski in #13745)
- Support GML polygons with ring curves instead of linear rings (by @ahocevar in #13749)
- Fix typo in method names (by @MoonE in #13750)
- Load GeoTiff from Blob #13189 #13703 (by @m-mohr in #13724)
- improve text width calculation (by @IQGeo in #12106)
- Fix tile pyramid getData() (by @mike-000 in #13712)
- Improve icon-sprite-webgl example (by @MoonE in #13709)
- Fix hitdetection for icon with offset and pixelratio != 1 (by @MoonE in #13627)
- Wait for icons to be loaded before firing rendercomplete event (by @MoonE in #13626)
- Change typedef to boolean (by @mike-000 in #13702)
- #13690 VectorSource#getFeaturesInExtent add projection parameter (by @burleight in #13691)
- Update ESLint config and plugins (by @tschaub in #13701)
- Flip extent coordinates for projections with ne* axis order (by @ahocevar in #13688)
- Link interaction (by @tschaub in #13689)
- Test improvements (by @MoonE in #13676)
- Add null return type (by @ahocevar in #13673)
- fix currentClip == null (by @CNS-Solutions in #13672)
- Handle NaN nodata (by @tschaub in #13669)
- Fix for parcel error while building examples (by @arekgotfryd in #13656)
- Explicit data tile size (by @tschaub in #13648)
- Decluttering mode by style (by @CNS-Solutions in #13566)
- Output GeoTIFF tile load errors to console (by @mike-000 in #13645)
- Fix typos in upgrade notes (by @openlayers in #13641)
- Let transform function transform all dimensions it is capable of (by @ahocevar in #13637)
- Fix dependabot config (by @tschaub in #13614)
- Include GitHub actions in the dependabot config (by @turrisxyz in #13611)
- Do not reload data tiles if already loaded or loading (by @mike-000 in #13594)
- Limit permissions for GitHub actions (by @turrisxyz in #13607)
- Handle rotation with non-square tiles (by @tschaub in #13603)
- Properly document loadstart and loadend events (by @ahocevar in #13595)
- Update OSM Vector Tiles attribution (by @mike-000 in #13568)
- WebGLPointsLayer wrapX support - partially addressing #11131 (by @burleight in #13528)
- Add
justify
option for text style (by @rycgar in #13571) - Do not assert null projection (by @mike-000 in #13565)
- Improve Projection and Scale example calculations (by @mike-000 in #13496)
- Add geometryLayout property to Draw interaction (by @drnextgis in #13546)
- Updates for ol-mapbox-style v8 (by @ahocevar in #13552)
- NM symbol unit (by @jipexu in #13554)
- Update backgrounds when function returns a different color (by @ahocevar in #13550)
- Handle gutter in WebGL tile renderer (by @mike-000 in #13547)
- Do not add second interaction in Pinch Zoom example (by @mike-000 in #13551)
- Bugfix for GML parsing with multiple property elements with XML attributes (by @ejn in #12936)
- Fix small typo in docs (by @bartvde in #13536)
- Update type annotations for GMLBase (by @ahocevar in #13533)
- Add optional maxWidth for ScaleLine control (by @bartvde in #13531)
- Include tile gutter in offsets for getData() methods (by @mike-000 in #13521)
- Updates for the 6.14.1 release (by @openlayers in h...
6.14.1
The 6.14.1 release is a patch to correct a version discrepancy in the package-lock.json
file. See the changelog for 6.14.0 for new features and fixes since 6.13.
6.14.0
The 6.14 release includes a few new features and fixes. The new loadstart
and loadend
events make it easy to add loading indicators to your maps. Enhancements to the snap interaction add support for snapping to points coincident with lines and improve performance. A change to WebGL rendering works around an issue in Safari 15.4. Find detail on these improvements and more in the full list of changes below.
List of all changes
See below for a complete list of features and fixes.
- Store rendered source on the layer instead of the layer state (by @tschaub in #13509)
- Change imageSmoothing to interpolate in tests (by @mike-000 in #13506)
- Fallback if
OES_texture_float_linear
is not supported (by @mike-000 in #13505) - Workaround for Safari WebGL issue (by @tschaub in #13492)
- Separate geometry and extent parsing (by @ahocevar in #13490)
- Add loadstart and loadend map events (by @ahocevar in #13491)
- Add documentation for precompose and postcopose to ol/layer/WebGLTile (by @ahocevar in #13482)
- Fix legacy build (by @ahocevar in #13469)
- Fix Text#setText jsDoc (by @rycgar in #13466)
- Do not warn about coordinates when view projection is configured (by @ahocevar in #13464)
- Reset image when empty (by @ahocevar in #13463)
- Revert image transition regression (by @ahocevar in #13460)
- Improve Snap interaction performance (by @MoonE in #13455)
- Snap Interaction can snap to Point on line segment (by @T-MAPY in #13446)
- Initialize variable before use in FullScreen control (by @MoonE in #13447)
- Ensure FullScreen button has classname set on render. (by @themoffster in #13444)
- Guard PluggableMap against null renderer (by @EvertEt in #13437)
- Fix rendercomplete with invisible WebGLPoints layer (by @M393 in #13434)
- Handle layers without renderer properly (by @ahocevar in #13424)
Dependency Updates
- Bump minimist from 1.2.5 to 1.2.6 (by @openlayers in #13501)
- Bump node-forge from 1.2.1 to 1.3.0 (by @openlayers in #13498)
- Bump yargs from 17.3.1 to 17.4.0 (by @openlayers in #13493)
- Bump @babel/core from 7.17.5 to 7.17.8 (by @openlayers in #13494)
- Bump puppeteer from 13.4.1 to 13.5.1 (by @openlayers in #13472)
- Bump karma-chrome-launcher from 3.1.0 to 3.1.1 (by @openlayers in #13474)
- Bump mocha from 9.2.1 to 9.2.2 (by @openlayers in #13475)
- Bump proj4 from 2.7.5 to 2.8.0 (by @openlayers in #13476)
- Bump rollup from 2.70.0 to 2.70.1 (by @openlayers in #13477)
- Bump ol-mapbox-style from 7.0.0 to 7.1.0 (by @openlayers in #13473)
- Bump rollup from 2.69.0 to 2.70.0 (by @openlayers in #13449)
- Bump webpack from 5.69.1 to 5.70.0 (by @openlayers in #13450)
- Bump puppeteer from 13.4.0 to 13.4.1 (by @openlayers in #13451)
- Bump karma from 6.3.16 to 6.3.17 (by @openlayers in #13452)
- Bump typescript from 4.6.0-beta to 4.6.2 (by @openlayers in #13453)
- Bump puppeteer from 13.3.2 to 13.4.0 (by @openlayers in #13427)
- Bump fs-extra from 10.0.0 to 10.0.1 (by @openlayers in #13429)
- Bump @rollup/plugin-commonjs from 21.0.1 to 21.0.2 (by @openlayers in #13430)
- Bump rollup from 2.67.3 to 2.69.0 (by @openlayers in #13442)
- Bump @rollup/plugin-babel from 5.3.0 to 5.3.1 (by @openlayers in #13426)
New Contributors
- @themoffster made their first contribution in #13444
- @langpavel made their first contribution in #13446
- @rycgar made their first contribution in #13466
Full Changelog: v6.13.0...v6.14.0
v6.13.0
Overview
The 6.13 release brings several exciting new features and improvements:
- A new
layer.getData()
method to get pixel data for a single layer (see details below). - Support for rich text labels in
ol/style/Text
, to use different font styles and fonts in a single label. - The
useGeograpic()
andsetUserProjection()
functions in theol/proj
module are now part of the official API. These functions make it easier to work with geographic coordinates or local projections. - Improvements for WebGL Tile and Points layers.
- Performance improvements on
ol/Feature
, to avoid event creation when there are no listeners. - Update of geotiff.js to v2, to fix some build issues that users reported.
- Improvements to the auto-generated TypeScript types.
Details
New layer.getData()
method
Raster layers (static images, image tiles, data tiles) have a new layer.getData(pixel)
method that returns the pixel data at the provided location. The return value depends on the underlying source data type. For example, a GeoTIFF may return a Float32Array
with one value per band, while a PNG rendered from a tile layer will return a Uint8ClampedArray
of RGBA values.
If you were previously using the map.forEachLayerAtPixel()
method, you should use the new layer.getData()
method instead. The old method returns composite pixel values from multiple layers and is limited to RGBA values. The new method doesn't suffer from these shortcomings and is more performant.
Deprecated map.forEachLayerAtPixel()
method
The map.forEachLayerAtPixel()
method has been deprecated. It will be removed (or its behavior may change) in the next major release. Please use the layer.getData()
method instead.
List of all changes
See below for a complete list of features and fixes.
- Update ol-mapbox-style for rich text labels support (by @ahocevar in #13418)
- Increase GeoTIFF resolutions tolerance (by @ahocevar in #13417)
- Check for graticule resolution change and fix unrotated size (by @mike-000 in #13415)
- Rich text labels (by @ahocevar in #13410)
- Clear image when source's image is not ready (by @yonda-yonda in #13398)
- Fix setting View resolution or center to undefined (by @MoonE in #13393)
- Fix clone of icon loses imgSize when cache is full (by @MoonE in #13390)
- Use same clipping method for vector and image tiles (by @ahocevar in #13392)
- Less clipping of target resolution tiles (by @ahocevar in #13391)
- Change remaining links to point to class page instead of module (by @MoonE in #13385)
- User projection API (by @ahocevar in #13383)
- Fix wrong types when using
"skipLibCheck": false
(by @seravifer in #13382) - Fix JsDoc references (by @MoonE in #13374)
- Fix VectorSource isEmpty without spatial index (by @MoonE in #13373)
- Document difference between Vector and VectorImage layers (by @ahocevar in #13371)
- Fix
ol/source/Cluster#setSource
type annotation (by @MoonE in #12998) - Preload tiles for WebGL tile layers (by @tschaub in #13357)
- Avoid event creation when there are no listeners (by @MoonE in #13358)
- Add floor, round and ceil to style expressions (by @mike-000 in #13363)
- Support WebGL layers in ol/source/Raster (by @mike-000 in #13361)
- Improve some null types to prepare for strictNullChecks (by @EvertEt in #13301)
- Reset globalAlpha back to its initial after mutating it for drawing layers (by @Amirh0sseinHZ in #13351)
- Removing an unnecessary word from DEVELOPING.md (by @Amirh0sseinHZ in #13352)
- Get pixel data (by @tschaub in #13338)
- Remove warning for
@type
annotation by jsdoc (by @MoonE in #13350) - Improve some null types for strictNullChecks (by @EvertEt in #13334)
- Dispose of webgl contexts (by @MoonE in #13336)
- Fix error when accessing ready property of renderer (by @MoonE in #13337)
- Pass tilePixelRatio and gutter to TileTexture (by @mike-000 in #13269)
- Improve some nullable map types (by @EvertEt in #13328)
- Avoid rendering outside WebGL layer and source extent (by @tschaub in #13333)
- Avoid duplicate imports (by @tschaub in #13332)
- Add updateStyleVariables method to WebGLPoints layer (by @ahocevar in #13294)
- Fix rendercomplete for WebGLPoints layer and subclasses (by @ahocevar in #13323)
- fix: fix casing for z-index (by @OSHistory in #13319)
- Fix typo CSS class name for the expanded attributions button (by @fredj in #13315)
- Improve types for tile layers (by @ahocevar in #13299)
- Document geometry type (by @ahocevar in #13298)
- Add function to convert RenderFeature to Feature (by @MoonE in #13297)
- Update to geotiff@2 (by @ahocevar in #13292)
- Re-assign style variables on setStyle() (by @ahocevar in #13293)
- add @api comment on getAllLayers method (by @XiaofengZeng in #13261)
- Allowing to pass additional options to the geotiff.js source (by @constantinius in #13290)
- Defaults for generic types (by @ahocevar in #13291)
- Load api navigation dynamically to reduce needed disk space (by @MoonE in #13229)
- Remove unneeded
src=""
(by @mike-000 in #13271) - Support multiple sources for WebGL tile layers (by @ahocevar in #13212)
- Add crossOrigin option to LiteralSymbolStyle (by @mike-000 in #13259)
- Avoid the redirect from unpkg.com (by @tschaub in #13242)
- Updates for the 6.12.0 release (by @openlayers in #13241)
Dependency Updates
- Bump express from 4.17.2 to 4.17.3 (by @openlayers in #13402)
- Bump puppeteer from 13.3.1 to 13.3.2 (by @openlayers in #13401)
- Bump mocha from 9.2.0 to 9.2.1 (by @openlayers in #13403)
- Bump webpack from 5.68.0 to 5.69.1 (by @openlayers in #13404)
- Bump ol-mapbox-style from 6.8.3 to 6.9.0 (by @openlayers in #13406)
- Bump rollup from 2.67.1 to 2.67.3 (by @openlayers in #13405)
- Bump @babel/core from 7.17.2 to 7.17.5 (by @openlayers in #13407)
- Bump @babel/core from 7.17.0 to 7.17.2 (by @openlayers in #13381)
- Bump karma from 6.3.15 to 6.3.16 (by @openlayers in #13379)
- Bump eslint from 8.8.0 to 8.9.0 (by @openlayers in #13377)
- Bump puppeteer from 13.1.3 to 13.3.1 (by @openlayers in #13376)
- Bump follow-redirects from 1.14.7 to 1.14.8 (by @openlayers in #13372)
- Bump geotiff from 2.0.3 to 2.0.4 (by @openlayers in #13339)
- Bump globby from 13.1.0 to 13.1.1 (by @openlayers in #13340)
- Bump rollup from 2.66.1 to 2.67.1 (by @openlayers in #13342)
- Bump @babel/core from 7.16.12 to 7.17.0 (by @openlayers in #13343)
- Bump karma from 6.3.12 to 6.3.15 (by @openlayers in #13344)
- Bump webpack from 5.67.0 to 5.68.0 (by @openlayers in #13345)
- Bump webpack-dev-server from 4.7.3 to 4.7.4 (by @openlayers in #13346)
- Bump sinon from 13.0.0 to 13.0.1 (by @openlayers in #13348)
- Bump rollup from 2.66.0 to 2....