Compare commits

..

40 Commits

Author SHA1 Message Date
Tim Schaub
b04d542a3a Updates for the 6.12.0 release 2022-01-14 13:04:59 -07:00
Tim Schaub
f43df3c1e2 Merge pull request #13240 from openlayers/audit-fix
Transitive dependency update
2022-01-14 13:00:13 -07:00
Tim Schaub
c96fee5ba2 Transitive dependency update 2022-01-14 12:51:28 -07:00
Andreas Hocevar
0a439b0129 Merge pull request #13236 from mike-000/reset-interpolation-postrender
Re-enable image smoothing after rendering
2022-01-14 18:47:15 +01:00
Andreas Hocevar
ff5b4177c8 Merge pull request #13237 from mike-000/className-with-declutter
Describe use of className with declutter
2022-01-14 18:17:16 +01:00
mike-000
b5196a65a1 Describe use of className with declutter 2022-01-14 12:35:36 +00:00
mike-000
ec2e3f4f23 Set interpolate for use by VectorImage layers 2022-01-14 10:31:18 +00:00
mike-000
1c81f60fec re-enable image smoothing after rendering 2022-01-14 10:31:17 +00:00
Andreas Hocevar
89f632fa7e Merge pull request #13231 from lklepner/development-tips-fix
added run to npm command
2022-01-12 14:35:50 +01:00
Lou Klepner
11329bb776 added run to npm command 2022-01-12 07:45:15 -05:00
Tim Schaub
b98a95d1b4 Merge pull request #13228 from lklepner/development-tips
Document how to link package during development
2022-01-11 16:24:02 -07:00
Tim Schaub
0fbe83edf7 Merge pull request #13227 from tschaub/default-cors-mode
Default CORS mode for WebGL rendered sources
2022-01-11 16:22:03 -07:00
Lou Klepner
2dfef3f125 added linking instructions 2022-01-11 17:33:55 -05:00
Tim Schaub
1a8df049e4 Merge pull request #13226 from tschaub/gl-wrap-x
Support the wrapX option for WebGL rendered tile sources
2022-01-11 14:23:46 -07:00
Tim Schaub
f511209789 Merge pull request #13224 from tschaub/mapbox-style-update
Update ol-mapbox-style
2022-01-11 14:22:54 -07:00
Tim Schaub
e71a8b65e1 Default CORS request mode for tiles used in WebGL rendering 2022-01-11 14:21:48 -07:00
Tim Schaub
647a0d8ece Support the wrapX option for WebGL rendered tile sources 2022-01-11 12:48:49 -07:00
Tim Schaub
71f737b58a Update ol-mapbox-style 2022-01-11 10:01:14 -07:00
Andreas Hocevar
1f761d943f Merge pull request #13219 from ahocevar/modify-delete-no-event
Do not fire modifyend event when nothing was modified
2022-01-11 13:56:08 +01:00
Andreas Hocevar
0816746505 Merge pull request #13221 from M393/vectortile-interpolate
Draw VectorTiles with interpolate in hybrid mode again
2022-01-11 12:56:17 +01:00
Maximilian Kroeg
430f354406 Draw VectorTiles with interpolate in hybrid mode again 2022-01-11 12:49:07 +01:00
Andreas Hocevar
48ce451f53 Do not fire modifyend event when nothing was modified 2022-01-11 12:45:08 +01:00
Andreas Hocevar
2f9a9af809 Merge pull request #13216 from EvertEt/typos
Fix some typos in ModifyInteraction documentation
2022-01-11 11:18:19 +01:00
Andreas Hocevar
bad590d0de Merge pull request #13217 from EvertEt/fix/13213
Fix MVT incorrect feature data handling
2022-01-11 11:16:46 +01:00
EvertEt
6a26ff4204 Fix MVT incorrect feature data handling
Closes #13213
2022-01-11 11:03:24 +01:00
EvertEt
cd840aaf88 Fix some typos in ModifyInteraction documentation 2022-01-11 11:03:04 +01:00
Andreas Hocevar
e98607e344 Merge pull request #13209 from openlayers/dependabot/npm_and_yarn/karma-6.3.10
Bump karma from 6.3.9 to 6.3.10
2022-01-10 13:36:06 +01:00
Andreas Hocevar
7c9822b9e7 Merge pull request #13211 from openlayers/dependabot/npm_and_yarn/shx-0.3.4
Bump shx from 0.3.3 to 0.3.4
2022-01-10 13:29:13 +01:00
dependabot[bot]
ed758f7655 Bump karma from 6.3.9 to 6.3.10
Bumps [karma](https://github.com/karma-runner/karma) from 6.3.9 to 6.3.10.
- [Release notes](https://github.com/karma-runner/karma/releases)
- [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma/compare/v6.3.9...v6.3.10)

---
updated-dependencies:
- dependency-name: karma
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 12:29:05 +00:00
Andreas Hocevar
ff60daaa49 Merge pull request #13210 from openlayers/dependabot/npm_and_yarn/rollup/plugin-node-resolve-13.1.3
Bump @rollup/plugin-node-resolve from 13.1.2 to 13.1.3
2022-01-10 13:28:48 +01:00
Andreas Hocevar
f47b332512 Merge pull request #13208 from openlayers/dependabot/npm_and_yarn/rollup-2.63.0
Bump rollup from 2.62.0 to 2.63.0
2022-01-10 13:28:10 +01:00
Andreas Hocevar
1c0b6e2fe8 Merge pull request #13207 from openlayers/dependabot/npm_and_yarn/marked-4.0.9
Bump marked from 4.0.8 to 4.0.9
2022-01-10 13:27:49 +01:00
dependabot[bot]
3d8c98c865 Bump shx from 0.3.3 to 0.3.4
Bumps [shx](https://github.com/shelljs/shx) from 0.3.3 to 0.3.4.
- [Release notes](https://github.com/shelljs/shx/releases)
- [Changelog](https://github.com/shelljs/shx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shx/compare/v0.3.3...v0.3.4)

---
updated-dependencies:
- dependency-name: shx
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 10:01:58 +00:00
dependabot[bot]
acb2c2a69d Bump @rollup/plugin-node-resolve from 13.1.2 to 13.1.3
Bumps [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/HEAD/packages/node-resolve) from 13.1.2 to 13.1.3.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/node-resolve/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/node-resolve-v13.1.3/packages/node-resolve)

---
updated-dependencies:
- dependency-name: "@rollup/plugin-node-resolve"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 10:01:48 +00:00
dependabot[bot]
b717d63b4c Bump rollup from 2.62.0 to 2.63.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.62.0 to 2.63.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.62.0...v2.63.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 10:01:17 +00:00
dependabot[bot]
dbba580f82 Bump marked from 4.0.8 to 4.0.9
Bumps [marked](https://github.com/markedjs/marked) from 4.0.8 to 4.0.9.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.8...v4.0.9)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 10:00:59 +00:00
Tim Schaub
866c641c87 Merge pull request #13205 from tschaub/new-changelog
Format the changelog so contributors can be highlighted
2022-01-09 07:32:33 -07:00
Tim Schaub
076fc70b6c Format the changelog so contributors can be highlighted 2022-01-08 19:43:00 -07:00
Tim Schaub
a1643783c5 Merge pull request #13204 from openlayers/release-v6.11.0
Updates for the 6.11.0 release
2022-01-08 16:49:39 -07:00
Tim Schaub
28ca752a64 Develop on 6.11.1-dev 2022-01-08 16:34:38 -07:00
28 changed files with 327 additions and 130 deletions

View File

@@ -26,6 +26,28 @@ To run the examples you first need to start the dev server:
Then, load <http://localhost:8080/> in your browser.
## Linking Package
The `ol` package is published from the `build/ol` folder of the `openlayers` repo.
After you've cloned the `openlayers` repo locally run the `npm build-package` to prepare the build then use the `npm link` command to connect it your project.
Below is an example of how to build and link it to "sample-project"
$ cd openlayers
$ npm run build-package
$ cd build/ol
$ npm link
$ cd /sample-project
$ npm link ol
To remove the link run the following commands
$ cd sample-project
$ npm unlink --no-save ol
$ cd ../openlayers
$ npm unlink
## Running tests
To run the tests once:

View File

@@ -1,5 +1,9 @@
## Upgrade notes
### v6.12.0
No special changes are required when upgrading to the 6.12.0 release.
### v6.11.0
No special changes are required when upgrading to the 6.11.0 release.

30
changelog/v6.12.0.md Normal file
View File

@@ -0,0 +1,30 @@
# 6.12.0
The 6.12 release brings a few small fixes and enhancements. See below for a complete list.
* Transitive dependency update (by @openlayers in https://github.com/openlayers/openlayers/pull/13240)
* Re-enable image smoothing after rendering (by @mike-000 in https://github.com/openlayers/openlayers/pull/13236)
* Describe use of className with declutter (by @mike-000 in https://github.com/openlayers/openlayers/pull/13237)
* added run to npm command (by @lklepner in https://github.com/openlayers/openlayers/pull/13231)
* Document how to link package during development (by @lklepner in https://github.com/openlayers/openlayers/pull/13228)
* Default CORS mode for WebGL rendered sources (by @tschaub in https://github.com/openlayers/openlayers/pull/13227)
* Support the wrapX option for WebGL rendered tile sources (by @tschaub in https://github.com/openlayers/openlayers/pull/13226)
* Update ol-mapbox-style (by @tschaub in https://github.com/openlayers/openlayers/pull/13224)
* Do not fire modifyend event when nothing was modified (by @ahocevar in https://github.com/openlayers/openlayers/pull/13219)
* Draw VectorTiles with interpolate in hybrid mode again (by @M393 in https://github.com/openlayers/openlayers/pull/13221)
* Fix some typos in ModifyInteraction documentation (by @EvertEt in https://github.com/openlayers/openlayers/pull/13216)
* Fix MVT incorrect feature data handling (by @EvertEt in https://github.com/openlayers/openlayers/pull/13217)
* Format the changelog so contributors can be highlighted (by @tschaub in https://github.com/openlayers/openlayers/pull/13205)
<details>
<summary>Dependency Updates</summary>
* Bump karma from 6.3.9 to 6.3.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13209)
* Bump shx from 0.3.3 to 0.3.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13211)
* Bump @rollup/plugin-node-resolve from 13.1.2 to 13.1.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13210)
* Bump rollup from 2.62.0 to 2.63.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13208)
* Bump marked from 4.0.8 to 4.0.9 (by @openlayers in https://github.com/openlayers/openlayers/pull/13207)
</details>

View File

@@ -17,7 +17,6 @@ const imagery = new TileLayer({
attributions:
'<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> ' +
'<a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>',
crossOrigin: '',
maxZoom: 20,
}),
});

View File

@@ -33,7 +33,6 @@ const layer = new TileLayer({
'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key,
tileSize: 512,
maxZoom: 12,
crossOrigin: 'anonymous',
}),
style: {
variables: {
@@ -56,7 +55,6 @@ const map = new Map({
source: new XYZ({
url: 'https://api.maptiler.com/maps/streets/{z}/{x}/{y}.png?key=' + key,
attributions: attributions,
crossOrigin: 'anonymous',
tileSize: 512,
maxZoom: 22,
}),

View File

@@ -50,7 +50,6 @@ const shadedRelief = new TileLayer({
opacity: 0.3,
source: new XYZ({
url: 'https://{a-d}.tiles.mapbox.com/v3/aj.sf-dem/{z}/{x}/{y}.png',
crossOrigin: 'anonymous',
}),
style: {
variables: variables,

View File

@@ -22,7 +22,6 @@ const layer = new TileLayer({
variables: variables,
},
source: new XYZ({
crossOrigin: 'anonymous', // TODO: determine if we can avoid this
attributions: attributions,
url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key,
maxZoom: 20,

213
package-lock.json generated
View File

@@ -1,16 +1,16 @@
{
"name": "ol",
"version": "6.11.0",
"version": "6.12.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ol",
"version": "6.11.0",
"version": "6.12.0",
"license": "BSD-2-Clause",
"dependencies": {
"geotiff": "^1.0.8",
"ol-mapbox-style": "^6.7.0",
"ol-mapbox-style": "^6.8.2",
"pbf": "3.2.1",
"rbush": "^3.0.1"
},
@@ -49,7 +49,7 @@
"karma-source-map-support": "^1.4.0",
"karma-webpack": "^5.0.0",
"loglevelnext": "^5.0.5",
"marked": "4.0.8",
"marked": "4.0.9",
"mocha": "9.1.3",
"pixelmatch": "^5.1.0",
"pngjs": "^6.0.0",
@@ -1877,9 +1877,9 @@
}
},
"node_modules/@rollup/plugin-node-resolve": {
"version": "13.1.2",
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.2.tgz",
"integrity": "sha512-xyqbuf1vyOPC60jEKhx3DBHunymnCJswzjNTKfX4Jz7zCPar1UqbRZCNY1u5QaXh97beaFTWdoUUWiV4qX8o/g==",
"version": "13.1.3",
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz",
"integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==",
"dev": true,
"dependencies": {
"@rollup/pluginutils": "^3.1.0",
@@ -3843,9 +3843,9 @@
}
},
"node_modules/engine.io": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.0.0.tgz",
"integrity": "sha512-Ui7yl3JajEIaACg8MOUwWvuuwU7jepZqX3BKs1ho7NQRuP4LhN4XIykXhp8bEy+x/DhA0LBZZXYSCkZDqrwMMg==",
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.1.1.tgz",
"integrity": "sha512-AyMc20q8JUUdvKd46+thc9o7yCZ6iC6MoBCChG5Z1XmFMpp+2+y/oKvwpZTUJB0KCjxScw1dV9c2h5pjiYBLuQ==",
"dev": true,
"dependencies": {
"@types/cookie": "^0.4.1",
@@ -3864,9 +3864,9 @@
}
},
"node_modules/engine.io-parser": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.1.tgz",
"integrity": "sha512-j4p3WwJrG2k92VISM0op7wiq60vO92MlF3CRGxhKHy9ywG1/Dkc72g0dXeDQ+//hrcDn8gqQzoEkdO9FN0d9AA==",
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.2.tgz",
"integrity": "sha512-wuiO7qO/OEkPJSFueuATIXtrxF7/6GTbAO9QLv7nnbjwZ5tYhLm9zxvLwxstRs0dcT0KUlWTjtIOs1T86jt12g==",
"dev": true,
"dependencies": {
"base64-arraybuffer": "~1.0.1"
@@ -5051,9 +5051,9 @@
"dev": true
},
"node_modules/follow-redirects": {
"version": "1.13.3",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz",
"integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==",
"version": "1.14.7",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz",
"integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==",
"dev": true,
"funding": [
{
@@ -6382,9 +6382,9 @@
"dev": true
},
"node_modules/karma": {
"version": "6.3.9",
"resolved": "https://registry.npmjs.org/karma/-/karma-6.3.9.tgz",
"integrity": "sha512-E/MqdLM9uVIhfuyVnrhlGBu4miafBdXEAEqCmwdEMh3n17C7UWC/8Kvm3AYKr91gc7scutekZ0xv6rxRaUCtnw==",
"version": "6.3.10",
"resolved": "https://registry.npmjs.org/karma/-/karma-6.3.10.tgz",
"integrity": "sha512-Ofv+sgrkT8Czo6bzzQCvrwVyRSG8/3e7RbawEuxjfsINony+IR/S2csNRUFgPNfmWvju+dqi/MzQGOJ2LnlmfQ==",
"dev": true,
"dependencies": {
"body-parser": "^1.19.0",
@@ -6813,9 +6813,9 @@
}
},
"node_modules/marked": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.8.tgz",
"integrity": "sha512-dkpJMIlJpc833hbjjg8jraw1t51e/eKDoG8TFOgc5O0Z77zaYKigYekTDop5AplRoKFGIaoazhYEhGkMtU3IeA==",
"version": "4.0.9",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.9.tgz",
"integrity": "sha512-HmoFvQwFLxNESeGupeOC+6CLb5WzcCWQmqvVetsErmrI3vrZ6gBumty5IP0ynLPR0zYSoVY7ITC1GffsYIGkog==",
"dev": true,
"bin": {
"marked": "bin/marked.js"
@@ -7202,12 +7202,12 @@
}
},
"node_modules/node-forge": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz",
"integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==",
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.2.1.tgz",
"integrity": "sha512-Fcvtbb+zBcZXbTTVwqGA5W+MKBj56UjVRevvchv5XrcyXbmNdesfZL37nlcWOfpgHhgmxApw3tQbTr4CqNmX4w==",
"dev": true,
"engines": {
"node": ">= 6.0.0"
"node": ">= 6.13.0"
}
},
"node_modules/node-releases": {
@@ -7327,9 +7327,9 @@
"dev": true
},
"node_modules/ol-mapbox-style": {
"version": "6.8.1",
"resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-6.8.1.tgz",
"integrity": "sha512-HD3FNFzFiBptEwiLIVna7H/WSpv/cN99xMmIErcvqv/r4XLwWS/8VKti8w6moVPV28Fg2QmitXvaG3okedMU7w==",
"version": "6.8.2",
"resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-6.8.2.tgz",
"integrity": "sha512-iObsecfgrCoMakFCwWWRTYXMy0X1bedJwbTgn6Im7igto+obRgmUoy/TZGBHQY1xEBczV4fVAzyyOkzQUNa8ug==",
"dependencies": {
"@mapbox/mapbox-gl-style-spec": "^13.20.1",
"mapbox-to-css-font": "^2.4.0",
@@ -8291,9 +8291,9 @@
}
},
"node_modules/rollup": {
"version": "2.62.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.62.0.tgz",
"integrity": "sha512-cJEQq2gwB0GWMD3rYImefQTSjrPYaC6s4J9pYqnstVLJ1CHa/aZNVkD4Epuvg4iLeMA4KRiq7UM7awKK6j7jcw==",
"version": "2.63.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.63.0.tgz",
"integrity": "sha512-nps0idjmD+NXl6OREfyYXMn/dar3WGcyKn+KBzPdaLecub3x/LrId0wUcthcr8oZUAcZAR8NKcfGGFlNgGL1kQ==",
"dev": true,
"bin": {
"rollup": "dist/bin/rollup"
@@ -8394,12 +8394,15 @@
"dev": true
},
"node_modules/selfsigned": {
"version": "1.10.11",
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.11.tgz",
"integrity": "sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.0.0.tgz",
"integrity": "sha512-cUdFiCbKoa1mZ6osuJs2uDHrs0k0oprsKveFiiaBKCNq3SYyb5gs2HxhQyDNLCmL51ZZThqi4YNDpCK6GOP1iQ==",
"dev": true,
"dependencies": {
"node-forge": "^0.10.0"
"node-forge": "^1.2.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/semver": {
@@ -8592,9 +8595,9 @@
}
},
"node_modules/shelljs": {
"version": "0.8.4",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz",
"integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==",
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz",
"integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
"dev": true,
"dependencies": {
"glob": "^7.0.0",
@@ -8609,13 +8612,13 @@
}
},
"node_modules/shx": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/shx/-/shx-0.3.3.tgz",
"integrity": "sha512-nZJ3HFWVoTSyyB+evEKjJ1STiixGztlqwKLTUNV5KqMWtGey9fTd4KU1gdZ1X9BV6215pswQ/Jew9NsuS/fNDA==",
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz",
"integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==",
"dev": true,
"dependencies": {
"minimist": "^1.2.3",
"shelljs": "^0.8.4"
"shelljs": "^0.8.5"
},
"bin": {
"shx": "lib/cli.js"
@@ -8702,16 +8705,16 @@
}
},
"node_modules/socket.io": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.3.1.tgz",
"integrity": "sha512-HC5w5Olv2XZ0XJ4gOLGzzHEuOCfj3G0SmoW3jLHYYh34EVsIr3EkW9h6kgfW+K3TFEcmYy8JcPWe//KUkBp5jA==",
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.4.1.tgz",
"integrity": "sha512-s04vrBswdQBUmuWJuuNTmXUVJhP0cVky8bBDhdkf8y0Ptsu7fKU2LuLbts9g+pdmAdyMMn8F/9Mf1/wbtUN0fg==",
"dev": true,
"dependencies": {
"accepts": "~1.3.4",
"base64id": "~2.0.0",
"debug": "~4.3.2",
"engine.io": "~6.0.0",
"socket.io-adapter": "~2.3.2",
"engine.io": "~6.1.0",
"socket.io-adapter": "~2.3.3",
"socket.io-parser": "~4.0.4"
},
"engines": {
@@ -8719,9 +8722,9 @@
}
},
"node_modules/socket.io-adapter": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.2.tgz",
"integrity": "sha512-PBZpxUPYjmoogY0aoaTmo1643JelsaS1CiAwNjRVdrI0X9Seuc19Y2Wife8k88avW6haG8cznvwbubAZwH4Mtg==",
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.3.tgz",
"integrity": "sha512-Qd/iwn3VskrpNO60BeRyCyr8ZWw9CPZyitW4AQwmRZ8zCiyDiL+znRnWX6tDHXnWn1sJrM1+b6Mn6wEDJJ4aYQ==",
"dev": true
},
"node_modules/socket.io-parser": {
@@ -9823,9 +9826,9 @@
}
},
"node_modules/webpack-dev-server": {
"version": "4.7.2",
"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.7.2.tgz",
"integrity": "sha512-s6yEOSfPpB6g1T2+C5ZOUt5cQOMhjI98IVmmvMNb5cdiqHoxSUfACISHqU/wZy+q4ar/A9jW0pbNj7sa50XRVA==",
"version": "4.7.3",
"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.7.3.tgz",
"integrity": "sha512-mlxq2AsIw2ag016nixkzUkdyOE8ST2GTy34uKSABp1c4nhjZvH90D5ZRR+UOLSsG4Z3TFahAi72a3ymRtfRm+Q==",
"dev": true,
"dependencies": {
"@types/bonjour": "^3.5.9",
@@ -9850,7 +9853,7 @@
"p-retry": "^4.5.0",
"portfinder": "^1.0.28",
"schema-utils": "^4.0.0",
"selfsigned": "^1.10.11",
"selfsigned": "^2.0.0",
"serve-index": "^1.9.1",
"sockjs": "^0.3.21",
"spdy": "^4.0.2",
@@ -11597,9 +11600,9 @@
}
},
"@rollup/plugin-node-resolve": {
"version": "13.1.2",
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.2.tgz",
"integrity": "sha512-xyqbuf1vyOPC60jEKhx3DBHunymnCJswzjNTKfX4Jz7zCPar1UqbRZCNY1u5QaXh97beaFTWdoUUWiV4qX8o/g==",
"version": "13.1.3",
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz",
"integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==",
"dev": true,
"requires": {
"@rollup/pluginutils": "^3.1.0",
@@ -13202,9 +13205,9 @@
}
},
"engine.io": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.0.0.tgz",
"integrity": "sha512-Ui7yl3JajEIaACg8MOUwWvuuwU7jepZqX3BKs1ho7NQRuP4LhN4XIykXhp8bEy+x/DhA0LBZZXYSCkZDqrwMMg==",
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.1.1.tgz",
"integrity": "sha512-AyMc20q8JUUdvKd46+thc9o7yCZ6iC6MoBCChG5Z1XmFMpp+2+y/oKvwpZTUJB0KCjxScw1dV9c2h5pjiYBLuQ==",
"dev": true,
"requires": {
"@types/cookie": "^0.4.1",
@@ -13220,9 +13223,9 @@
}
},
"engine.io-parser": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.1.tgz",
"integrity": "sha512-j4p3WwJrG2k92VISM0op7wiq60vO92MlF3CRGxhKHy9ywG1/Dkc72g0dXeDQ+//hrcDn8gqQzoEkdO9FN0d9AA==",
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.2.tgz",
"integrity": "sha512-wuiO7qO/OEkPJSFueuATIXtrxF7/6GTbAO9QLv7nnbjwZ5tYhLm9zxvLwxstRs0dcT0KUlWTjtIOs1T86jt12g==",
"dev": true,
"requires": {
"base64-arraybuffer": "~1.0.1"
@@ -14141,9 +14144,9 @@
"dev": true
},
"follow-redirects": {
"version": "1.13.3",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz",
"integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==",
"version": "1.14.7",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz",
"integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==",
"dev": true
},
"foreachasync": {
@@ -15093,9 +15096,9 @@
"dev": true
},
"karma": {
"version": "6.3.9",
"resolved": "https://registry.npmjs.org/karma/-/karma-6.3.9.tgz",
"integrity": "sha512-E/MqdLM9uVIhfuyVnrhlGBu4miafBdXEAEqCmwdEMh3n17C7UWC/8Kvm3AYKr91gc7scutekZ0xv6rxRaUCtnw==",
"version": "6.3.10",
"resolved": "https://registry.npmjs.org/karma/-/karma-6.3.10.tgz",
"integrity": "sha512-Ofv+sgrkT8Czo6bzzQCvrwVyRSG8/3e7RbawEuxjfsINony+IR/S2csNRUFgPNfmWvju+dqi/MzQGOJ2LnlmfQ==",
"dev": true,
"requires": {
"body-parser": "^1.19.0",
@@ -15445,9 +15448,9 @@
"requires": {}
},
"marked": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.8.tgz",
"integrity": "sha512-dkpJMIlJpc833hbjjg8jraw1t51e/eKDoG8TFOgc5O0Z77zaYKigYekTDop5AplRoKFGIaoazhYEhGkMtU3IeA==",
"version": "4.0.9",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.9.tgz",
"integrity": "sha512-HmoFvQwFLxNESeGupeOC+6CLb5WzcCWQmqvVetsErmrI3vrZ6gBumty5IP0ynLPR0zYSoVY7ITC1GffsYIGkog==",
"dev": true
},
"mdurl": {
@@ -15749,9 +15752,9 @@
}
},
"node-forge": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz",
"integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==",
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.2.1.tgz",
"integrity": "sha512-Fcvtbb+zBcZXbTTVwqGA5W+MKBj56UjVRevvchv5XrcyXbmNdesfZL37nlcWOfpgHhgmxApw3tQbTr4CqNmX4w==",
"dev": true
},
"node-releases": {
@@ -15838,9 +15841,9 @@
"dev": true
},
"ol-mapbox-style": {
"version": "6.8.1",
"resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-6.8.1.tgz",
"integrity": "sha512-HD3FNFzFiBptEwiLIVna7H/WSpv/cN99xMmIErcvqv/r4XLwWS/8VKti8w6moVPV28Fg2QmitXvaG3okedMU7w==",
"version": "6.8.2",
"resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-6.8.2.tgz",
"integrity": "sha512-iObsecfgrCoMakFCwWWRTYXMy0X1bedJwbTgn6Im7igto+obRgmUoy/TZGBHQY1xEBczV4fVAzyyOkzQUNa8ug==",
"requires": {
"@mapbox/mapbox-gl-style-spec": "^13.20.1",
"mapbox-to-css-font": "^2.4.0",
@@ -16570,9 +16573,9 @@
}
},
"rollup": {
"version": "2.62.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.62.0.tgz",
"integrity": "sha512-cJEQq2gwB0GWMD3rYImefQTSjrPYaC6s4J9pYqnstVLJ1CHa/aZNVkD4Epuvg4iLeMA4KRiq7UM7awKK6j7jcw==",
"version": "2.63.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.63.0.tgz",
"integrity": "sha512-nps0idjmD+NXl6OREfyYXMn/dar3WGcyKn+KBzPdaLecub3x/LrId0wUcthcr8oZUAcZAR8NKcfGGFlNgGL1kQ==",
"dev": true,
"requires": {
"fsevents": "~2.3.2"
@@ -16645,12 +16648,12 @@
"dev": true
},
"selfsigned": {
"version": "1.10.11",
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.11.tgz",
"integrity": "sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.0.0.tgz",
"integrity": "sha512-cUdFiCbKoa1mZ6osuJs2uDHrs0k0oprsKveFiiaBKCNq3SYyb5gs2HxhQyDNLCmL51ZZThqi4YNDpCK6GOP1iQ==",
"dev": true,
"requires": {
"node-forge": "^0.10.0"
"node-forge": "^1.2.0"
}
},
"semver": {
@@ -16819,9 +16822,9 @@
"dev": true
},
"shelljs": {
"version": "0.8.4",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz",
"integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==",
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz",
"integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
"dev": true,
"requires": {
"glob": "^7.0.0",
@@ -16830,13 +16833,13 @@
}
},
"shx": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/shx/-/shx-0.3.3.tgz",
"integrity": "sha512-nZJ3HFWVoTSyyB+evEKjJ1STiixGztlqwKLTUNV5KqMWtGey9fTd4KU1gdZ1X9BV6215pswQ/Jew9NsuS/fNDA==",
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz",
"integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==",
"dev": true,
"requires": {
"minimist": "^1.2.3",
"shelljs": "^0.8.4"
"shelljs": "^0.8.5"
}
},
"side-channel": {
@@ -16903,23 +16906,23 @@
"dev": true
},
"socket.io": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.3.1.tgz",
"integrity": "sha512-HC5w5Olv2XZ0XJ4gOLGzzHEuOCfj3G0SmoW3jLHYYh34EVsIr3EkW9h6kgfW+K3TFEcmYy8JcPWe//KUkBp5jA==",
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.4.1.tgz",
"integrity": "sha512-s04vrBswdQBUmuWJuuNTmXUVJhP0cVky8bBDhdkf8y0Ptsu7fKU2LuLbts9g+pdmAdyMMn8F/9Mf1/wbtUN0fg==",
"dev": true,
"requires": {
"accepts": "~1.3.4",
"base64id": "~2.0.0",
"debug": "~4.3.2",
"engine.io": "~6.0.0",
"socket.io-adapter": "~2.3.2",
"engine.io": "~6.1.0",
"socket.io-adapter": "~2.3.3",
"socket.io-parser": "~4.0.4"
}
},
"socket.io-adapter": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.2.tgz",
"integrity": "sha512-PBZpxUPYjmoogY0aoaTmo1643JelsaS1CiAwNjRVdrI0X9Seuc19Y2Wife8k88avW6haG8cznvwbubAZwH4Mtg==",
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.3.tgz",
"integrity": "sha512-Qd/iwn3VskrpNO60BeRyCyr8ZWw9CPZyitW4AQwmRZ8zCiyDiL+znRnWX6tDHXnWn1sJrM1+b6Mn6wEDJJ4aYQ==",
"dev": true
},
"socket.io-parser": {
@@ -17770,9 +17773,9 @@
}
},
"webpack-dev-server": {
"version": "4.7.2",
"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.7.2.tgz",
"integrity": "sha512-s6yEOSfPpB6g1T2+C5ZOUt5cQOMhjI98IVmmvMNb5cdiqHoxSUfACISHqU/wZy+q4ar/A9jW0pbNj7sa50XRVA==",
"version": "4.7.3",
"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.7.3.tgz",
"integrity": "sha512-mlxq2AsIw2ag016nixkzUkdyOE8ST2GTy34uKSABp1c4nhjZvH90D5ZRR+UOLSsG4Z3TFahAi72a3ymRtfRm+Q==",
"dev": true,
"requires": {
"@types/bonjour": "^3.5.9",
@@ -17797,7 +17800,7 @@
"p-retry": "^4.5.0",
"portfinder": "^1.0.28",
"schema-utils": "^4.0.0",
"selfsigned": "^1.10.11",
"selfsigned": "^2.0.0",
"serve-index": "^1.9.1",
"sockjs": "^0.3.21",
"spdy": "^4.0.2",

View File

@@ -1,6 +1,6 @@
{
"name": "ol",
"version": "6.11.0",
"version": "6.12.0",
"description": "OpenLayers mapping library",
"keywords": [
"map",
@@ -46,7 +46,7 @@
},
"dependencies": {
"geotiff": "^1.0.8",
"ol-mapbox-style": "^6.7.0",
"ol-mapbox-style": "^6.8.2",
"pbf": "3.2.1",
"rbush": "^3.0.1"
},
@@ -85,7 +85,7 @@
"karma-source-map-support": "^1.4.0",
"karma-webpack": "^5.0.0",
"loglevelnext": "^5.0.5",
"marked": "4.0.8",
"marked": "4.0.9",
"mocha": "9.1.3",
"pixelmatch": "^5.1.0",
"pngjs": "^6.0.0",

View File

@@ -164,7 +164,7 @@ class MVT extends FeatureFormat {
* @param {PBF} pbf PBF
* @param {Object} rawFeature Raw Mapbox feature.
* @param {import("./Feature.js").ReadOptions} options Read options.
* @return {import("../Feature.js").FeatureLike} Feature.
* @return {import("../Feature.js").FeatureLike|null} Feature.
*/
createFeature_(pbf, rawFeature, options) {
const type = rawFeature.type;
@@ -293,7 +293,10 @@ class MVT extends FeatureFormat {
for (let i = 0, ii = pbfLayer.length; i < ii; ++i) {
const rawFeature = readRawFeature(pbf, pbfLayer, i);
features.push(this.createFeature_(pbf, rawFeature, options));
const feature = this.createFeature_(pbf, rawFeature, options);
if (feature !== null) {
features.push(feature);
}
}
}

View File

@@ -185,7 +185,7 @@ export class ModifyEvent extends Event {
*
* Cartesian distance from the pointer is used to determine the features that
* will be modified. This means that geometries will only be considered for
* modification when they are within the configured `pixelTolerane`. For point
* modification when they are within the configured `pixelTolerance`. For point
* geometries, the `hitDetection` option can be used to match their visual
* appearance.
*
@@ -480,7 +480,7 @@ class Modify extends PointerInteraction {
*/
removeFeature_(feature) {
this.removeFeatureSegmentData_(feature);
// Remove the vertex feature if the collection of canditate features is empty.
// Remove the vertex feature if the collection of candidate features is empty.
if (this.vertexFeature_ && this.features_.getLength() === 0) {
this.overlay_.getSource().removeFeature(this.vertexFeature_);
this.vertexFeature_ = null;
@@ -1360,13 +1360,16 @@ class Modify extends PointerInteraction {
const evt = this.lastPointerEvent_;
this.willModifyFeatures_(evt, this.dragSegments_);
const removed = this.removeVertex_();
this.dispatchEvent(
new ModifyEvent(
ModifyEventType.MODIFYEND,
this.featuresBeingModified_,
evt
)
);
if (this.featuresBeingModified_) {
this.dispatchEvent(
new ModifyEvent(
ModifyEventType.MODIFYEND,
this.featuresBeingModified_,
evt
)
);
}
this.featuresBeingModified_ = null;
return removed;
}

View File

@@ -45,6 +45,11 @@ import {
* is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
* @property {import("../style/Style.js").StyleLike|null} [style] Layer style. When set to `null`, only
* features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style
* which will be used if this is not set.

View File

@@ -182,6 +182,11 @@ const SourceType = {
* is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
* @property {import("./Base.js").BackgroundColor|false} [background] Background color for the layer.
* If not specified, the background from the Mapbox style object will be used. Set to `false` to prevent
* the Mapbox style's background from being used.

View File

@@ -62,6 +62,11 @@ import {assign} from '../obj.js';
* is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
* @property {import("../style/Style.js").StyleLike|null} [style] Layer style. When set to `null`, only
* features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style
* which will be used if this is not set.

View File

@@ -4,7 +4,7 @@
import CanvasLayerRenderer from './Layer.js';
import ViewHint from '../../ViewHint.js';
import {ENABLE_RASTER_REPROJECTION} from '../../reproj/common.js';
import {IMAGE_SMOOTHING_DISABLED} from './common.js';
import {IMAGE_SMOOTHING_DISABLED, IMAGE_SMOOTHING_ENABLED} from './common.js';
import {assign} from '../../obj.js';
import {compose as composeTransform, makeInverse} from '../../transform.js';
import {containsExtent, intersects as intersectsExtent} from '../../extent.js';
@@ -219,6 +219,7 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer {
if (clipped) {
context.restore();
}
assign(context, IMAGE_SMOOTHING_ENABLED);
if (canvasTransform !== canvas.style.transform) {
canvas.style.transform = canvasTransform;

View File

@@ -4,7 +4,7 @@
import CanvasLayerRenderer from './Layer.js';
import TileRange from '../../TileRange.js';
import TileState from '../../TileState.js';
import {IMAGE_SMOOTHING_DISABLED} from './common.js';
import {IMAGE_SMOOTHING_DISABLED, IMAGE_SMOOTHING_ENABLED} from './common.js';
import {
apply as applyTransform,
compose as composeTransform,
@@ -457,6 +457,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
if (layerState.extent) {
context.restore();
}
assign(context, IMAGE_SMOOTHING_ENABLED);
if (canvasTransform !== canvas.style.transform) {
canvas.style.transform = canvasTransform;

View File

@@ -10,3 +10,12 @@ export const IMAGE_SMOOTHING_DISABLED = {
imageSmoothingEnabled: false,
msImageSmoothingEnabled: false,
};
/**
* Context options to enable image smoothing.
* @type {Object}
*/
export const IMAGE_SMOOTHING_ENABLED = {
imageSmoothingEnabled: true,
msImageSmoothingEnabled: true,
};

View File

@@ -100,7 +100,9 @@ function getRenderExtent(frameState, extent) {
const source =
/** {import("../../source/Tile.js").default} */ layerState.layer.getSource();
if (!source.getWrapX()) {
const gridExtent = source.tileGrid.getExtent();
const gridExtent = source
.getTileGridForProjection(frameState.viewState.projection)
.getExtent();
if (gridExtent) {
extent = getIntersection(extent, gridExtent);
}

View File

@@ -181,6 +181,7 @@ class VectorSource extends Source {
super({
attributions: options.attributions,
interpolate: true,
projection: undefined,
state: SourceState.READY,
wrapX: options.wrapX !== undefined ? options.wrapX : true,

View File

@@ -124,6 +124,7 @@ class VectorTile extends UrlTile {
attributions: options.attributions,
attributionsCollapsible: options.attributionsCollapsible,
cacheSize: options.cacheSize,
interpolate: true,
opaque: false,
projection: projection,
state: options.state,

View File

@@ -175,6 +175,12 @@ class TileTexture extends EventTarget {
if (this.loaded) {
this.uploadTile_();
} else {
if (tile instanceof ImageTile) {
const image = tile.getImage();
if (image instanceof Image && !image.crossOrigin) {
image.crossOrigin = 'anonymous';
}
}
tile.addEventListener(EventType.CHANGE, this.handleTileChange_);
}
}

View File

@@ -49,12 +49,12 @@ main() {
number="${BASH_REMATCH[1]}"
author="${BASH_REMATCH[2]}"
summary="${BASH_REMATCH[3]}"
declare $output+=" * [#${number}](${PULLS_URL}/${number}) - ${summary} ([@${author}](${GITHUB_URL}/${author}))\n"
declare $output+=" * ${summary} (by @${author} in ${PULLS_URL}/${number})\n"
elif [[ ${l} =~ ${SQUASH_RE} ]] ; then
number="${BASH_REMATCH[3]}"
author="${BASH_REMATCH[1]}"
summary="${BASH_REMATCH[2]}"
declare $output+=" * [#${number}](${PULLS_URL}/${number}) - ${summary} ([${author}](${GITHUB_URL}/search?q=${author}&type=Users))\n"
declare $output+=" * ${summary} (by @${author} in ${PULLS_URL}/${number})\n"
fi
done

View File

@@ -20,7 +20,11 @@ import {
clearUserProjection,
setUserProjection,
} from '../../../../../src/ol/proj.js';
import {doubleClick, never} from '../../../../../src/ol/events/condition.js';
import {
click,
doubleClick,
never,
} from '../../../../../src/ol/events/condition.js';
import {getValues} from '../../../../../src/ol/obj.js';
describe('ol.interaction.Modify', function () {
@@ -880,6 +884,33 @@ describe('ol.interaction.Modify', function () {
done();
}, 0);
});
it('does not fire `modifyend` when nothing is modified', function (done) {
const modify = new Modify({
features: new Collection(features),
deleteCondition: click,
insertVertexCondition: never,
});
map.addInteraction(modify);
let modifyend = false;
modify.on('modifyend', function (e) {
modifyend = true;
});
// try to add vertex
simulateEvent('pointermove', 40, -20, null, 0);
simulateEvent('pointerdown', 40, -20, null, 0);
simulateEvent('pointerdrag', 42, -30, null, 0);
simulateEvent('pointerup', 42, -30, null, 0);
simulateEvent('click', 42, -30, null, 0);
simulateEvent('singleclick', 42, -30, null, 0);
setTimeout(function () {
expect(modifyend).to.be(false);
done();
}, 0);
});
});
describe('handle feature change', function () {

View File

@@ -301,6 +301,18 @@ describe('ol.renderer.canvas.ImageLayer', function () {
done();
});
});
it('image smoothing is re-enabled after rendering', function (done) {
let context;
layer.on('postrender', function (e) {
context = e.context;
context.imageSmoothingEnabled = false;
});
map.on('postrender', function () {
expect(context.imageSmoothingEnabled).to.be(true);
done();
});
});
});
describe('Vector image rendering', function () {

View File

@@ -87,5 +87,17 @@ describe('ol.renderer.canvas.TileLayer', function () {
done();
});
});
it('image smoothing is re-enabled after rendering', function (done) {
let context;
layer.on('postrender', function (e) {
context = e.context;
context.imageSmoothingEnabled = false;
});
map.on('postrender', function () {
expect(context.imageSmoothingEnabled).to.be(true);
done();
});
});
});
});

View File

@@ -77,6 +77,25 @@ describe('ol/webgl/TileTexture', function () {
expect(tileTexture.loaded).to.be(true);
});
it('sets anonymous cors mode for image tiles by default', function () {
const tile = new ImageTile([0, 0, 0], TileState.IDLE);
tileTexture.setTile(tile);
const image = tile.getImage();
expect(image.crossOrigin).to.be('anonymous');
});
it('resepects any existing cors mode', function () {
const tile = new ImageTile(
[0, 0, 0],
TileState.IDLE,
'https://example.com/tile.png',
'use-credentials'
);
tileTexture.setTile(tile);
const image = tile.getImage();
expect(image.crossOrigin).to.be('use-credentials');
});
it('registers and unregisters change listener', function () {
const tile = tileTexture.tile;
expect(tile.getListeners('change').length).to.be(2);

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

View File

@@ -0,0 +1,27 @@
import Map from '../../../../src/ol/Map.js';
import TileLayer from '../../../../src/ol/layer/WebGLTile.js';
import View from '../../../../src/ol/View.js';
import XYZ from '../../../../src/ol/source/XYZ.js';
document.getElementById('map').style.background = 'green';
new Map({
layers: [
new TileLayer({
source: new XYZ({
url: '/data/tiles/satellite/{z}/{x}/{y}.jpg',
transition: 0,
wrapX: false,
}),
}),
],
target: 'map',
view: new View({
center: [15700000, 2700000],
zoom: 2,
}),
});
render({
message: 'data tiles outside the world are not rendered',
});