v6.15.0
版本发布时间: 2022-07-19 04:32:45
openlayers/openlayers最新发布版本:v10.2.1(2024-09-27 04:27:34)
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 https://github.com/openlayers/openlayers/pull/13832)
- ability to change the color of the scalebar (by @jipexu in https://github.com/openlayers/openlayers/pull/13834)
- Reduce canvas memory footprint for better iOS stability (by @ahocevar in https://github.com/openlayers/openlayers/pull/13823)
- Use union types instead of enums (by @ahocevar in https://github.com/openlayers/openlayers/pull/12696)
- remove XYZ-ESRI -4326-512 example (by @jipexu in https://github.com/openlayers/openlayers/pull/13817)
- Remove HERE Maps example (by @mike-000 in https://github.com/openlayers/openlayers/pull/13819)
- Checkcontenteditable (by @jipexu in https://github.com/openlayers/openlayers/pull/13787)
- Add null return type for TileGrid functions (by @EvertEt in https://github.com/openlayers/openlayers/pull/13674)
- Add setFill and setStroke to Shapes (by @theduckylittle in https://github.com/openlayers/openlayers/pull/13747)
- Include displacement and declutterMode in Icon style clone (by @mike-000 in https://github.com/openlayers/openlayers/pull/13803)
- Do not refresh use time for tiles when collecting used source tiles (by @M393 in https://github.com/openlayers/openlayers/pull/13799)
- Change WKB readFeature(s) return type to Feature (by @mike-000 in https://github.com/openlayers/openlayers/pull/13800)
- d3 version update (by @jipexu in https://github.com/openlayers/openlayers/pull/13784)
- Better fix for changing pointer ids on event target change (by @ahocevar in https://github.com/openlayers/openlayers/pull/13771)
- Fix source band calculation when configured with multiple sources (by @ahocevar in https://github.com/openlayers/openlayers/pull/13762)
- Clean up tracked pointers when the event target has changed (by @ahocevar in https://github.com/openlayers/openlayers/pull/13770)
- Fix modifying polygons with overlapping vertices (by @hargasinski in https://github.com/openlayers/openlayers/pull/13745)
- Support GML polygons with ring curves instead of linear rings (by @ahocevar in https://github.com/openlayers/openlayers/pull/13749)
- Fix typo in method names (by @MoonE in https://github.com/openlayers/openlayers/pull/13750)
- Load GeoTiff from Blob #13189 #13703 (by @m-mohr in https://github.com/openlayers/openlayers/pull/13724)
- improve text width calculation (by @IQGeo in https://github.com/openlayers/openlayers/pull/12106)
- Fix tile pyramid getData() (by @mike-000 in https://github.com/openlayers/openlayers/pull/13712)
- Improve icon-sprite-webgl example (by @MoonE in https://github.com/openlayers/openlayers/pull/13709)
- Fix hitdetection for icon with offset and pixelratio != 1 (by @MoonE in https://github.com/openlayers/openlayers/pull/13627)
- Wait for icons to be loaded before firing rendercomplete event (by @MoonE in https://github.com/openlayers/openlayers/pull/13626)
- Change typedef to boolean (by @mike-000 in https://github.com/openlayers/openlayers/pull/13702)
- #13690 VectorSource#getFeaturesInExtent add projection parameter (by @burleight in https://github.com/openlayers/openlayers/pull/13691)
- Update ESLint config and plugins (by @tschaub in https://github.com/openlayers/openlayers/pull/13701)
- Flip extent coordinates for projections with ne* axis order (by @ahocevar in https://github.com/openlayers/openlayers/pull/13688)
- Link interaction (by @tschaub in https://github.com/openlayers/openlayers/pull/13689)
- Test improvements (by @MoonE in https://github.com/openlayers/openlayers/pull/13676)
- Add null return type (by @ahocevar in https://github.com/openlayers/openlayers/pull/13673)
- fix currentClip == null (by @CNS-Solutions in https://github.com/openlayers/openlayers/pull/13672)
- Handle NaN nodata (by @tschaub in https://github.com/openlayers/openlayers/pull/13669)
- Fix for parcel error while building examples (by @arekgotfryd in https://github.com/openlayers/openlayers/pull/13656)
- Explicit data tile size (by @tschaub in https://github.com/openlayers/openlayers/pull/13648)
- Decluttering mode by style (by @CNS-Solutions in https://github.com/openlayers/openlayers/pull/13566)
- Output GeoTIFF tile load errors to console (by @mike-000 in https://github.com/openlayers/openlayers/pull/13645)
- Fix typos in upgrade notes (by @openlayers in https://github.com/openlayers/openlayers/pull/13641)
- Let transform function transform all dimensions it is capable of (by @ahocevar in https://github.com/openlayers/openlayers/pull/13637)
- Fix dependabot config (by @tschaub in https://github.com/openlayers/openlayers/pull/13614)
- Include GitHub actions in the dependabot config (by @turrisxyz in https://github.com/openlayers/openlayers/pull/13611)
- Do not reload data tiles if already loaded or loading (by @mike-000 in https://github.com/openlayers/openlayers/pull/13594)
- Limit permissions for GitHub actions (by @turrisxyz in https://github.com/openlayers/openlayers/pull/13607)
- Handle rotation with non-square tiles (by @tschaub in https://github.com/openlayers/openlayers/pull/13603)
- Properly document loadstart and loadend events (by @ahocevar in https://github.com/openlayers/openlayers/pull/13595)
- Update OSM Vector Tiles attribution (by @mike-000 in https://github.com/openlayers/openlayers/pull/13568)
- WebGLPointsLayer wrapX support - partially addressing #11131 (by @burleight in https://github.com/openlayers/openlayers/pull/13528)
- Add
justify
option for text style (by @rycgar in https://github.com/openlayers/openlayers/pull/13571) - Do not assert null projection (by @mike-000 in https://github.com/openlayers/openlayers/pull/13565)
- Improve Projection and Scale example calculations (by @mike-000 in https://github.com/openlayers/openlayers/pull/13496)
- Add geometryLayout property to Draw interaction (by @drnextgis in https://github.com/openlayers/openlayers/pull/13546)
- Updates for ol-mapbox-style v8 (by @ahocevar in https://github.com/openlayers/openlayers/pull/13552)
- NM symbol unit (by @jipexu in https://github.com/openlayers/openlayers/pull/13554)
- Update backgrounds when function returns a different color (by @ahocevar in https://github.com/openlayers/openlayers/pull/13550)
- Handle gutter in WebGL tile renderer (by @mike-000 in https://github.com/openlayers/openlayers/pull/13547)
- Do not add second interaction in Pinch Zoom example (by @mike-000 in https://github.com/openlayers/openlayers/pull/13551)
- Bugfix for GML parsing with multiple property elements with XML attributes (by @ejn in https://github.com/openlayers/openlayers/pull/12936)
- Fix small typo in docs (by @bartvde in https://github.com/openlayers/openlayers/pull/13536)
- Update type annotations for GMLBase (by @ahocevar in https://github.com/openlayers/openlayers/pull/13533)
- Add optional maxWidth for ScaleLine control (by @bartvde in https://github.com/openlayers/openlayers/pull/13531)
- Include tile gutter in offsets for getData() methods (by @mike-000 in https://github.com/openlayers/openlayers/pull/13521)
- Updates for the 6.14.1 release (by @openlayers in https://github.com/openlayers/openlayers/pull/13511)
Dependency Updates
- Bump rollup from 2.76.0 to 2.77.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13841)
- Bump @types/geojson from 7946.0.8 to 7946.0.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13842)
- Bump @babel/preset-env from 7.18.6 to 7.18.9 (by @openlayers in https://github.com/openlayers/openlayers/pull/13843)
- Bump clean-css-cli from 5.6.0 to 5.6.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13844)
- Bump marked from 4.0.17 to 4.0.18 (by @openlayers in https://github.com/openlayers/openlayers/pull/13845)
- Bump @babel/core from 7.18.6 to 7.18.9 (by @openlayers in https://github.com/openlayers/openlayers/pull/13846)
- Bump puppeteer from 15.3.2 to 15.4.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13847)
- Bump eslint from 8.19.0 to 8.20.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13848)
- Bump puppeteer from 15.3.0 to 15.3.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13824)
- Bump rollup from 2.75.7 to 2.76.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13825)
- Bump @babel/core from 7.18.5 to 7.18.6 (by @openlayers in https://github.com/openlayers/openlayers/pull/13806)
- Bump webpack-dev-server from 4.9.2 to 4.9.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13810)
- Bump @babel/preset-env from 7.18.2 to 7.18.6 (by @openlayers in https://github.com/openlayers/openlayers/pull/13808)
- Bump puppeteer from 15.1.1 to 15.3.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13807)
- Bump es-main from 1.0.2 to 1.2.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13809)
- Bump eslint from 8.18.0 to 8.19.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13811)
- Bump @rollup/plugin-commonjs from 22.0.0 to 22.0.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13793)
- Bump puppeteer from 14.4.1 to 15.1.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13794)
- Bump eslint from 8.17.0 to 8.18.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13776)
- Bump typescript from 4.7.3 to 4.7.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13777)
- Bump karma from 6.3.20 to 6.4.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13775)
- Bump puppeteer from 14.3.0 to 14.4.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13778)
- Bump rollup from 2.75.6 to 2.75.7 (by @openlayers in https://github.com/openlayers/openlayers/pull/13779)
- Bump source-map-loader from 3.0.1 to 4.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13754)
- Bump @babel/core from 7.18.2 to 7.18.5 (by @openlayers in https://github.com/openlayers/openlayers/pull/13755)
- Bump marked from 4.0.16 to 4.0.17 (by @openlayers in https://github.com/openlayers/openlayers/pull/13756)
- Bump puppeteer from 14.2.1 to 14.3.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13757)
- Bump rollup from 2.75.5 to 2.75.6 (by @openlayers in https://github.com/openlayers/openlayers/pull/13758)
- Bump webpack-cli from 4.9.2 to 4.10.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13759)
- Bump webpack-dev-server from 4.9.1 to 4.9.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13760)
- Bump globby from 13.1.1 to 13.1.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13761)
- Bump eslint from 8.16.0 to 8.17.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13732)
- Bump typescript from 4.7.2 to 4.7.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13730)
- Bump webpack from 5.72.1 to 5.73.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13731)
- Bump rollup from 2.75.3 to 2.75.5 (by @openlayers in https://github.com/openlayers/openlayers/pull/13733)
- Bump puppeteer from 14.1.1 to 14.2.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13734)
- Bump webpack-dev-server from 4.9.0 to 4.9.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13735)
- Bump @babel/core from 7.18.0 to 7.18.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13717)
- Bump rollup from 2.74.1 to 2.75.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13718)
- Bump @types/offscreencanvas from 2019.6.4 to 2019.7.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13716)
- Bump typescript from 4.6.4 to 4.7.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13719)
- Bump @babel/preset-env from 7.18.0 to 7.18.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13720)
- Bump ol-mapbox-style from 8.0.8 to 8.1.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13715)
- Bump eslint from 8.9.0 to 8.16.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13693)
- Bump @babel/core from 7.17.10 to 7.18.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13694)
- Bump rollup from 2.73.0 to 2.74.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13699)
- Bump copy-webpack-plugin from 10.2.4 to 11.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13695)
- Bump webpack-dev-middleware from 5.3.1 to 5.3.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13696)
- Bump marked from 4.0.15 to 4.0.16 (by @openlayers in https://github.com/openlayers/openlayers/pull/13697)
- Bump @babel/preset-env from 7.17.10 to 7.18.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13698)
- Bump puppeteer from 14.1.0 to 14.1.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13700)
- Bump rollup from 2.72.1 to 2.73.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13680)
- Bump webpack from 5.72.0 to 5.72.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13681)
- Bump karma from 6.3.19 to 6.3.20 (by @openlayers in https://github.com/openlayers/openlayers/pull/13679)
- Bump puppeteer from 13.7.0 to 14.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13678)
- Bump ol-mapbox-style from 8.0.7 to 8.0.8 (by @openlayers in https://github.com/openlayers/openlayers/pull/13682)
- Bump yargs from 17.4.1 to 17.5.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13683)
- Bump rollup from 2.71.1 to 2.72.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13661)
- Bump sinon from 13.0.2 to 14.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13659)
- Bump webpack-dev-server from 4.8.1 to 4.9.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13662)
- Bump @rollup/plugin-node-resolve from 13.2.1 to 13.3.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13663)
- Bump ol-mapbox-style from 8.0.5 to 8.0.7 (by @openlayers in https://github.com/openlayers/openlayers/pull/13602)
- Bump marked from 4.0.14 to 4.0.15 (by @openlayers in https://github.com/openlayers/openlayers/pull/13628)
- Bump express from 4.18.0 to 4.18.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13629)
- Bump rollup from 2.70.2 to 2.71.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13630)
- Bump typescript from 4.6.3 to 4.6.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13631)
- Bump mocha from 9.2.2 to 10.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13632)
- Bump @babel/core from 7.17.9 to 7.17.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13633)
- Bump @babel/preset-env from 7.16.11 to 7.17.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13634)
- Bump github/codeql-action from 1 to 2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13616)
- Bump actions/setup-node from 2 to 3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13617)
- Bump actions/upload-artifact from 2 to 3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13615)
- Bump actions/checkout from 2 to 3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13618)
- Bump actions/github-script from 5 to 6 (by @openlayers in https://github.com/openlayers/openlayers/pull/13619)
- Bump puppeteer from 13.6.0 to 13.7.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13620)
- Bump express from 4.17.3 to 4.18.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13621)
- Bump @rollup/plugin-commonjs from 21.1.0 to 22.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13596)
- Bump puppeteer from 13.5.2 to 13.6.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13600)
- Bump pixelmatch from 5.2.1 to 5.3.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13598)
- Bump babel-loader from 8.2.4 to 8.2.5 (by @openlayers in https://github.com/openlayers/openlayers/pull/13601)
- Bump karma from 6.3.18 to 6.3.19 (by @openlayers in https://github.com/openlayers/openlayers/pull/13599)
- Bump sinon from 13.0.1 to 13.0.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13582)
- Bump async from 2.6.3 to 2.6.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13583)
- Bump @rollup/plugin-commonjs from 21.0.3 to 21.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13578)
- Bump fs-extra from 10.0.1 to 10.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13579)
- Bump karma from 6.3.17 to 6.3.18 (by @openlayers in https://github.com/openlayers/openlayers/pull/13580)
- Bump rollup from 2.70.1 to 2.70.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13581)
- Bump @rollup/plugin-node-resolve from 13.1.3 to 13.2.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13577)
- Bump webpack from 5.71.0 to 5.72.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13557)
- Bump @babel/core from 7.17.8 to 7.17.9 (by @openlayers in https://github.com/openlayers/openlayers/pull/13560)
- Bump webpack-dev-server from 4.7.4 to 4.8.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13559)
- Bump marked from 4.0.12 to 4.0.14 (by @openlayers in https://github.com/openlayers/openlayers/pull/13558)
- Bump yargs from 17.4.0 to 17.4.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13556)
- Bump webpack from 5.70.0 to 5.71.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13538)
- Bump jsdoc-plugin-typescript from 2.0.6 to 2.0.7 (by @openlayers in https://github.com/openlayers/openlayers/pull/13537)
- Bump puppeteer from 13.5.1 to 13.5.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13539)
- Bump clean-css-cli from 5.5.2 to 5.6.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13540)
- Bump typescript from 4.6.2 to 4.6.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13514)
- Bump babel-loader from 8.2.3 to 8.2.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13513)
- Bump @rollup/plugin-commonjs from 21.0.2 to 21.0.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13515)
- Bump serve-static from 1.14.2 to 1.15.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13512)
- Bump geotiff from 2.0.4 to 2.0.5 (by @openlayers in https://github.com/openlayers/openlayers/pull/13517)
New Contributors
- @burleight made their first contribution in https://github.com/openlayers/openlayers/pull/13528
- @naveensrinivasan made their first contribution in https://github.com/openlayers/openlayers/pull/13607
- @cns-solutions-admin made their first contribution in https://github.com/openlayers/openlayers/pull/13566
- @arekgotfryd made their first contribution in https://github.com/openlayers/openlayers/pull/13656
- @luiscamachopt made their first contribution in https://github.com/openlayers/openlayers/pull/12106
- @m-mohr made their first contribution in https://github.com/openlayers/openlayers/pull/13724
- @hargasinski made their first contribution in https://github.com/openlayers/openlayers/pull/13745
Full Changelog: https://github.com/openlayers/openlayers/compare/v6.14.1...v6.15.0
1、 v6.15.0-dist.zip 1MB
2、 v6.15.0.zip 12.95MB