Compare commits

...

665 Commits

Author SHA1 Message Date
Andreas Hocevar
f72ab97645 Update package version to 6.5.0 2020-12-27 20:06:46 +01:00
Andreas Hocevar
a4c5584fef Changelog for v6.5.0 2020-12-27 20:05:44 +01:00
Tim Schaub
1ba91cc213 Merge pull request #11851 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.12.11
Bump @babel/preset-env from 7.12.10 to 7.12.11
2020-12-24 12:10:16 -07:00
Tim Schaub
810a305f01 Merge pull request #11850 from openlayers/dependabot/npm_and_yarn/marked-1.2.7
Bump marked from 1.2.6 to 1.2.7
2020-12-24 12:09:41 -07:00
Tim Schaub
866951e978 Merge pull request #11852 from openlayers/dependabot/npm_and_yarn/rollup-2.35.1
Bump rollup from 2.35.0 to 2.35.1
2020-12-24 12:09:09 -07:00
Tim Schaub
80366f28d7 Merge pull request #11853 from openlayers/dependabot/npm_and_yarn/copy-webpack-plugin-6.4.1
Bump copy-webpack-plugin from 6.4.0 to 6.4.1
2020-12-24 12:08:38 -07:00
MoonE
c9c71cbbcb Merge pull request #11859 from MoonE/no-duplicate-postrender-events
Do not fire duplicate postrender events
2020-12-24 10:24:49 +01:00
Maximilian Krög
17659b9a80 Do not fire duplicate postrender events 2020-12-24 02:25:42 +01:00
MoonE
1a952e7a41 Merge pull request #11858 from MoonE/apidoc-vectoreventtype
Correct documented event names for VectorSourceEvent
2020-12-23 12:05:11 +01:00
Maximilian Krög
efdd885571 Correct documented event names for VectorSourceEvent 2020-12-23 00:02:19 +01:00
Andreas Hocevar
cce7ecec49 Merge pull request #11849 from openlayers/dependabot/npm_and_yarn/eslint-7.16.0
Bump eslint from 7.15.0 to 7.16.0
2020-12-21 09:30:15 +01:00
Andreas Hocevar
03292860c1 Merge pull request #11848 from openlayers/dependabot/npm_and_yarn/ol-mapbox-style-6.3.0
Bump ol-mapbox-style from 6.2.1 to 6.3.0
2020-12-21 09:29:22 +01:00
dependabot-preview[bot]
c263b77b8a Bump copy-webpack-plugin from 6.4.0 to 6.4.1
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/v6.4.1/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v6.4.0...v6.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-21 07:44:14 +00:00
dependabot-preview[bot]
62fb0a7020 Bump rollup from 2.35.0 to 2.35.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.35.0 to 2.35.1.
- [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.35.0...v2.35.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-21 07:43:46 +00:00
dependabot-preview[bot]
0facc7a096 Bump @babel/preset-env from 7.12.10 to 7.12.11
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.12.10 to 7.12.11.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.11/packages/babel-preset-env)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-21 07:40:37 +00:00
dependabot-preview[bot]
90cd28dab7 Bump marked from 1.2.6 to 1.2.7
Bumps [marked](https://github.com/markedjs/marked) from 1.2.6 to 1.2.7.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js)
- [Commits](https://github.com/markedjs/marked/compare/v1.2.6...v1.2.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-21 07:38:32 +00:00
dependabot-preview[bot]
d79242e574 Bump eslint from 7.15.0 to 7.16.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.15.0 to 7.16.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.15.0...v7.16.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-21 07:37:16 +00:00
dependabot-preview[bot]
487b39f400 Bump ol-mapbox-style from 6.2.1 to 6.3.0
Bumps [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) from 6.2.1 to 6.3.0.
- [Release notes](https://github.com/openlayers/ol-mapbox-style/releases)
- [Changelog](https://github.com/openlayers/ol-mapbox-style/blob/master/CHANGELOG.md)
- [Commits](https://github.com/openlayers/ol-mapbox-style/compare/v6.2.1...v6.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-21 07:35:39 +00:00
MoonE
d151c588a8 Merge pull request #11844 from MoonE/style-expressions-error-message
Fix Style expressions error message
2020-12-19 19:13:21 +01:00
Andreas Hocevar
f7c606c0d1 Merge pull request #11838 from changqingom/main
Custom circle render
2020-12-19 17:09:42 +01:00
changqing
6a7472617f Remove the console.log from the custom circle render example 2020-12-19 21:42:58 +08:00
Andreas Hocevar
c4f5709349 Simplify custom circle rendering 2020-12-19 21:35:00 +08:00
Maximilian Krög
d2027c1640 Get value type only once 2020-12-19 14:12:37 +01:00
Maximilian Krög
8363e66d1e Fix error message for assertArgsOdd failure 2020-12-19 14:12:37 +01:00
changqing
3393de3c54 Custom circle render example 2020-12-15 15:38:48 +08:00
changqing
811c130241 Implement custom circle render 2020-12-15 15:38:23 +08:00
MoonE
bac6f4f6e8 Merge pull request #11828 from openlayers/dependabot/npm_and_yarn/ol-mapbox-style-6.2.1
Bump ol-mapbox-style from 6.1.4 to 6.2.1
2020-12-15 00:01:37 +01:00
MoonE
21eeb1a56d Merge pull request #11830 from openlayers/dependabot/npm_and_yarn/jsdoc-plugin-typescript-2.0.6
Bump jsdoc-plugin-typescript from 2.0.5 to 2.0.6
2020-12-14 23:49:13 +01:00
MoonE
b4c204ad27 Merge pull request #11829 from openlayers/dependabot/npm_and_yarn/typescript-4.1.3
Bump typescript from 4.1.2 to 4.1.3
2020-12-14 23:44:35 +01:00
MoonE
0f1fd5854b Merge pull request #11833 from openlayers/dependabot/npm_and_yarn/rollup-2.35.0
Bump rollup from 2.34.2 to 2.35.0
2020-12-14 23:36:10 +01:00
MoonE
f588506bd9 Merge pull request #11834 from openlayers/dependabot/npm_and_yarn/copy-webpack-plugin-6.4.0
Bump copy-webpack-plugin from 6.3.2 to 6.4.0
2020-12-14 23:27:40 +01:00
MoonE
ca39394817 Merge pull request #11832 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.12.10
Bump @babel/preset-env from 7.12.7 to 7.12.10
2020-12-14 23:24:44 +01:00
MoonE
08a2d2ef8a Merge pull request #11835 from openlayers/dependabot/npm_and_yarn/sinon-9.2.2
Bump sinon from 9.2.1 to 9.2.2
2020-12-14 23:16:30 +01:00
MoonE
f17fa23fd4 Merge pull request #11831 from openlayers/dependabot/npm_and_yarn/marked-1.2.6
Bump marked from 1.2.5 to 1.2.6
2020-12-14 23:14:20 +01:00
MoonE
d6dc7c4883 Merge pull request #11827 from openlayers/dependabot/npm_and_yarn/babel/core-7.12.10
Bump @babel/core from 7.12.9 to 7.12.10
2020-12-14 23:08:22 +01:00
dependabot-preview[bot]
d8a76ee6a3 Bump sinon from 9.2.1 to 9.2.2
Bumps [sinon](https://github.com/sinonjs/sinon) from 9.2.1 to 9.2.2.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/commits/v9.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-14 08:37:09 +00:00
dependabot-preview[bot]
1de44765f0 Bump copy-webpack-plugin from 6.3.2 to 6.4.0
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 6.3.2 to 6.4.0.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v6.3.2...v6.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-14 08:34:39 +00:00
dependabot-preview[bot]
fc1ae52378 Bump rollup from 2.34.2 to 2.35.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.34.2 to 2.35.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.34.2...v2.35.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-14 08:32:43 +00:00
dependabot-preview[bot]
bf8098192d Bump @babel/preset-env from 7.12.7 to 7.12.10
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.12.7 to 7.12.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.10/packages/babel-preset-env)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-14 08:30:42 +00:00
dependabot-preview[bot]
1fd8191d28 Bump marked from 1.2.5 to 1.2.6
Bumps [marked](https://github.com/markedjs/marked) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js)
- [Commits](https://github.com/markedjs/marked/compare/v1.2.5...v1.2.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-14 08:29:06 +00:00
dependabot-preview[bot]
c1f96ce534 Bump jsdoc-plugin-typescript from 2.0.5 to 2.0.6
Bumps [jsdoc-plugin-typescript](https://github.com/openlayers/jsdoc-plugin-typescript) from 2.0.5 to 2.0.6.
- [Release notes](https://github.com/openlayers/jsdoc-plugin-typescript/releases)
- [Commits](https://github.com/openlayers/jsdoc-plugin-typescript/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-14 08:26:59 +00:00
dependabot-preview[bot]
e2024e47b3 Bump typescript from 4.1.2 to 4.1.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-14 08:23:06 +00:00
dependabot-preview[bot]
5203d3b40e Bump ol-mapbox-style from 6.1.4 to 6.2.1
Bumps [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) from 6.1.4 to 6.2.1.
- [Release notes](https://github.com/openlayers/ol-mapbox-style/releases)
- [Changelog](https://github.com/openlayers/ol-mapbox-style/blob/master/CHANGELOG.md)
- [Commits](https://github.com/openlayers/ol-mapbox-style/compare/v6.1.4...v6.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-14 08:20:47 +00:00
dependabot-preview[bot]
6d76c4c87e Bump @babel/core from 7.12.9 to 7.12.10
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.12.9 to 7.12.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.10/packages/babel-core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-14 08:18:31 +00:00
Andreas Hocevar
49f03cf719 Merge pull request #11811 from mike-000/patch-6
Better getPointResolution default when no transform available
2020-12-13 22:33:09 +01:00
MoonE
797d2cc5d1 Merge pull request #11821 from MoonE/draw-finish-condition
Call the finishCondition when drawing points / circles
2020-12-11 20:51:12 +01:00
Andreas Hocevar
6cfe914841 Merge pull request #11824 from ahocevar/units
Add Units back to API docs
2020-12-11 15:48:06 +01:00
Andreas Hocevar
ec509caa78 Add Units back to API docs 2020-12-11 10:32:49 +01:00
Andreas Hocevar
a1cac71d32 Merge pull request #11820 from openlayers/dependabot/npm_and_yarn/ini-1.3.7
[Security] Bump ini from 1.3.5 to 1.3.7
2020-12-11 08:22:35 +01:00
Maximilian Krög
bd4622940e Call the finishCondition when drawing points / circles 2020-12-11 00:29:30 +01:00
dependabot-preview[bot]
c0bb3c9462 [Security] Bump ini from 1.3.5 to 1.3.7
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. **This update includes a security fix.**
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-10 17:24:01 +00:00
Andreas Hocevar
6c6b559ce4 Merge pull request #11817 from greggian/select-stop-propagation
stopPropagation support for PluggableMap
2020-12-10 16:15:25 +01:00
mike-000
51db8f9308 Test projections without transforms 2020-12-10 11:22:40 +00:00
mike-000
a9adb1850f Test projections without transforms 2020-12-10 11:18:46 +00:00
mike-000
519e10b361 tidier comments 2020-12-09 22:47:38 +00:00
Greg Gianforcaro
9c2b0677fa stopPropagation/preventDefault on originalEvent
Move stopPropagation/preventDefault to directly target the
originalEvent rather than the mapBrowserEvent.
2020-12-09 11:42:53 -05:00
Andreas Hocevar
fb9c239d72 Merge pull request #11809 from openlayers/dependabot/npm_and_yarn/yargs-16.2.0
Bump yargs from 16.1.1 to 16.2.0
2020-12-09 09:16:13 +01:00
Andreas Hocevar
09c4856a2b Merge pull request #11808 from openlayers/dependabot/npm_and_yarn/worker-loader-3.0.6
Bump worker-loader from 3.0.5 to 3.0.6
2020-12-09 09:15:17 +01:00
Andreas Hocevar
1cebbb2d71 Merge pull request #11807 from openlayers/dependabot/npm_and_yarn/eslint-7.15.0
Bump eslint from 7.14.0 to 7.15.0
2020-12-09 09:14:41 +01:00
Andreas Hocevar
bb515e24e6 Merge pull request #11806 from openlayers/dependabot/npm_and_yarn/rollup-2.34.2
Bump rollup from 2.34.0 to 2.34.2
2020-12-09 09:13:31 +01:00
Greg Gianforcaro
92f93e8e94 Resolve some test failures 2020-12-09 01:17:19 -05:00
Greg Gianforcaro
99f23caf03 Initial stopPropagation support for PluggableMap 2020-12-09 00:46:56 -05:00
Andreas Hocevar
f3ad86e8e4 Merge pull request #11815 from ahocevar/draw-regression
Remove unnecessary line that breaks drawing with multi-touch
2020-12-08 22:49:10 +01:00
Andreas Hocevar
0286b1c737 Add regression test 2020-12-08 19:47:18 +01:00
Andreas Hocevar
c557b2e7bb Remove unnecessary line that breaks drawing with multi-touch 2020-12-08 18:53:17 +01:00
Andreas Hocevar
38585d6945 Merge pull request #11800 from ahocevar/remove-last-point
Fix removeLastPoint when removing last point
2020-12-08 16:23:30 +01:00
Andreas Hocevar
ecb9778fbf Set sketch cursor to last appended coordinate 2020-12-08 16:16:14 +01:00
mike-000
884799db20 Add ScaleLine (based on projection units) 2020-12-08 14:01:20 +00:00
Andreas Hocevar
0bd04eafe0 Pass around pixels/coords to fix appendCoordinates 2020-12-08 14:52:36 +01:00
Andreas Hocevar
ec53d4fc57 Remove no longer needed checks for coordinates.length 2020-12-08 14:52:35 +01:00
Andreas Hocevar
651c1aa6c4 Fix removeLastPoint when removing last point 2020-12-08 14:52:35 +01:00
mike-000
2bb8aa0f32 Better default when no transform available
Do not use identityTransform for EPSG:4326 transform unless units are degrees
2020-12-07 17:32:08 +00:00
dependabot-preview[bot]
5af1a1dee7 Bump yargs from 16.1.1 to 16.2.0
Bumps [yargs](https://github.com/yargs/yargs) from 16.1.1 to 16.2.0.
- [Release notes](https://github.com/yargs/yargs/releases)
- [Changelog](https://github.com/yargs/yargs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs/compare/v16.1.1...v16.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-07 07:22:34 +00:00
dependabot-preview[bot]
64120ddde0 Bump worker-loader from 3.0.5 to 3.0.6
Bumps [worker-loader](https://github.com/webpack-contrib/worker-loader) from 3.0.5 to 3.0.6.
- [Release notes](https://github.com/webpack-contrib/worker-loader/releases)
- [Changelog](https://github.com/webpack-contrib/worker-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/worker-loader/compare/v3.0.5...v3.0.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-07 07:20:54 +00:00
dependabot-preview[bot]
b08608b2db Bump eslint from 7.14.0 to 7.15.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.14.0 to 7.15.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.14.0...v7.15.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-07 07:19:37 +00:00
dependabot-preview[bot]
a25c2ce548 Bump rollup from 2.34.0 to 2.34.2
Bumps [rollup](https://github.com/rollup/rollup) from 2.34.0 to 2.34.2.
- [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.34.0...v2.34.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-07 07:17:17 +00:00
Andreas Hocevar
62c7853ed7 Merge pull request #11769 from ahocevar/modify-dx
Modify interaction developer experience improvements
2020-12-07 00:11:36 +01:00
Andreas Hocevar
ed3c45d3f8 Fix tolerance typo 2020-12-06 22:12:13 +01:00
Andreas Hocevar
b6eb429f77 Always drag using pointer location, not vertex location 2020-12-06 18:11:15 +01:00
Andreas Hocevar
0e15720f2e Make use of the Modify interaction's overlay source 2020-12-06 17:02:04 +01:00
Andreas Hocevar
44e054d528 When hit detected, only consider hit node 2020-12-06 16:51:15 +01:00
Andreas Hocevar
630a72f222 Fix API docs
Co-authored-by: MoonE <maxi_kroeg@web.de>
2020-12-06 16:51:15 +01:00
Andreas Hocevar
1473731854 Use existing collection 2020-12-06 16:51:15 +01:00
Andreas Hocevar
18d15879bf Reuse featuresBeingModified_ collection 2020-12-06 16:51:15 +01:00
Andreas Hocevar
128d20abf3 Simpler API with hitDetection option 2020-12-06 16:51:15 +01:00
Andreas Hocevar
d0a1c10cec Add example for Modify with hit detection 2020-12-06 16:51:14 +01:00
Andreas Hocevar
9b31deb38f Simplify API and code 2020-12-06 16:51:14 +01:00
Andreas Hocevar
db6eb040d2 Improve documentation 2020-12-06 16:51:14 +01:00
Andreas Hocevar
314724d880 Add geometries property to vertex feature 2020-12-06 16:51:14 +01:00
Andreas Hocevar
ec9dde88f9 Add features property to vertex feature 2020-12-06 16:51:14 +01:00
Andreas Hocevar
6874bfaaef Report features actually being modified, not all 2020-12-06 16:51:13 +01:00
Andreas Hocevar
b3bcfb5b41 Modify with hit detection support 2020-12-06 16:51:13 +01:00
MoonE
ea91d41be9 Merge pull request #11803 from MoonE/modify-fix-vertex-insertion
Modify fix vertex insertion
2020-12-06 16:47:41 +01:00
Maximilian Krög
c4dd6e6b04 Fixes Modify vertex insertion with duplicate segments
If one feature has duplicate segments it prevented insertion for other
features with the same segment.
2020-12-06 15:43:18 +01:00
Maximilian Krög
190b20ebce Add vertex insertion test for modify interaction 2020-12-06 15:43:14 +01:00
MoonE
1dddb3f58a Merge pull request #11783 from MoonE/hitdetect-indexes
Cache hit detect indexes and check closest pixels first.
2020-12-03 21:24:35 +01:00
Andreas Hocevar
77e6c3a4ab Merge pull request #11791 from ahocevar/pepjs-readme
Now that pepjs was updated, we can point to the official package
2020-12-02 08:24:36 +01:00
Maximilian Krög
23dc768c2e Order callback calls by distance to click position
All callback calls for hits with a tolerance > 0 are queued and
called ordered by distance after all hits are detected.
2020-12-01 23:21:59 +01:00
Maximilian Krög
4546eff66e Also use hitTolerance to select tiles to search 2020-12-01 20:21:15 +01:00
Maximilian Krög
cde2dac19f Skip executor groups when tile does not contain coordinates 2020-12-01 20:21:13 +01:00
Andreas Hocevar
f3a7703194 Hit tolerance priority example 2020-12-01 20:20:04 +01:00
Maximilian Krög
c076d273e7 Cache hit detect indexes and check closest pixels first. 2020-12-01 20:19:58 +01:00
Andreas Hocevar
810cdd9865 Now that pepjs was updated, we can point to the official package 2020-12-01 16:24:54 +01:00
Andreas Hocevar
aec4c60c4a Merge pull request #11786 from openlayers/dependabot/npm_and_yarn/rollup-2.34.0
Bump rollup from 2.33.3 to 2.34.0
2020-12-01 15:48:31 +01:00
Frédéric Junod
4a985f43c5 Merge pull request #11790 from openlayers/attrib_swisstopo_wms
Fix attributions links for WMS layers from swisstopo
2020-12-01 15:29:29 +01:00
Frederic Junod
6d04c360be Fix attributions links for WMS layers from swisstopo 2020-12-01 13:48:32 +01:00
Andreas Hocevar
dcaa7096bb Merge pull request #11787 from openlayers/dependabot/npm_and_yarn/babel-loader-8.2.2
Bump babel-loader from 8.2.1 to 8.2.2
2020-12-01 10:09:30 +01:00
Andreas Hocevar
4c9fb319aa Merge pull request #11785 from openlayers/dependabot/npm_and_yarn/babel/core-7.12.9
Bump @babel/core from 7.12.7 to 7.12.9
2020-12-01 10:08:06 +01:00
Andreas Hocevar
8ceaadc7c8 Merge pull request #11781 from ahocevar/hitdetect-geometry
Pass geometry to forEachFeatureAtPixel callback
2020-12-01 09:59:43 +01:00
dependabot-preview[bot]
a41576187d Bump babel-loader from 8.2.1 to 8.2.2
Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.2.1 to 8.2.2.
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v8.2.1...v8.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-30 07:12:31 +00:00
dependabot-preview[bot]
a0cefa9525 Bump rollup from 2.33.3 to 2.34.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.33.3 to 2.34.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.33.3...v2.34.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-30 07:11:22 +00:00
dependabot-preview[bot]
4141549a15 Bump @babel/core from 7.12.7 to 7.12.9
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.12.7 to 7.12.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.9/packages/babel-core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-30 07:10:24 +00:00
Andreas Hocevar
512642f8e2 Document geometry argument of the feature callback for internal use 2020-11-29 00:39:55 +01:00
Andreas Hocevar
8cc78acde9 Merge pull request #11778 from ahocevar/hit-tolerance-pixel-ratio
No need to adjust hitTolerance for pixel ratio twice
2020-11-29 00:09:23 +01:00
Andreas Hocevar
fe36ff4ee3 Clarify change in changelog 2020-11-29 00:02:39 +01:00
Andreas Hocevar
4e885181b5 Fix forEachFeatureAtPixel apidoc output 2020-11-28 23:55:25 +01:00
Andreas Hocevar
db89da6e15 Update changelog 2020-11-28 09:18:17 +01:00
Andreas Hocevar
5659397b39 No need to adjust hitTolerance for pixel ratio 2020-11-28 09:18:17 +01:00
Andreas Hocevar
950894c542 Merge pull request #11780 from M393/dragbox-add-cancel-event
Add a cancel event to the DragBox interaction
2020-11-27 23:53:54 +01:00
Andreas Hocevar
817b77ad54 Merge pull request #11779 from mike-000/patch-16
Restore Mode.CIRCLE in Draw interaction
2020-11-27 23:51:17 +01:00
Maximilian Krög
b93a57156c Add a cancel event to the dragbox interaction 2020-11-27 15:02:39 +01:00
Andreas Hocevar
28aaa2e0d3 Pass geometry to forEachFeatureAtPixel callback 2020-11-27 13:43:28 +01:00
mike-000
c0875e38e7 Restore Mode.CIRCLE 2020-11-27 11:42:51 +00:00
Andreas Hocevar
7b5f53753b Merge pull request #11753 from mike-000/patch-15
Use Mode.LINE_STRING in Draw interaction for Circle geometries
2020-11-25 13:47:17 +01:00
mike-000
919c711756 New function createOrUpdateCustomSketchLine_ 2020-11-25 12:06:34 +00:00
mike-000
8898d540fa New function createOrUpdateCustomSketchLine_
New function for duplicated code handling sketch line for custom polygons
2020-11-25 11:59:32 +00:00
Andreas Hocevar
ab0b24b0da Merge pull request #11767 from mike-000/patch-13
Improve documentation of geometry rotation
2020-11-25 00:00:39 +01:00
mike-000
f8df533cb0 Use Mode.LINE_STRING for Circle geometries
Make predefined geometry functions compatible with removeLastPoint
Add undo to example
Make geometry function for Star compatible with use of removeLastPoint
Additional createRegularPolygon tests
2020-11-24 10:39:28 +00:00
Andreas Hocevar
20ccdc56b8 Merge pull request #11755 from ahocevar/view-padding
Add padding option for View
2020-11-24 09:10:57 +01:00
Andreas Hocevar
cd0db0784f Merge pull request #11762 from openlayers/dependabot/npm_and_yarn/typescript-4.1.2
Bump typescript from 4.0.5 to 4.1.2
2020-11-23 19:35:03 +01:00
Andreas Hocevar
a0604c9cc3 Use new Geolocation types 2020-11-23 17:28:31 +01:00
Andreas Hocevar
6d6735fe0a Merge pull request #11764 from openlayers/dependabot/npm_and_yarn/copy-webpack-plugin-6.3.2
Bump copy-webpack-plugin from 6.3.1 to 6.3.2
2020-11-23 17:12:36 +01:00
Andreas Hocevar
6390c101d1 Merge pull request #11758 from openlayers/dependabot/npm_and_yarn/rollup-2.33.3
Bump rollup from 2.33.2 to 2.33.3
2020-11-23 17:11:50 +01:00
Andreas Hocevar
f69e8d8ecd Merge pull request #11761 from openlayers/dependabot/npm_and_yarn/babel/core-7.12.7
Bump @babel/core from 7.12.3 to 7.12.7
2020-11-23 17:10:17 +01:00
dependabot-preview[bot]
4ae0d1000a Bump rollup from 2.33.2 to 2.33.3
Bumps [rollup](https://github.com/rollup/rollup) from 2.33.2 to 2.33.3.
- [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.33.2...v2.33.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-23 15:33:31 +00:00
Andreas Hocevar
dd5cf2810b Merge pull request #11760 from openlayers/dependabot/npm_and_yarn/proj4-2.6.3
Bump proj4 from 2.6.2 to 2.6.3
2020-11-23 16:31:08 +01:00
Andreas Hocevar
a9f00c918c Merge pull request #11763 from openlayers/dependabot/npm_and_yarn/eslint-7.14.0
Bump eslint from 7.13.0 to 7.14.0
2020-11-23 16:29:54 +01:00
dependabot-preview[bot]
cdf3a42d4d Bump @babel/core from 7.12.3 to 7.12.7
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.12.3 to 7.12.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.7/packages/babel-core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-23 15:28:53 +00:00
dependabot-preview[bot]
29a7909833 Bump proj4 from 2.6.2 to 2.6.3
Bumps [proj4](https://github.com/proj4js/proj4js) from 2.6.2 to 2.6.3.
- [Release notes](https://github.com/proj4js/proj4js/releases)
- [Changelog](https://github.com/proj4js/proj4js/blob/master/changelog.md)
- [Commits](https://github.com/proj4js/proj4js/compare/2.6.2...2.6.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-23 15:27:06 +00:00
Andreas Hocevar
64d2893ace Merge pull request #11759 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.12.7
Bump @babel/preset-env from 7.12.1 to 7.12.7
2020-11-23 16:26:34 +01:00
Andreas Hocevar
0116d69fbd Merge pull request #11757 from openlayers/dependabot/npm_and_yarn/marked-1.2.5
Bump marked from 1.2.4 to 1.2.5
2020-11-23 16:25:10 +01:00
Andreas Hocevar
982db9178a Merge pull request #11756 from openlayers/dependabot/npm_and_yarn/puppeteer-5.5.0
Bump puppeteer from 5.4.1 to 5.5.0
2020-11-23 16:24:42 +01:00
mike-000
1c529a9e2f document rotation direction 2020-11-23 14:41:30 +00:00
mike-000
540e5faa74 document rotation direction 2020-11-23 14:41:19 +00:00
mike-000
35266c47a3 document fromCircle angle direction and 0 2020-11-23 14:35:40 +00:00
Andreas Hocevar
231390a1f0 Handle center constraint properly 2020-11-23 13:12:32 +01:00
dependabot-preview[bot]
d3ade77b4a Bump copy-webpack-plugin from 6.3.1 to 6.3.2
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 6.3.1 to 6.3.2.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v6.3.1...v6.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-23 08:06:33 +00:00
dependabot-preview[bot]
e7b06c412c Bump eslint from 7.13.0 to 7.14.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.13.0 to 7.14.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.13.0...v7.14.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-23 08:05:06 +00:00
dependabot-preview[bot]
ad9a7a152b Bump typescript from 4.0.5 to 4.1.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.5 to 4.1.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.5...v4.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-23 08:03:49 +00:00
dependabot-preview[bot]
a3aa400cbd Bump @babel/preset-env from 7.12.1 to 7.12.7
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.12.1 to 7.12.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.7/packages/babel-preset-env)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-23 07:59:40 +00:00
dependabot-preview[bot]
fa17e40c85 Bump marked from 1.2.4 to 1.2.5
Bumps [marked](https://github.com/markedjs/marked) from 1.2.4 to 1.2.5.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js)
- [Commits](https://github.com/markedjs/marked/compare/v1.2.4...v1.2.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-23 07:57:33 +00:00
dependabot-preview[bot]
cc87e508b9 Bump puppeteer from 5.4.1 to 5.5.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 5.4.1 to 5.5.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/v5.4.1...v5.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-23 07:56:21 +00:00
Andreas Hocevar
0e2d17b9c6 Add padding option for View 2020-11-22 18:52:46 +01:00
Andreas Hocevar
9d255be87c Merge pull request #11754 from ahocevar/compass-typo
Fix typo that prevents Rotate icon from indicating the view rotation
2020-11-22 10:44:41 +01:00
Andreas Hocevar
19aeed3e3c Fix typo that prevents Rotate icon from indicating the view rotation 2020-11-22 10:35:31 +01:00
Andreas Hocevar
dd95f56e26 Merge pull request #11719 from ahocevar/less-aggressie-3857-clamping
Clamp EPSG:3857 y to lowest/highest possible value instead of validity extent
2020-11-19 13:51:47 +01:00
Andreas Hocevar
698fca2d56 Merge pull request #11737 from ahocevar/esrijson-wkid
Write the correct SRS code in EsriJSON
2020-11-19 13:50:56 +01:00
Andreas Hocevar
e44f23f806 Merge pull request #11749 from ahocevar/snap-tolerance
Document that snapTolerance must be greater than 0
2020-11-18 12:45:03 +01:00
Andreas Hocevar
f1c8c0770d Merge pull request #11750 from mike-000/patch-14
Update TMS tileUrlFunction example in ol/source/XYZ documentation
2020-11-18 12:44:40 +01:00
mike-000
d42b7d4fba Update TMS tileUrlFunction example 2020-11-18 11:11:06 +00:00
mike-000
d4f7b40b95 Update TMS tileUrlFunction example 2020-11-18 10:44:41 +00:00
Andreas Hocevar
9885b79509 Document that snapTolerance must be greater than 0 2020-11-18 10:44:41 +01:00
Andreas Hocevar
f054971bae Merge pull request #11739 from boeckMt/fix-layer-at-pixel-image
Fix: Check for layer extent in CanvasLayerRenderer.getDataAtPixel
2020-11-16 14:53:45 +01:00
Mathias Boeck
eb41939474 Add test for layer hit on cross-origin canvas 2020-11-16 14:17:06 +01:00
Mathias Boeck
a92bc2755d Check if render pixel is in the layer extent 2020-11-16 14:13:21 +01:00
Andreas Hocevar
a9f2dde2c9 Merge pull request #11748 from mike-000/patch-13
Add fetch and TextDecoder to polyfill list in README
2020-11-16 14:05:15 +01:00
Andreas Hocevar
168e7d7923 Merge pull request #11740 from ger-benjamin/wfs_bbox_per_feature_type_11187
Wfs bbox per feature type
2020-11-16 13:58:50 +01:00
Benjamin Gerber
d807f13a93 Add featureTypesBbox option on WFS writeGetFeature
Add a possibility to provide one specific bbox per feature type
on WFS writeGetFeature. This option results to one query node
per featureTypesBbox item. One query node, for one feature type,
will have a specific bbox filter and every query node will share
the same others filters (if a filter option is defined).
2020-11-16 12:59:30 +01:00
mike-000
9101b2723a Add fetch and TextDecoder to polyfills 2020-11-16 11:00:56 +00:00
Andreas Hocevar
70ec0a1fad Merge pull request #11747 from openlayers/dependabot/npm_and_yarn/rollup-2.33.2
Bump rollup from 2.33.1 to 2.33.2
2020-11-16 10:46:07 +01:00
Andreas Hocevar
dd2026796d Merge pull request #11746 from openlayers/dependabot/npm_and_yarn/babel-loader-8.2.1
Bump babel-loader from 8.1.0 to 8.2.1
2020-11-16 10:45:36 +01:00
Andreas Hocevar
d61080e667 Merge pull request #11745 from openlayers/dependabot/npm_and_yarn/yargs-16.1.1
Bump yargs from 16.1.0 to 16.1.1
2020-11-16 10:44:59 +01:00
Andreas Hocevar
e25ac4e299 Merge pull request #11744 from openlayers/dependabot/npm_and_yarn/webpack-dev-middleware-4.0.2
Bump webpack-dev-middleware from 4.0.0 to 4.0.2
2020-11-16 10:44:25 +01:00
Andreas Hocevar
e95c20ba04 Merge pull request #11743 from openlayers/dependabot/npm_and_yarn/copy-webpack-plugin-6.3.1
Bump copy-webpack-plugin from 6.3.0 to 6.3.1
2020-11-16 10:43:48 +01:00
Andreas Hocevar
fe8f2ffc2c Merge pull request #11742 from openlayers/dependabot/npm_and_yarn/marked-1.2.4
Bump marked from 1.2.3 to 1.2.4
2020-11-16 10:43:15 +01:00
dependabot-preview[bot]
774af34f27 Bump rollup from 2.33.1 to 2.33.2
Bumps [rollup](https://github.com/rollup/rollup) from 2.33.1 to 2.33.2.
- [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.33.1...v2.33.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-16 07:42:32 +00:00
dependabot-preview[bot]
8bbcf68890 Bump babel-loader from 8.1.0 to 8.2.1
Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.1.0 to 8.2.1.
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v8.1.0...v8.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-16 07:41:07 +00:00
dependabot-preview[bot]
974f2cbf66 Bump yargs from 16.1.0 to 16.1.1
Bumps [yargs](https://github.com/yargs/yargs) from 16.1.0 to 16.1.1.
- [Release notes](https://github.com/yargs/yargs/releases)
- [Changelog](https://github.com/yargs/yargs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs/compare/v16.1.0...v16.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-16 07:38:35 +00:00
dependabot-preview[bot]
f934c14f9f Bump webpack-dev-middleware from 4.0.0 to 4.0.2
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 4.0.0 to 4.0.2.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v4.0.0...v4.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-16 07:37:04 +00:00
dependabot-preview[bot]
56afb3f6af Bump copy-webpack-plugin from 6.3.0 to 6.3.1
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v6.3.0...v6.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-16 07:35:59 +00:00
dependabot-preview[bot]
846d8298a2 Bump marked from 1.2.3 to 1.2.4
Bumps [marked](https://github.com/markedjs/marked) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js)
- [Commits](https://github.com/markedjs/marked/compare/v1.2.3...v1.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-16 07:34:44 +00:00
Benjamin Gerber
843010bfcf Remove useless if statement on WFS writeGetFeature
Remove the if(options) {} statement as the options is not optional and
the further code expect to have this parameter.
2020-11-16 06:14:25 +01:00
Andreas Hocevar
11b9a0f5ed Merge pull request #11722 from ahocevar/text-align-rtl
Correct meaning of 'start' and 'end' text align for LTR text
2020-11-15 20:45:16 +01:00
Andreas Hocevar
66f8c580d1 Remove unnecessary property 2020-11-15 20:39:52 +01:00
Andreas Hocevar
911f08c57f Merge pull request #11741 from bz2/include_license
Include LICENSE.md in built package
2020-11-15 09:27:22 +01:00
Andreas Hocevar
0a5483043d Improve readability of rendering test 2020-11-15 09:22:22 +01:00
Andreas Hocevar
7232001d9f Regex with better distinction between LTR and RTL characters
Co-authored-by: MoonE <maxi_kroeg@web.de>
2020-11-15 08:59:43 +01:00
Martin Packman
a2a8c6dc87 Include LICENSE.md in built package
Copy LICENSE.md as well as README.md to build when preparing package.
These files are useful for tools that inspect node_modules for
dependency details.
2020-11-14 15:08:21 +00:00
Andreas Hocevar
8916667e94 Update ESRI editing example to use a different service 2020-11-12 17:08:26 +01:00
Andreas Hocevar
bc8f0252a7 Add test for when neither dataProjection nor featureProjection are set 2020-11-12 11:34:26 +01:00
Andreas Hocevar
619fd4965b Write the correct SRS code in EsriJSON 2020-11-12 11:20:49 +01:00
Benjamin Gerber
a56d9bbb51 Better doc for WFS writeGetFeature options.
The geometryName option is required if you set the bbox option.
2020-11-11 13:06:16 +01:00
Andreas Hocevar
db180c555e Merge pull request #11718 from ahocevar/draw-extend
Initialize sketch point on Draw#extend()
2020-11-11 09:40:42 +01:00
Andreas Hocevar
05b63869d5 Merge pull request #11732 from mike-000/patch-23
Replace readURI with readStyleURL for KML StyleURLs
2020-11-10 16:04:34 +01:00
mike-000
5d8212e48f Replace readURI with readStyleURL for StyleURLs
readStyleURL ensures URL begins with # if it does not contain one
Remove old partial fix
Test handling of missing # in StyleURL
2020-11-10 14:42:20 +00:00
Tim Schaub
739f7f4c39 Merge pull request #11723 from mike-000/patch-22
Drag and Drop Interaction support for formats that read ArrayBuffer sources
2020-11-09 14:29:05 -07:00
mike-000
c5cd29e2ac Link label to checkbox 2020-11-09 21:06:59 +00:00
mike-000
a6860118c7 Support formats that read ArrayBuffer sources
Drag-and-Drop support for formats that read arraybuffer sources
Add TextDecoder to polyfills
Add custom Drag-and-Drop examples for KMZ and MVT
Add sample download and KML styles option to existing example
Test arraybuffer and constructed formats
2020-11-09 17:02:31 +00:00
Andreas Hocevar
1273e68a38 Merge pull request #11731 from openlayers/dependabot/npm_and_yarn/mocha-8.2.1
Bump mocha from 8.2.0 to 8.2.1
2020-11-09 09:33:26 +01:00
dependabot-preview[bot]
fd1314a85d Bump mocha from 8.2.0 to 8.2.1
Bumps [mocha](https://github.com/mochajs/mocha) from 8.2.0 to 8.2.1.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.2.0...v8.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 07:43:13 +00:00
Andreas Hocevar
1226fdfcca Merge pull request #11730 from openlayers/dependabot/npm_and_yarn/marked-1.2.3
Bump marked from 1.2.2 to 1.2.3
2020-11-09 08:40:52 +01:00
Andreas Hocevar
70541c0497 Merge pull request #11729 from openlayers/dependabot/npm_and_yarn/eslint-7.13.0
Bump eslint from 7.12.1 to 7.13.0
2020-11-09 08:40:13 +01:00
Andreas Hocevar
c3b9e949bd Merge pull request #11728 from openlayers/dependabot/npm_and_yarn/webpack-cli-4.2.0
Bump webpack-cli from 4.1.0 to 4.2.0
2020-11-09 08:39:20 +01:00
Andreas Hocevar
abaaace885 Merge pull request #11727 from openlayers/dependabot/npm_and_yarn/karma-firefox-launcher-2.1.0
Bump karma-firefox-launcher from 2.0.0 to 2.1.0
2020-11-09 08:34:50 +01:00
Andreas Hocevar
96b5d8148b Merge pull request #11726 from openlayers/dependabot/npm_and_yarn/copy-webpack-plugin-6.3.0
Bump copy-webpack-plugin from 6.2.1 to 6.3.0
2020-11-09 08:33:55 +01:00
dependabot-preview[bot]
207e5ebeea Bump marked from 1.2.2 to 1.2.3
Bumps [marked](https://github.com/markedjs/marked) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js)
- [Commits](https://github.com/markedjs/marked/compare/v1.2.2...v1.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 07:29:22 +00:00
dependabot-preview[bot]
5b57aa8617 Bump eslint from 7.12.1 to 7.13.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.12.1 to 7.13.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.12.1...v7.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 07:27:42 +00:00
dependabot-preview[bot]
085e93e799 Bump webpack-cli from 4.1.0 to 4.2.0
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.1.0...webpack-cli@4.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 07:26:53 +00:00
dependabot-preview[bot]
c1367d2dd3 Bump karma-firefox-launcher from 2.0.0 to 2.1.0
Bumps [karma-firefox-launcher](https://github.com/karma-runner/karma-firefox-launcher) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/karma-runner/karma-firefox-launcher/releases)
- [Changelog](https://github.com/karma-runner/karma-firefox-launcher/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma-firefox-launcher/compare/v2.0.0...v2.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 07:25:30 +00:00
dependabot-preview[bot]
8e1ed424f6 Bump copy-webpack-plugin from 6.2.1 to 6.3.0
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 6.2.1 to 6.3.0.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v6.2.1...v6.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-09 07:24:26 +00:00
Tim Schaub
bc75ad495e Merge pull request #11724 from MoonE/tilesources-add-transition-option
Add transition option to OSM and CartoDB sources, document default
2020-11-08 11:19:14 -07:00
Maximilian Krög
2ebe90f9d3 Add transition option to OSM and CartoDB sources, document default 2020-11-07 22:37:10 +01:00
Andreas Hocevar
7cc45c967b Correct meaning of 'start' and 'end' text align for LTR text 2020-11-06 18:13:50 +01:00
Andreas Hocevar
bdd343e87b Merge pull request #11721 from mike-000/patch-21
Handle empty Z coordinates in KML
2020-11-06 13:38:06 +01:00
Andreas Hocevar
946d11269f Merge pull request #11587 from MoonE/fix-text-along-path-orientation
Determine orientation by actual text start and end x
2020-11-06 13:35:55 +01:00
mike-000
6bc0bf8640 Test reading XY and empty Z coordinates 2020-11-06 10:32:39 +00:00
mike-000
f4654ff146 Handle empty Z coordinates 2020-11-06 10:19:29 +00:00
Andreas Hocevar
2a46063d1f Merge pull request #11720 from ahocevar/winding-order-algorithm
Return to simpler and less efficient winding order algorithm
2020-11-06 10:48:46 +01:00
Andreas Hocevar
c1a547a9af Return to simpler and less efficient winding order algorithm 2020-11-06 00:02:01 +01:00
Andreas Hocevar
2526dc738c More straithgforward calculation of MAX_SAFE_Y
Co-authored-by: MoonE <maxi_kroeg@web.de>
2020-11-05 23:11:56 +01:00
Maximilian Krög
b3968a4219 Change textpath tests to work with changed method / return. 2020-11-05 22:35:54 +01:00
Maximilian Krög
b6ee7084c9 Fix stroke for text along path wiht negative x scale 2020-11-05 22:35:54 +01:00
Maximilian Krög
03f6cbb5a8 Draw substrings on straight line in one operation 2020-11-05 22:35:54 +01:00
Maximilian Krög
528833b05b Don't iterate each chracter if entire string fits in single segment 2020-11-05 22:35:54 +01:00
Andreas Hocevar
9804dc8fa3 Clamp to lowest/highest possible value instead of validity extent 2020-11-05 21:51:05 +01:00
Andreas Hocevar
df261f6e0f Initialize sketch point on Draw#extend() 2020-11-05 18:27:40 +01:00
Andreas Hocevar
9c5e61ffb0 Merge pull request #11715 from ahocevar/legacy-full
Add all symbols to the legacy build
2020-11-05 10:46:30 +01:00
Andreas Hocevar
f242b7d618 Update inline comments 2020-11-05 10:40:45 +01:00
Tim Schaub
7f51bce311 Merge pull request #11716 from mike-000/patch-20
Treat svg as binary resource
2020-11-04 18:31:31 -07:00
mike-000
1f991b980b Treat svg as binary resource 2020-11-04 20:59:54 +00:00
Andreas Hocevar
68d6a6b84c Add all symbols to the legacy build 2020-11-04 19:56:24 +01:00
Andreas Hocevar
00415c6774 Merge pull request #11708 from openlayers/dependabot/npm_and_yarn/rollup-2.33.1
Bump rollup from 2.32.1 to 2.33.1
2020-11-04 10:30:37 +01:00
Andreas Hocevar
95c3ef7a20 Merge pull request #11705 from openlayers/dependabot/npm_and_yarn/webpack-dev-middleware-4.0.0
Bump webpack-dev-middleware from 3.7.2 to 4.0.0
2020-11-04 10:29:49 +01:00
Andreas Hocevar
d9e0ddeb75 Exit process when done 2020-11-04 10:24:14 +01:00
Andreas Hocevar
7519641d98 Use express for webpack-dev-middleware requirement 2020-11-03 23:11:24 +01:00
Tim Schaub
9182bdcb33 Merge pull request #11706 from openlayers/dependabot/npm_and_yarn/url-polyfill-1.1.12
Bump url-polyfill from 1.1.11 to 1.1.12
2020-11-03 06:36:30 -07:00
dependabot-preview[bot]
9e09070a9f Bump rollup from 2.32.1 to 2.33.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.32.1 to 2.33.1.
- [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.32.1...v2.33.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-03 13:36:28 +00:00
Tim Schaub
10dc59e43e Merge pull request #11707 from openlayers/dependabot/npm_and_yarn/typescript-4.0.5
Bump typescript from 4.0.3 to 4.0.5
2020-11-03 06:35:43 -07:00
Tim Schaub
f18b8f51e4 Merge pull request #11709 from openlayers/dependabot/npm_and_yarn/sinon-9.2.1
Bump sinon from 9.2.0 to 9.2.1
2020-11-03 06:34:59 -07:00
Tim Schaub
8821ce8109 Merge pull request #11710 from openlayers/dependabot/npm_and_yarn/puppeteer-5.4.1
Bump puppeteer from 5.4.0 to 5.4.1
2020-11-03 06:34:09 -07:00
Tim Schaub
c67b9c76f4 Merge pull request #11711 from openlayers/dependabot/npm_and_yarn/eslint-7.12.1
Bump eslint from 7.12.0 to 7.12.1
2020-11-03 06:32:52 -07:00
Andreas Hocevar
5380a93aea Remove options that are no longer valid 2020-11-02 19:49:38 +01:00
Andreas Hocevar
88fa3942d8 Merge pull request #11698 from ahocevar/draw-pointer
Draw pointer improvements
2020-11-02 18:40:12 +01:00
Andreas Hocevar
4fe8c54146 Input is a void element
Co-authored-by: Tim Schaub <tschaub@users.noreply.github.com>
2020-11-02 11:14:25 +01:00
Andreas Hocevar
5b9ec1607d Move stats option to parent config 2020-11-02 09:28:53 +01:00
dependabot-preview[bot]
c823223bb7 Bump eslint from 7.12.0 to 7.12.1
Bumps [eslint](https://github.com/eslint/eslint) from 7.12.0 to 7.12.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.12.0...v7.12.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-02 07:39:47 +00:00
dependabot-preview[bot]
fe4a298d9f Bump puppeteer from 5.4.0 to 5.4.1
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 5.4.0 to 5.4.1.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/v5.4.0...v5.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-02 07:38:50 +00:00
dependabot-preview[bot]
0aee677248 Bump sinon from 9.2.0 to 9.2.1
Bumps [sinon](https://github.com/sinonjs/sinon) from 9.2.0 to 9.2.1.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-02 07:37:19 +00:00
dependabot-preview[bot]
60f5125fd5 Bump typescript from 4.0.3 to 4.0.5
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.3 to 4.0.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.3...v4.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-02 07:35:02 +00:00
dependabot-preview[bot]
37273096d3 Bump url-polyfill from 1.1.11 to 1.1.12
Bumps [url-polyfill](https://github.com/lifaon74/url-polyfill) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/lifaon74/url-polyfill/releases)
- [Commits](https://github.com/lifaon74/url-polyfill/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-02 07:34:03 +00:00
dependabot-preview[bot]
40cec8be6a Bump webpack-dev-middleware from 3.7.2 to 4.0.0
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 3.7.2 to 4.0.0.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v3.7.2...v4.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-02 07:33:08 +00:00
Andreas Hocevar
0ac52b2511 Merge pull request #11490 from mike-000/patch-13
iconUrlFunction option for ol/format/KML
2020-11-01 11:02:38 +01:00
Andreas Hocevar
4980e58db0 Add undo to draw-features example 2020-10-31 11:58:52 +01:00
Andreas Hocevar
48f357d518 Visual feedback for removeLastPoint() on touch devices 2020-10-29 22:06:51 +01:00
Andreas Hocevar
23a544aa30 Only draw when one pointer is active 2020-10-29 20:00:12 +01:00
Tim Schaub
a1a59b4408 Merge pull request #11689 from openlayers/dependabot/npm_and_yarn/pngjs-6.0.0
Bump pngjs from 5.0.0 to 6.0.0
2020-10-28 06:47:23 -06:00
Andreas Hocevar
b55d50d141 Merge pull request #11628 from simonseyock/vector-source-load-events
VectorSource load events
2020-10-27 19:42:45 +01:00
dependabot-preview[bot]
5d12f471a7 Bump pngjs from 5.0.0 to 6.0.0
Bumps [pngjs](https://github.com/lukeapage/pngjs) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/lukeapage/pngjs/releases)
- [Commits](https://github.com/lukeapage/pngjs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-27 13:01:43 +00:00
Tim Schaub
22cf7a162b Merge pull request #11686 from openlayers/dependabot/npm_and_yarn/shx-0.3.3
Bump shx from 0.3.2 to 0.3.3
2020-10-27 06:59:47 -06:00
Tim Schaub
f4c604c621 Merge pull request #11683 from openlayers/dependabot/npm_and_yarn/puppeteer-5.4.0
Bump puppeteer from 5.3.1 to 5.4.0
2020-10-27 06:59:10 -06:00
Tim Schaub
95ba9a6584 Merge pull request #11682 from openlayers/dependabot/npm_and_yarn/karma-firefox-launcher-2.0.0
Bump karma-firefox-launcher from 1.3.0 to 2.0.0
2020-10-27 06:52:38 -06:00
dependabot-preview[bot]
02549e0269 Bump puppeteer from 5.3.1 to 5.4.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Commits](https://github.com/puppeteer/puppeteer/compare/v5.3.1...v5.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-27 12:52:02 +00:00
dependabot-preview[bot]
990bf0739b Bump shx from 0.3.2 to 0.3.3
Bumps [shx](https://github.com/shelljs/shx) from 0.3.2 to 0.3.3.
- [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.2...v0.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-27 12:51:33 +00:00
Tim Schaub
e44fb25e27 Merge pull request #11684 from openlayers/dependabot/npm_and_yarn/marked-1.2.2
Bump marked from 1.2.0 to 1.2.2
2020-10-27 06:51:12 -06:00
Tim Schaub
5789355fb1 Merge pull request #11685 from openlayers/dependabot/npm_and_yarn/rollup-2.32.1
Bump rollup from 2.32.0 to 2.32.1
2020-10-27 06:50:35 -06:00
Tim Schaub
4abc55e396 Merge pull request #11688 from openlayers/dependabot/npm_and_yarn/webpack-cli-4.1.0
Bump webpack-cli from 4.0.0 to 4.1.0
2020-10-27 06:49:43 -06:00
Tim Schaub
612c399193 Merge pull request #11687 from openlayers/dependabot/npm_and_yarn/eslint-7.12.0
Bump eslint from 7.11.0 to 7.12.0
2020-10-27 06:48:51 -06:00
Simon Seyock
9b6114b768 Added clearer documentation 2020-10-27 09:35:38 +01:00
Andreas Hocevar
3e22d46e27 Merge pull request #11691 from ahocevar/parcel2
Use Parcel v2 in copy/paste example code
2020-10-26 18:28:19 +01:00
Andreas Hocevar
aa918d44c5 Use Parcel v2 in copy/paste example code 2020-10-26 11:55:14 +01:00
dependabot-preview[bot]
d3a2d08cd0 Bump webpack-cli from 4.0.0 to 4.1.0
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.0.0...webpack-cli@4.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-26 07:31:44 +00:00
dependabot-preview[bot]
bbcdbd89e0 Bump eslint from 7.11.0 to 7.12.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.11.0 to 7.12.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.11.0...v7.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-26 07:29:56 +00:00
dependabot-preview[bot]
47d7964e85 Bump rollup from 2.32.0 to 2.32.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.32.0 to 2.32.1.
- [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.32.0...v2.32.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-26 07:28:23 +00:00
dependabot-preview[bot]
0163ffd066 Bump marked from 1.2.0 to 1.2.2
Bumps [marked](https://github.com/markedjs/marked) from 1.2.0 to 1.2.2.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js)
- [Commits](https://github.com/markedjs/marked/compare/v1.2.0...v1.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-26 07:27:43 +00:00
dependabot-preview[bot]
e02414a89d Bump karma-firefox-launcher from 1.3.0 to 2.0.0
Bumps [karma-firefox-launcher](https://github.com/karma-runner/karma-firefox-launcher) from 1.3.0 to 2.0.0.
- [Release notes](https://github.com/karma-runner/karma-firefox-launcher/releases)
- [Changelog](https://github.com/karma-runner/karma-firefox-launcher/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma-firefox-launcher/compare/v1.3.0...v2.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-26 07:25:46 +00:00
Simon Seyock
1bafab49f5 Added FEATURELOADSTART, FEATURELOADEND and FEATURELOADERROR events. 2020-10-25 21:38:57 +01:00
Andreas Hocevar
f4469934b8 Merge pull request #11673 from ahocevar/no-multitouch-as-doubleclick
Do not emulate dblclick and slingleclick on multi-touch
2020-10-22 11:00:38 +02:00
Andreas Hocevar
b9dd297293 Merge pull request #11676 from mike-000/patch-18
Fix countries.geojson Antarctica polygon so it wraps correctly
2020-10-22 08:39:26 +02:00
mike-000
672c8afb0b Fix Antarctica polygon so it wraps correctly 2020-10-21 23:04:41 +01:00
Andreas Hocevar
de1b4ddb97 Improve tests and fix singleclick 2020-10-21 16:40:16 +02:00
Andreas Hocevar
63a784531d Do not emulate dblclick on multi-touch 2020-10-21 00:44:25 +02:00
Maximilian Krög
7660f3c522 Determine orientation by actual text start and end x 2020-10-20 22:46:04 +02:00
Andreas Hocevar
9c964ce6de Merge pull request #11646 from ahocevar/unique-tile-key
Ensure a unique tile key for each tile coordinate
2020-10-20 21:12:04 +02:00
Andreas Hocevar
ee980276b6 Merge pull request #11655 from ahocevar/vectortile-image-mode-docs
Fix documentation of image render mode for vector tile layers
2020-10-20 21:09:06 +02:00
Andreas Hocevar
0c876c06be Merge pull request #11668 from tapioko/main
Don't try to get image data for zero sized images
2020-10-19 16:05:22 +02:00
Tapio Koskinen
3983500601 Don't try to get image data for zero sized images
Otherwise "context.getImageData(0, 0, width, height)" throws an exception.
2020-10-19 13:57:30 +03:00
Andreas Hocevar
aad9cf4641 Merge pull request #11666 from openlayers/dependabot/npm_and_yarn/worker-loader-3.0.5
Bump worker-loader from 3.0.4 to 3.0.5
2020-10-19 11:49:16 +02:00
Andreas Hocevar
7600988429 Merge pull request #11665 from openlayers/dependabot/npm_and_yarn/url-polyfill-1.1.11
Bump url-polyfill from 1.1.10 to 1.1.11
2020-10-19 11:48:12 +02:00
Andreas Hocevar
e67b1740f1 Merge pull request #11664 from openlayers/dependabot/npm_and_yarn/babel/core-7.12.3
Bump @babel/core from 7.11.6 to 7.12.3
2020-10-19 11:47:33 +02:00
Andreas Hocevar
151a53932b Merge pull request #11663 from openlayers/dependabot/npm_and_yarn/yargs-16.1.0
Bump yargs from 16.0.3 to 16.1.0
2020-10-19 11:46:56 +02:00
Andreas Hocevar
3d9bc2586e Merge pull request #11662 from openlayers/dependabot/npm_and_yarn/mocha-8.2.0
Bump mocha from 8.1.3 to 8.2.0
2020-10-19 11:46:15 +02:00
Andreas Hocevar
ef5b15bb29 Merge pull request #11661 from openlayers/dependabot/npm_and_yarn/rollup-2.32.0
Bump rollup from 2.29.0 to 2.32.0
2020-10-19 11:45:14 +02:00
dependabot-preview[bot]
da71413420 Bump @babel/core from 7.11.6 to 7.12.3
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.6 to 7.12.3.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.3/packages/babel-core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-19 09:31:08 +00:00
Andreas Hocevar
ce7e4ca477 Merge pull request #11660 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.12.1
Bump @babel/preset-env from 7.11.5 to 7.12.1
2020-10-19 11:28:20 +02:00
Andreas Hocevar
f9dab60ca0 Merge pull request #11648 from virtualcitySYSTEMS/dwithin
Dwithin filter
2020-10-19 11:18:44 +02:00
Jannes Bolling
6b86c5f78d recreate old during filter behaviour for backwardscompatibility 2020-10-19 10:37:13 +02:00
dependabot-preview[bot]
34cb510a91 Bump worker-loader from 3.0.4 to 3.0.5
Bumps [worker-loader](https://github.com/webpack-contrib/worker-loader) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/webpack-contrib/worker-loader/releases)
- [Changelog](https://github.com/webpack-contrib/worker-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/worker-loader/compare/v3.0.4...v3.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-19 07:29:18 +00:00
dependabot-preview[bot]
c2022dbc2a Bump url-polyfill from 1.1.10 to 1.1.11
Bumps [url-polyfill](https://github.com/lifaon74/url-polyfill) from 1.1.10 to 1.1.11.
- [Release notes](https://github.com/lifaon74/url-polyfill/releases)
- [Commits](https://github.com/lifaon74/url-polyfill/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-19 07:27:56 +00:00
dependabot-preview[bot]
9bc0a657a5 Bump yargs from 16.0.3 to 16.1.0
Bumps [yargs](https://github.com/yargs/yargs) from 16.0.3 to 16.1.0.
- [Release notes](https://github.com/yargs/yargs/releases)
- [Changelog](https://github.com/yargs/yargs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs/compare/v16.0.3...v16.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-19 07:25:55 +00:00
dependabot-preview[bot]
b691a6e1c0 Bump mocha from 8.1.3 to 8.2.0
Bumps [mocha](https://github.com/mochajs/mocha) from 8.1.3 to 8.2.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.1.3...v8.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-19 07:24:45 +00:00
dependabot-preview[bot]
44fd6ddfff Bump rollup from 2.29.0 to 2.32.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.29.0 to 2.32.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.29.0...v2.32.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-19 07:23:53 +00:00
dependabot-preview[bot]
538337da52 Bump @babel/preset-env from 7.11.5 to 7.12.1
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.11.5 to 7.12.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.1/packages/babel-preset-env)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-19 07:23:16 +00:00
Andreas Hocevar
f102e11bbe Merge pull request #11658 from MoonE/webpack-dev-server
Make webpack dev server run with current version
2020-10-18 19:48:47 +02:00
Maximilian Krög
a5202523b9 Make webpack dev server run with current version 2020-10-17 21:11:31 +02:00
Andreas Hocevar
bfeeba2194 Merge pull request #11590 from sbrunner/export-type
Export all the Event sub class
2020-10-17 20:38:54 +02:00
Andreas Hocevar
0ef2421e22 Merge pull request #11594 from mike-000/patch-14
Display current OS copyright date in the Raster Reprojection example
2020-10-17 20:34:42 +02:00
Marc Jansen
4e0f510b48 Merge pull request #11657 from mike-000/patch-17
Use https to avoid security warnings
2020-10-17 15:58:54 +02:00
mike-000
8289d2a516 use https to avoid security warnings 2020-10-17 13:17:29 +01:00
Andreas Hocevar
ffdece9dac Fix documentation of image render mode for vector tile layers 2020-10-16 10:31:39 +02:00
Jannes Bolling
b271536b8b fix Filter namespace handling for WFS 2.0 requests 2020-10-15 18:50:55 +02:00
Andreas Hocevar
582856bbd1 Merge pull request #11649 from ahocevar/units-proj4-longlat
Deal with undefined units from proj4 longlat projections
2020-10-15 16:44:35 +02:00
Andreas Hocevar
527a8ca810 Deal with undefined units from proj4 longlat projections 2020-10-15 00:03:00 +02:00
Jannes Bolling
7261e25566 fix distanceWithin for WFS2.0 2020-10-14 19:09:26 +02:00
Jannes Bolling
259f1e371f refactor spatial filter serialization 2020-10-14 18:32:26 +02:00
Jannes Bolling
ab43047e7a add new DistanceWithin Filter 2020-10-14 18:15:54 +02:00
Andreas Hocevar
7d6e6fda28 Use a unique key for all tile classes 2020-10-13 22:35:12 +02:00
Tim Schaub
d4acf2ce10 Merge pull request #11643 from openlayers/dependabot/npm_and_yarn/terser-webpack-plugin-4.2.3
Bump terser-webpack-plugin from 4.2.2 to 4.2.3
2020-10-13 05:38:13 -06:00
Tim Schaub
1c66e9854d Merge pull request #11645 from openlayers/dependabot/npm_and_yarn/webpack-cli-4.0.0
Bump webpack-cli from 3.3.12 to 4.0.0
2020-10-13 04:48:05 -06:00
Tim Schaub
630da927fd Merge pull request #11644 from openlayers/dependabot/npm_and_yarn/copy-webpack-plugin-6.2.1
Bump copy-webpack-plugin from 6.2.0 to 6.2.1
2020-10-13 04:46:43 -06:00
Tim Schaub
f7983a04eb Merge pull request #11642 from openlayers/dependabot/npm_and_yarn/sinon-9.2.0
Bump sinon from 9.1.0 to 9.2.0
2020-10-13 04:44:12 -06:00
Tim Schaub
5467d016f7 Merge pull request #11641 from openlayers/dependabot/npm_and_yarn/rollup-2.29.0
Bump rollup from 2.28.2 to 2.29.0
2020-10-13 04:43:10 -06:00
Tim Schaub
1d8b0d3712 Merge pull request #11640 from openlayers/dependabot/npm_and_yarn/worker-loader-3.0.4
Bump worker-loader from 3.0.3 to 3.0.4
2020-10-13 04:42:33 -06:00
Tim Schaub
cc07c08a15 Merge pull request #11639 from openlayers/dependabot/npm_and_yarn/eslint-7.11.0
Bump eslint from 7.10.0 to 7.11.0
2020-10-13 04:41:45 -06:00
dependabot-preview[bot]
7127543a60 Bump webpack-cli from 3.3.12 to 4.0.0
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 3.3.12 to 4.0.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/v3.3.12...webpack-cli@4.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-12 07:35:49 +00:00
dependabot-preview[bot]
6c750ae510 Bump copy-webpack-plugin from 6.2.0 to 6.2.1
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v6.2.0...v6.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-12 07:34:14 +00:00
dependabot-preview[bot]
993efe9830 Bump terser-webpack-plugin from 4.2.2 to 4.2.3
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 4.2.2 to 4.2.3.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v4.2.2...v4.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-12 07:32:29 +00:00
dependabot-preview[bot]
81581b5e45 Bump sinon from 9.1.0 to 9.2.0
Bumps [sinon](https://github.com/sinonjs/sinon) from 9.1.0 to 9.2.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v9.1.0...v9.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-12 07:31:10 +00:00
dependabot-preview[bot]
f70610396e Bump rollup from 2.28.2 to 2.29.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.28.2 to 2.29.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.28.2...v2.29.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-12 07:30:10 +00:00
dependabot-preview[bot]
45f9c55cc1 Bump worker-loader from 3.0.3 to 3.0.4
Bumps [worker-loader](https://github.com/webpack-contrib/worker-loader) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/webpack-contrib/worker-loader/releases)
- [Changelog](https://github.com/webpack-contrib/worker-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/worker-loader/compare/v3.0.3...v3.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-12 07:28:32 +00:00
dependabot-preview[bot]
72d06d3bb0 Bump eslint from 7.10.0 to 7.11.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.10.0 to 7.11.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.10.0...v7.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-12 07:27:20 +00:00
Andreas Hocevar
de5287a9ec Merge pull request #11403 from cazacugmihai/main
#11402 add CSS class name support for control buttons
2020-10-10 19:41:06 +02:00
Andreas Hocevar
eba0ba6ae0 Merge pull request #11592 from ahocevar/new-declutter
New decluttering implementation
2020-10-07 10:33:33 +02:00
Simon Seyock
393e83cd29 Extending FeatureLoader type and refactoring loadFeaturesXhr 2020-10-06 10:29:07 +02:00
Andreas Hocevar
c9ebf79df5 Add types and comments to make combined image+text decluttering clearer 2020-10-05 19:17:22 +02:00
Tim Schaub
67b683f38b Merge pull request #11622 from openlayers/dependabot/npm_and_yarn/sinon-9.1.0
Bump sinon from 9.0.3 to 9.1.0
2020-10-05 09:04:01 -06:00
Tim Schaub
8b92ee20f5 Merge pull request #11623 from openlayers/dependabot/npm_and_yarn/copy-webpack-plugin-6.2.0
Bump copy-webpack-plugin from 6.1.1 to 6.2.0
2020-10-05 09:03:13 -06:00
Maximilian Krög
187a216379 Do not draw empty text styles
This fixes a rendering/flicker issue when an empty text style is decluttered
together with an image style.
2020-10-05 12:20:04 +02:00
dependabot-preview[bot]
a465dd01fc Bump copy-webpack-plugin from 6.1.1 to 6.2.0
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 6.1.1 to 6.2.0.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v6.1.1...v6.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-05 07:34:22 +00:00
dependabot-preview[bot]
8c45984dc4 Bump sinon from 9.0.3 to 9.1.0
Bumps [sinon](https://github.com/sinonjs/sinon) from 9.0.3 to 9.1.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v9.0.3...v9.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-05 07:32:53 +00:00
Andreas Hocevar
1ec6713f31 Merge pull request #11618 from mike-000/patch-16
Update the Marker Animation example
2020-10-04 17:45:49 +02:00
Marc Jansen
f3d92f013b Merge pull request #11620 from MoonE/examples-code-add-charset
Add charset to the examples html below the map
2020-10-03 21:56:49 +02:00
Maximilian Krög
fc67d8302b Add charset to the examples html below the map 2020-10-03 21:31:38 +02:00
mike-000
f8c24590b9 Fetch the polyline and smoother animation
Fetch the polyline and use getCoordinateAt() for smooth animation
2020-10-03 19:30:56 +01:00
Olivier Guyot
0af823fc74 Merge pull request #11613 from elnabo/main
Allow mouse input if map is rendered in an other window
2020-10-02 10:59:50 +02:00
elnabo
81103c9253 Allow mouse input if map is rendered in an other window 2020-10-02 09:39:19 +02:00
Andreas Hocevar
aa69c5d3aa Merge pull request #11597 from MoonE/select-interaction-performance
Improved performance when removing feature with only one Select
2020-09-30 13:09:49 +02:00
Andreas Hocevar
df67924f33 Merge pull request #11607 from mike-000/patch-15
Reset attributions control to collapsible when no uncollapsible sources are visible
2020-09-30 13:04:27 +02:00
mike-000
cb77784d2a also restore collapsed state to last user setting 2020-09-30 10:36:53 +01:00
Andreas Hocevar
06637d8fb1 Merge pull request #11609 from M393/modify-interaction-insert-only-one-vertex
Modify interaction insert only one vertex
2020-09-29 20:41:17 +02:00
Maximilian Krög
6a5c3bde62 Do not insert more than one point per geometry at once 2020-09-29 10:52:35 +02:00
Maximilian Krög
bf33bd0703 Add Modify test for identical line segments of same geometry 2020-09-29 10:52:35 +02:00
Maximilian Krög
edb3b5f4fd The vertex is always the same, no need to store it with the segment 2020-09-29 10:52:35 +02:00
Andreas Hocevar
0387399554 Merge pull request #11605 from ahocevar/release-tile-canvas
Remove context references when releasing tiles
2020-09-29 09:31:43 +02:00
Andreas Hocevar
e7aa36019e Merge pull request #11603 from openlayers/dependabot/npm_and_yarn/rollup-2.28.2
Bump rollup from 2.28.1 to 2.28.2
2020-09-28 15:24:47 +02:00
Andreas Hocevar
1f371e1eeb Merge pull request #11602 from openlayers/dependabot/npm_and_yarn/marked-1.2.0
Bump marked from 1.1.1 to 1.2.0
2020-09-28 15:14:45 +02:00
dependabot-preview[bot]
169ace6f00 Bump rollup from 2.28.1 to 2.28.2
Bumps [rollup](https://github.com/rollup/rollup) from 2.28.1 to 2.28.2.
- [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.28.1...v2.28.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-28 13:12:24 +00:00
Andreas Hocevar
5c96cd60bb Merge pull request #11601 from openlayers/dependabot/npm_and_yarn/puppeteer-5.3.1
Bump puppeteer from 5.3.0 to 5.3.1
2020-09-28 15:10:05 +02:00
mike-000
09a1dd43c6 reset to collapsible when no uncollapsible sources 2020-09-28 14:05:23 +01:00
Andreas Hocevar
eee837bc70 Merge pull request #11600 from openlayers/dependabot/npm_and_yarn/eslint-7.10.0
Bump eslint from 7.9.0 to 7.10.0
2020-09-28 13:34:00 +02:00
Andreas Hocevar
a0963e9720 Merge pull request #11599 from openlayers/dependabot/npm_and_yarn/worker-loader-3.0.3
Bump worker-loader from 3.0.2 to 3.0.3
2020-09-28 13:33:33 +02:00
Andreas Hocevar
9ce60c85c8 Merge pull request #11598 from openlayers/dependabot/npm_and_yarn/karma-5.2.3
Bump karma from 5.2.2 to 5.2.3
2020-09-28 13:32:51 +02:00
Andreas Hocevar
4c8de423af Remove context references when releasing tiles 2020-09-28 12:20:07 +02:00
dependabot-preview[bot]
f43f5e9637 Bump marked from 1.1.1 to 1.2.0
Bumps [marked](https://github.com/markedjs/marked) from 1.1.1 to 1.2.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Commits](https://github.com/markedjs/marked/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-28 07:22:55 +00:00
dependabot-preview[bot]
a0b1a218fe Bump puppeteer from 5.3.0 to 5.3.1
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Commits](https://github.com/puppeteer/puppeteer/compare/v5.3.0...v5.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-28 07:22:07 +00:00
dependabot-preview[bot]
59eef7a5d2 Bump eslint from 7.9.0 to 7.10.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.9.0 to 7.10.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.9.0...v7.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-28 07:21:22 +00:00
dependabot-preview[bot]
c31a524969 Bump worker-loader from 3.0.2 to 3.0.3
Bumps [worker-loader](https://github.com/webpack-contrib/worker-loader) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/webpack-contrib/worker-loader/releases)
- [Changelog](https://github.com/webpack-contrib/worker-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/worker-loader/compare/v3.0.2...v3.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-28 07:20:46 +00:00
dependabot-preview[bot]
030ff1ba07 Bump karma from 5.2.2 to 5.2.3
Bumps [karma](https://github.com/karma-runner/karma) from 5.2.2 to 5.2.3.
- [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/v5.2.2...v5.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-28 07:19:48 +00:00
Maximilian Krög
65fc3ca2ca Improved performance when removing feature with only one Select 2020-09-28 01:00:07 +02:00
Andreas Hocevar
3198642cec Use locally available font for rendering test 2020-09-27 21:13:27 +02:00
Maximilian Krög
f63d0741b9 Add rendering test for multipoint with icon and text 2020-09-27 21:13:27 +02:00
Andreas Hocevar
8e862766fc New decluttering implementation 2020-09-27 21:13:26 +02:00
mike-000
9e8d49e485 Display current OS copyright date
Display current OS copyright date to keep up with source updates https://www.arcgis.com/home/item.html?id=7561029c176d43d09a5aa1180ada309a
Increase EPSG:27700 extent beyond the usual definition to the visible extent of the OS Overview layer
2020-09-27 15:14:59 +01:00
Andreas Hocevar
689711607f Merge pull request #11591 from kannes/patch-2
Make permalink example less complex
2020-09-25 23:14:43 +02:00
Hannes
2e87ae3421 use .toFixed() instead of manual math 2020-09-25 22:10:25 +02:00
Hannes
47ae47d123 zoom can actually be fractional nowadays 2020-09-25 22:06:20 +02:00
Stéphane Brunner
23e5c7ced8 Export all the Event sub class
Actually only some are exported

This is useful to type the received events
2020-09-25 13:15:49 +02:00
Andreas Hocevar
705e328fa0 Merge pull request #11569 from mike-000/patch-19
Fix binary data exports to codesandbox in examples
2020-09-24 09:21:05 +02:00
mike-000
c3378466fe in IE use textContent instead of innerText 2020-09-22 12:14:19 +01:00
Tim Schaub
f480252900 Merge pull request #11579 from mike-000/patch-14
Replace Animated GIF example globe gif
2020-09-21 04:59:18 -06:00
Tim Schaub
661c16a735 Merge pull request #11578 from openlayers/dependabot/npm_and_yarn/rollup-2.28.1
Bump rollup from 2.26.11 to 2.28.1
2020-09-21 04:58:52 -06:00
Tim Schaub
3b04abd7fa Merge pull request #11576 from openlayers/dependabot/npm_and_yarn/terser-webpack-plugin-4.2.2
Bump terser-webpack-plugin from 4.2.0 to 4.2.2
2020-09-21 04:53:46 -06:00
Tim Schaub
10d727e373 Merge pull request #11575 from openlayers/dependabot/npm_and_yarn/typescript-4.0.3
Bump typescript from 4.0.2 to 4.0.3
2020-09-21 04:52:55 -06:00
Tim Schaub
1093c1047f Merge pull request #11577 from openlayers/dependabot/npm_and_yarn/copy-webpack-plugin-6.1.1
Bump copy-webpack-plugin from 6.1.0 to 6.1.1
2020-09-21 04:48:21 -06:00
dependabot-preview[bot]
ec493029e0 Bump typescript from 4.0.2 to 4.0.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.2...v4.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 10:47:51 +00:00
dependabot-preview[bot]
79c3cda733 Bump terser-webpack-plugin from 4.2.0 to 4.2.2
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 4.2.0 to 4.2.2.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v4.2.0...v4.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 10:47:48 +00:00
Tim Schaub
c5b6775328 Merge pull request #11574 from openlayers/dependabot/npm_and_yarn/jsdoc-3.6.6
Bump jsdoc from 3.6.5 to 3.6.6
2020-09-21 04:46:46 -06:00
Tim Schaub
49efb82bde Merge pull request #11573 from openlayers/dependabot/npm_and_yarn/webpack-4.44.2
Bump webpack from 4.44.1 to 4.44.2
2020-09-21 04:45:22 -06:00
mike-000
20936508aa Replace globe gif
Use better quality image based on public domain landmask image at https://ian.macky.net/pat/map/globe.html and data at http://www.shadedrelief.com/natural3/pages/extra.html
2020-09-21 10:41:20 +01:00
dependabot-preview[bot]
7b35a4aa8f Bump rollup from 2.26.11 to 2.28.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.26.11 to 2.28.1.
- [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.26.11...v2.28.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 07:23:23 +00:00
dependabot-preview[bot]
214865aea9 Bump copy-webpack-plugin from 6.1.0 to 6.1.1
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v6.1.0...v6.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 07:22:28 +00:00
dependabot-preview[bot]
c58ce604dd Bump jsdoc from 3.6.5 to 3.6.6
Bumps [jsdoc](https://github.com/jsdoc/jsdoc) from 3.6.5 to 3.6.6.
- [Release notes](https://github.com/jsdoc/jsdoc/releases)
- [Changelog](https://github.com/jsdoc/jsdoc/blob/3.6.6/CHANGES.md)
- [Commits](https://github.com/jsdoc/jsdoc/compare/3.6.5...3.6.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 07:19:55 +00:00
dependabot-preview[bot]
8156a5e57c Bump webpack from 4.44.1 to 4.44.2
Bumps [webpack](https://github.com/webpack/webpack) from 4.44.1 to 4.44.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.44.1...v4.44.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 07:18:59 +00:00
Marc Jansen
163834d33e Merge pull request #11565 from mike-000/patch-17
Animated GIF example
2020-09-20 20:07:49 +02:00
mike-000
27bba85be9 Use public domain image
Derived from https://commons.wikimedia.org/wiki/File:Globe.gif using ezgif.com
2020-09-20 18:42:23 +01:00
mike-000
c18227df36 Add animated gif example 2020-09-20 14:47:33 +01:00
Tim Schaub
607b8fdd72 Merge pull request #11571 from mike-000/patch-20
Replace countryflags.io with flagcdn.com in the Style Renderer example
2020-09-19 22:44:51 -06:00
mike-000
190661bfdb Use flagcdn.com for images 2020-09-19 14:04:02 +01:00
Tim Schaub
1dae9b0ea2 Merge pull request #11568 from rgroothuijsen/OL-11178
Fix raster source crash bug when using multiple threads
2020-09-18 21:44:29 -06:00
Andreas Hocevar
7a5e0db59f Remove decluttering for a fresh start 2020-09-18 23:31:20 +02:00
mike-000
b60574261c Fix binary data, ./ relative path syntax, and IE 2020-09-17 22:09:31 +01:00
Rens Groothuijsen
1eea43e669 Add test for multiple raster threads 2020-09-17 22:48:31 +02:00
Andreas Hocevar
740e11f1fa Merge pull request #11563 from MoonE/multi-world-fix-end-world
Fix end world calculation if projection is not symmetric
2020-09-17 18:19:32 +02:00
Maximilian Krög
0996b37fe7 Fix end world calculation if projection is not symmetric 2020-09-17 00:12:15 +02:00
Maximilian Krög
2a81a7a236 Add rendering test for multi world 2020-09-17 00:12:15 +02:00
Olivier Guyot
7c5b118f23 Merge pull request #11561 from M393/view-constrain-center-after-fit
Constrain resolution when fit called without duration
2020-09-16 09:11:11 +02:00
Rens Groothuijsen
a691b1205e Send correct buffer slices to worker 2020-09-16 01:04:16 +02:00
Maximilian Krög
fbcf0b5009 Constrain resolution when fit called without duration 2020-09-15 17:52:22 +02:00
Maximilian Krög
90d816208c Add test for View.fit with extent set on View 2020-09-15 17:52:04 +02:00
Andreas Hocevar
2de80e04e4 Merge pull request #11559 from MoonE/multi-world-only-draw-visible
Only draw visible worlds
2020-09-15 10:06:01 +02:00
Maximilian Krög
85499d7daf Only draw visible worlds 2020-09-14 23:41:04 +02:00
Andreas Hocevar
429e857863 Merge pull request #11558 from openlayers/dependabot/npm_and_yarn/yargs-16.0.3
Bump yargs from 15.4.1 to 16.0.3
2020-09-14 11:11:03 +02:00
dependabot-preview[bot]
138dddf4d7 Bump yargs from 15.4.1 to 16.0.3
Bumps [yargs](https://github.com/yargs/yargs) from 15.4.1 to 16.0.3.
- [Release notes](https://github.com/yargs/yargs/releases)
- [Changelog](https://github.com/yargs/yargs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs/compare/v15.4.1...v16.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 08:57:54 +00:00
Andreas Hocevar
319f9df255 Merge pull request #11557 from openlayers/dependabot/npm_and_yarn/eslint-7.9.0
Bump eslint from 7.8.1 to 7.9.0
2020-09-14 10:56:28 +02:00
Andreas Hocevar
e69bbba152 Merge pull request #11556 from openlayers/dependabot/npm_and_yarn/puppeteer-5.3.0
Bump puppeteer from 5.2.1 to 5.3.0
2020-09-14 10:56:03 +02:00
Andreas Hocevar
7a3bb103f1 Merge pull request #11555 from openlayers/dependabot/npm_and_yarn/karma-5.2.2
Bump karma from 5.2.1 to 5.2.2
2020-09-14 10:55:38 +02:00
Andreas Hocevar
d95113bca1 Merge pull request #11554 from openlayers/dependabot/npm_and_yarn/terser-webpack-plugin-4.2.0
Bump terser-webpack-plugin from 4.1.0 to 4.2.0
2020-09-14 10:55:10 +02:00
Andreas Hocevar
098c694bd7 Merge pull request #11553 from openlayers/dependabot/npm_and_yarn/rollup-2.26.11
Bump rollup from 2.26.10 to 2.26.11
2020-09-14 10:54:46 +02:00
dependabot-preview[bot]
8ba75f799e Bump eslint from 7.8.1 to 7.9.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.8.1 to 7.9.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.8.1...v7.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 07:25:30 +00:00
dependabot-preview[bot]
ac45b3701f Bump puppeteer from 5.2.1 to 5.3.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 5.2.1 to 5.3.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Commits](https://github.com/puppeteer/puppeteer/compare/v5.2.1...v5.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 07:24:17 +00:00
dependabot-preview[bot]
cc92cca54f Bump karma from 5.2.1 to 5.2.2
Bumps [karma](https://github.com/karma-runner/karma) from 5.2.1 to 5.2.2.
- [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/v5.2.1...v5.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 07:23:19 +00:00
dependabot-preview[bot]
1a780108d6 Bump terser-webpack-plugin from 4.1.0 to 4.2.0
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v4.1.0...v4.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 07:22:23 +00:00
dependabot-preview[bot]
1baddf276e Bump rollup from 2.26.10 to 2.26.11
Bumps [rollup](https://github.com/rollup/rollup) from 2.26.10 to 2.26.11.
- [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.26.10...v2.26.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 07:21:44 +00:00
Andreas Hocevar
beefeaad1a Merge pull request #11519 from MoonE/multipoint-draw-only-visible
Do not draw multipoints outside render extent
2020-09-13 12:03:21 +02:00
Maximilian Krög
66ca8fbc13 Fix error when text placement is 'line' for point geometry 2020-09-12 21:30:28 +02:00
Maximilian Krög
fd28d5bb3d Simplify method signature for appendFlatPointCoordinates 2020-09-12 20:54:53 +02:00
Maximilian Krög
9ca9e73374 Declare variable when used 2020-09-12 20:54:53 +02:00
Maximilian Krög
df81f53eb5 Some simplifications 2020-09-12 20:54:53 +02:00
Andreas Hocevar
cd017ec2f6 Merge pull request #11532 from ahocevar/tilegrid-docs
Make TileGrid behave as documented with extent and sizes options
2020-09-12 20:14:45 +02:00
Maximilian Krög
3e4e21dc8d Only check if point is in extent for MultiPoint and TextLabels 2020-09-12 18:23:24 +02:00
Maximilian Krög
fb62e7928e Rename method used for lines. 2020-09-11 23:53:59 +02:00
Frédéric Junod
6b0471c2dc Merge pull request #11545 from fredj/webgl_className
Use the className param in ol.layer.Heatmap
2020-09-11 10:00:30 +02:00
Andreas Hocevar
f145082966 Merge pull request #11548 from ahocevar/bind-tileurlfunction
Bind tileUrlFunction before returning it from getTileUrlFunction
2020-09-11 09:43:07 +02:00
Andreas Hocevar
7957abd72d Merge pull request #11549 from ahocevar/no-root-node
Only use elementFromPoint with ShadowRoot
2020-09-11 09:41:52 +02:00
Frederic Junod
142fbc0811 Use the className param in ol.layer.Heatmap 2020-09-11 08:23:15 +02:00
Andreas Hocevar
fcf6072061 Merge pull request #11502 from jbelien/wmscapabilities/singlelayer
Fix issue with WMS Capabilities containing a single layer
2020-09-10 19:27:18 +02:00
Andreas Hocevar
feb88d1c0d Merge pull request #11540 from gberaudo/avoid_mvt_reprojection
Avoid unnecessary transform in the MVT format
2020-09-10 19:18:33 +02:00
Guillaume Beraudo
39fc6d7816 Avoid unnecessary transform in MVT format
When using ol.render.Feature there was a mandatory geometry transform.

With this change it is now easy to read features directly in the native tile projection.
Since there is no needed transform, there is no need either to define an extent and a world extent, for that use-case.
2020-09-10 17:13:30 +02:00
Andreas Hocevar
869206b33d Only use elementFromPoint with ShadowRoot 2020-09-10 11:22:33 +02:00
Andreas Hocevar
bff25f9ba4 Bind tileUrlFunction before returning it from getTileUrlFunction 2020-09-10 10:10:52 +02:00
Andreas Hocevar
87954dcee2 Add additional tests 2020-09-09 18:09:43 +02:00
Andreas Hocevar
0ec6674465 Merge pull request #11537 from mike-000/patch-16
Add rotation and rotateWithView to ol/style/Circle clone method and options
2020-09-09 18:00:08 +02:00
Andreas Hocevar
5b69af64e8 Merge pull request #11543 from sweco-dkjesh/main
wmts matrixset null pointer fix and improved handling of Identifier
2020-09-09 17:51:33 +02:00
Andreas Hocevar
0f8c8af833 Make TileGrid behave as documented with extent and sizes options 2020-09-09 16:07:33 +02:00
sweco-dkjesh
df8da1158f Lint 2020-09-09 13:30:14 +02:00
sweco-dkjesh
d409168940 Lint 2020-09-09 13:22:38 +02:00
sweco-dkjesh
bf86bcbee4 Lint 2020-09-09 13:13:58 +02:00
sweco-dkjesh
6ae62c3e93 Lint 2020-09-09 12:49:04 +02:00
sweco-dkjesh
132ce172ed null pointer fix and improved handling of Identifier
Fix nullpointer error when a matrixSet is not found in the matrixsetobj when matrix limits exist.
Also check for match by prepending matrixSetObj.Identifier which is supported by some wmts services.
2020-09-09 12:29:43 +02:00
Andreas Hocevar
915bca5114 Merge pull request #11509 from fgravin/proj-4326-identifier
Add urn:x-ogc:def:crs:EPSG:6.6:4326 as WGS84 proj identifier
2020-09-09 10:22:34 +02:00
Florent gravin
5d8aa85caa Use regexp replacements in ol.proj.get
This avoids to have to many redundant identifier definitions for each projection and ensure to cover most of the existing srsNames
2020-09-08 17:33:07 +02:00
mike-000
685040347b Add rotation and rotateWithView
Add rotation and rotateWithView to options and clone

Add rotation and rotateWithView to clone test
Also check that scale and displacement arrays are cloned
2020-09-08 16:23:45 +01:00
Andreas Hocevar
3d5f375d52 Merge pull request #11521 from ahocevar/integer-pixel-ratio-only
Do not use fractional pixel ratio for rendering vector tiles
2020-09-07 12:40:01 +02:00
Andreas Hocevar
7301259043 Merge pull request #11531 from openlayers/dependabot/npm_and_yarn/rollup-2.26.10
Bump rollup from 2.26.8 to 2.26.10
2020-09-07 11:08:53 +02:00
dependabot-preview[bot]
27dce8a4d9 Bump rollup from 2.26.8 to 2.26.10
Bumps [rollup](https://github.com/rollup/rollup) from 2.26.8 to 2.26.10.
- [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.26.8...v2.26.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-07 09:03:25 +00:00
Andreas Hocevar
da5e4ffbb6 Merge pull request #11530 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.11.5
Bump @babel/preset-env from 7.11.0 to 7.11.5
2020-09-07 11:01:43 +02:00
Andreas Hocevar
e429b16cb8 Merge pull request #11529 from openlayers/dependabot/npm_and_yarn/rollup-plugin-terser-7.0.2
Bump rollup-plugin-terser from 7.0.1 to 7.0.2
2020-09-07 11:01:11 +02:00
Andreas Hocevar
503af27b2c Merge pull request #11528 from openlayers/dependabot/npm_and_yarn/babel/core-7.11.6
Bump @babel/core from 7.11.4 to 7.11.6
2020-09-07 11:00:42 +02:00
Andreas Hocevar
7b022f2d30 Merge pull request #11526 from openlayers/dependabot/npm_and_yarn/eslint-7.8.1
Bump eslint from 7.7.0 to 7.8.1
2020-09-07 10:59:46 +02:00
Andreas Hocevar
8fa9f53db9 Merge pull request #11527 from openlayers/dependabot/npm_and_yarn/karma-5.2.1
Bump karma from 5.1.1 to 5.2.1
2020-09-07 10:59:24 +02:00
Andreas Hocevar
e4c0f95b11 Merge pull request #11525 from openlayers/dependabot/npm_and_yarn/copy-webpack-plugin-6.1.0
Bump copy-webpack-plugin from 6.0.4 to 6.1.0
2020-09-07 10:57:28 +02:00
dependabot-preview[bot]
567cfa16f3 Bump @babel/preset-env from 7.11.0 to 7.11.5
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.11.0 to 7.11.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.5/packages/babel-preset-env)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-07 07:29:50 +00:00
dependabot-preview[bot]
1d9f5fdc09 Bump rollup-plugin-terser from 7.0.1 to 7.0.2
Bumps [rollup-plugin-terser](https://github.com/TrySound/rollup-plugin-terser) from 7.0.1 to 7.0.2.
- [Release notes](https://github.com/TrySound/rollup-plugin-terser/releases)
- [Commits](https://github.com/TrySound/rollup-plugin-terser/compare/v7.0.1...v7.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-07 07:28:41 +00:00
dependabot-preview[bot]
6eaf1dab2b Bump @babel/core from 7.11.4 to 7.11.6
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.4 to 7.11.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.6/packages/babel-core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-07 07:27:55 +00:00
dependabot-preview[bot]
45f5eb4be8 Bump karma from 5.1.1 to 5.2.1
Bumps [karma](https://github.com/karma-runner/karma) from 5.1.1 to 5.2.1.
- [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/v5.1.1...v5.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-07 07:27:01 +00:00
dependabot-preview[bot]
9495b3ba06 Bump eslint from 7.7.0 to 7.8.1
Bumps [eslint](https://github.com/eslint/eslint) from 7.7.0 to 7.8.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.7.0...v7.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-07 07:25:41 +00:00
dependabot-preview[bot]
87370a3952 Bump copy-webpack-plugin from 6.0.4 to 6.1.0
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 6.0.4 to 6.1.0.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v6.0.4...v6.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-07 07:24:35 +00:00
Andreas Hocevar
3c7fa9a586 Do not use fractional pixel ratio for rendering vector tiles 2020-09-06 17:08:13 +02:00
Andreas Hocevar
4ddf5c0c3e Merge pull request #11517 from ahocevar/fix-clockwise-algorithm
Make clockwise check work when coordinates are duplicated
2020-09-05 18:26:09 +02:00
Andreas Hocevar
a9e51d85ec Fix Index adjustment at the beginning of the ring 2020-09-05 16:21:01 +02:00
Andreas Hocevar
82f1349dcf Merge pull request #11515 from openlayers/dependabot/npm_and_yarn/http-proxy-1.18.1
[Security] Bump http-proxy from 1.17.0 to 1.18.1
2020-09-04 22:05:07 +02:00
Andreas Hocevar
f2b790adf1 Make clockwise check work when coordinates are duplicated 2020-09-04 20:47:15 +02:00
dependabot-preview[bot]
04a7b66975 [Security] Bump http-proxy from 1.17.0 to 1.18.1
Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.17.0 to 1.18.1. **This update includes a security fix.**
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/http-party/node-http-proxy/compare/1.17.0...1.18.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-04 18:29:51 +00:00
Florent gravin
8eb5ac900d Add urn:x-ogc:def:crs:EPSG:6.6:4326 as WGS84 proj identifier 2020-09-03 15:42:56 +02:00
Andreas Hocevar
3a01e083c6 Merge pull request #11504 from openlayers/dependabot/npm_and_yarn/bl-4.0.3
[Security] Bump bl from 4.0.2 to 4.0.3
2020-09-02 18:57:43 +02:00
dependabot-preview[bot]
3108818267 [Security] Bump bl from 4.0.2 to 4.0.3
Bumps [bl](https://github.com/rvagg/bl) from 4.0.2 to 4.0.3. **This update includes a security fix.**
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](https://github.com/rvagg/bl/compare/v4.0.2...v4.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-02 15:30:16 +00:00
Andreas Hocevar
9d742e7782 Merge pull request #11501 from mike-000/patch-15
Empty this.canvas_ for all pixel ratios when render() is called
2020-09-01 22:54:56 +02:00
Jonathan Beliën
eec4b46ac1 Update WMSCapabilities.js 2020-09-01 12:06:22 +00:00
Jonathan Beliën
6a811ef767 Update WMS Capabilities tests
Add test for WMS service with one single layer.
2020-09-01 11:53:49 +00:00
Jonathan Beliën
9a021c8aa4 Update WMSCapabilities.js
Fix issue when there only one single layer.
2020-09-01 11:53:11 +00:00
mike-000
6cc063241a Use pixelRatio 2 2020-09-01 09:29:42 +01:00
mike-000
0807b44722 Clear this.canvas_ whenever render() is called 2020-09-01 09:27:17 +01:00
Olivier Guyot
2dd59b3536 Merge pull request #11471 from MichaelLangbein/WebGL-pre-and-postrender
Feature: added preRender and postRender methods to WebGLLayerRenderer…
2020-08-31 10:39:45 +02:00
Langbein, Michael
301e083dea Refactor unittest for WebGLPointsLayerRenderer
The test for the prerender and postrender events now uses a WebGLPointsLayer instead of a VectorLayer.
This is less confusing and probably closer to practical usage, too.
2020-08-31 10:29:42 +02:00
Andreas Hocevar
84097bf023 Merge pull request #11496 from openlayers/dependabot/npm_and_yarn/mocha-8.1.3
Bump mocha from 8.1.1 to 8.1.3
2020-08-31 10:07:03 +02:00
Andreas Hocevar
7649682680 Merge pull request #11495 from openlayers/dependabot/npm_and_yarn/rollup-plugin-terser-7.0.1
Bump rollup-plugin-terser from 7.0.0 to 7.0.1
2020-08-31 10:06:20 +02:00
Andreas Hocevar
116bb7b597 Merge pull request #11494 from openlayers/dependabot/npm_and_yarn/copy-webpack-plugin-6.0.4
Bump copy-webpack-plugin from 6.0.3 to 6.0.4
2020-08-31 10:05:43 +02:00
Andreas Hocevar
108bf63ca6 Merge pull request #11493 from openlayers/dependabot/npm_and_yarn/rollup-2.26.8
Bump rollup from 2.26.5 to 2.26.8
2020-08-31 10:05:06 +02:00
dependabot-preview[bot]
fb9f2b0069 Bump mocha from 8.1.1 to 8.1.3
Bumps [mocha](https://github.com/mochajs/mocha) from 8.1.1 to 8.1.3.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.1.1...v8.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-31 07:20:57 +00:00
dependabot-preview[bot]
669e0776b4 Bump rollup-plugin-terser from 7.0.0 to 7.0.1
Bumps [rollup-plugin-terser](https://github.com/TrySound/rollup-plugin-terser) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/TrySound/rollup-plugin-terser/releases)
- [Commits](https://github.com/TrySound/rollup-plugin-terser/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-31 07:19:19 +00:00
dependabot-preview[bot]
a2f9c83a39 Bump copy-webpack-plugin from 6.0.3 to 6.0.4
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 6.0.3 to 6.0.4.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v6.0.3...v6.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-31 07:18:03 +00:00
dependabot-preview[bot]
ad978c6667 Bump rollup from 2.26.5 to 2.26.8
Bumps [rollup](https://github.com/rollup/rollup) from 2.26.5 to 2.26.8.
- [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.26.5...v2.26.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-31 07:17:27 +00:00
Langbein, Michael
7808a8cb9a Implement unit-tests for WebGLLayerRenderer's new preRender and postRender methods.
The test only checks if the event is fired. It does not check for the properties of the RenderEvent object.
2020-08-30 13:20:18 +02:00
Langbein, Michael
a70ce2ca06 Implement preRender and postRender methods for WebGLLayerRenderer
This is required so that Renderers like WebGLPointsLayerRenderer can fire prerender and postrender events.
Problem described in [issue 11463](https://github.com/openlayers/openlayers/issues/11463).
2020-08-30 13:20:18 +02:00
Marc Jansen
17a5015750 Merge pull request #11491 from mike-000/patch-14
Cosmetic fix to doc (missing closing quote)
2020-08-28 23:47:27 +02:00
mike-000
f897503e10 Cosmetic fix to doc (missing closing quote) 2020-08-28 22:27:33 +01:00
mike-000
598f2bb508 Add iconUrlFunction option
Test iconUrlFunction option

remove @private
2020-08-28 22:12:58 +01:00
Andreas Hocevar
6582f87383 Merge pull request #11488 from michalzielanski/z-index-example-bug
"Layer Z-Index" example bugfix
2020-08-28 10:51:53 +02:00
Andreas Hocevar
a568aab309 Merge pull request #11486 from davidiamaf/davidiamaf-pixel-null-guard
guard for null
2020-08-28 10:22:02 +02:00
Michał Zielański
3ef02fd19d The star layer should not be assigned the z-index 2020-08-28 08:38:28 +02:00
davidiamaf
ce0d744a10 guard for null
against map.getPixelFromCoordinateInternal() returning null

Per https://github.com/openlayers/openlayers/issues/11478
2020-08-27 16:15:09 -04:00
Tim Schaub
218335d0c8 Merge pull request #11481 from michalzielanski/additional-props-in-cloned-geom
Adding original properties to cloned geometry
2020-08-27 08:23:46 -06:00
Michał Zielański
0001292a62 Method that copies properties from another object moved to the BaseObject class. Not using getProperties() to avoid creating an intermediate object that is not used later 2020-08-27 09:18:08 +02:00
Tim Schaub
849c8eafb4 Merge pull request #11404 from tschaub/codeql
Add security scan
2020-08-26 09:24:39 -06:00
Michał Zielański
8e0a61ac5f Adding original properties to cloned geometry 2020-08-26 15:11:11 +02:00
Andreas Hocevar
74e39a07de Merge pull request #11470 from ahocevar/readme
Fix pointer events polyfill link
2020-08-26 10:04:33 +02:00
Andreas Hocevar
bacf07ed51 Merge pull request #11467 from ahocevar/style-renderer
Style renderer example
2020-08-26 10:02:25 +02:00
Andreas Hocevar
eb92d0dcee Update description 2020-08-26 09:25:50 +02:00
Tim Schaub
6412b040c3 Use clip path 2020-08-26 09:24:56 +02:00
Tim Schaub
714e08761f Add security scan 2020-08-25 23:20:55 -06:00
Andreas Hocevar
62842d5508 Merge pull request #11455 from MoonE/apidoc-improvements
Apidoc improvements
2020-08-25 15:03:49 +02:00
Andreas Hocevar
963a084eb4 Merge pull request #11474 from haasz/haasz-module-import-fix
fix: modify rbush package import
2020-08-25 14:12:35 +02:00
Haász Sándor
02e0b1af11 fix: modify rbush package import 2020-08-25 13:27:48 +02:00
Andreas Hocevar
c37ec39dcd Merge pull request #11472 from ahocevar/typescript-4.0.2
Typescript 4.0.2
2020-08-25 13:16:59 +02:00
Andreas Hocevar
fda93cee23 Updates for TypeScript v4 2020-08-25 13:03:58 +02:00
dependabot-preview[bot]
53dee97af5 Bump typescript from 3.9.7 to 4.0.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.7 to 4.0.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.7...v4.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-25 12:33:37 +02:00
Andreas Hocevar
81811e3816 Fix pointer events polyfill link 2020-08-25 11:00:53 +02:00
Andreas Hocevar
9e7bbb0d4e Add custom style renderer example 2020-08-24 23:43:22 +02:00
Andreas Hocevar
a161ba82d9 Remove notes about custom renderer 2020-08-24 23:24:27 +02:00
Andreas Hocevar
bf455bc348 Merge pull request #11454 from ahocevar/vectortile-projection
VectorTile source projection has to match the view projection
2020-08-24 19:15:14 +02:00
Tim Schaub
cae42c6821 Merge pull request #11462 from openlayers/dependabot/npm_and_yarn/rollup-2.26.5
Bump rollup from 2.26.3 to 2.26.5
2020-08-24 07:29:08 -06:00
Tim Schaub
f566f8abcd Merge pull request #11460 from openlayers/dependabot/npm_and_yarn/karma-sourcemap-loader-0.3.8
Bump karma-sourcemap-loader from 0.3.7 to 0.3.8
2020-08-24 07:28:06 -06:00
Tim Schaub
f496db5094 Merge pull request #11459 from openlayers/dependabot/npm_and_yarn/ol-mapbox-style-6.1.4
Bump ol-mapbox-style from 6.1.3 to 6.1.4
2020-08-24 07:26:37 -06:00
Tim Schaub
5dabc1c3d3 Merge pull request #11458 from openlayers/dependabot/npm_and_yarn/worker-loader-3.0.2
Bump worker-loader from 3.0.1 to 3.0.2
2020-08-24 07:25:45 -06:00
Tim Schaub
8127f49d21 Merge pull request #11457 from openlayers/dependabot/npm_and_yarn/babel/core-7.11.4
Bump @babel/core from 7.11.1 to 7.11.4
2020-08-24 07:24:15 -06:00
dependabot-preview[bot]
c1523d2f62 Bump rollup from 2.26.3 to 2.26.5
Bumps [rollup](https://github.com/rollup/rollup) from 2.26.3 to 2.26.5.
- [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.26.3...v2.26.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 07:19:42 +00:00
dependabot-preview[bot]
cdb60c2d3a Bump karma-sourcemap-loader from 0.3.7 to 0.3.8
Bumps [karma-sourcemap-loader](https://github.com/demerzel3/karma-sourcemap-loader) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/demerzel3/karma-sourcemap-loader/releases)
- [Commits](https://github.com/demerzel3/karma-sourcemap-loader/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 07:18:13 +00:00
dependabot-preview[bot]
160bcd270f Bump ol-mapbox-style from 6.1.3 to 6.1.4
Bumps [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) from 6.1.3 to 6.1.4.
- [Release notes](https://github.com/openlayers/ol-mapbox-style/releases)
- [Changelog](https://github.com/openlayers/ol-mapbox-style/blob/master/CHANGELOG.md)
- [Commits](https://github.com/openlayers/ol-mapbox-style/compare/v6.1.3...v6.1.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 07:17:31 +00:00
dependabot-preview[bot]
20ad33aa9b Bump worker-loader from 3.0.1 to 3.0.2
Bumps [worker-loader](https://github.com/webpack-contrib/worker-loader) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/webpack-contrib/worker-loader/releases)
- [Changelog](https://github.com/webpack-contrib/worker-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/worker-loader/compare/v3.0.1...v3.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 07:16:39 +00:00
dependabot-preview[bot]
352e02afc8 Bump @babel/core from 7.11.1 to 7.11.4
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.1 to 7.11.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.4/packages/babel-core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 07:15:43 +00:00
Andreas Hocevar
6f0eec632f Use existing check for assertion 2020-08-23 18:23:52 +02:00
Maximilian Krög
f9ffd75132 dd / dt tag must be inside dl tags 2020-08-23 16:15:50 +02:00
Maximilian Krög
b33b2ce9a4 Don't generate empty nameContainer tag 2020-08-23 16:08:14 +02:00
Maximilian Krög
efdfb169aa Equal margin for horizontal line 2020-08-23 16:08:14 +02:00
Maximilian Krög
0a136afe15 Navigate to first search result on enter 2020-08-23 16:08:14 +02:00
Maximilian Krög
411d5bfb03 Charset meta tag should be in the first 1024 bytes 2020-08-23 16:08:14 +02:00
Maximilian Krög
477c331a4c Create source code links during apidoc creation 2020-08-23 16:08:14 +02:00
Andreas Hocevar
323fbca2e6 Merge pull request #11438 from MoonE/apidoc-navigation-scroll
Better scroll behaviour for apidocs
2020-08-23 12:46:24 +02:00
Andreas Hocevar
792e15124d VectorTile source projection has to match the view projection 2020-08-23 12:37:52 +02:00
Maximilian Krög
d74da75561 Graceful fallback for internet explorer 11 2020-08-23 12:21:47 +02:00
Maximilian Krög
d9bc466f43 Better scroll behaviour for apidocs 2020-08-23 11:18:19 +02:00
Andreas Hocevar
83055add03 Merge pull request #11446 from ahocevar/no-events-when-no-target
Checks before calling handleEvent on interactions
2020-08-18 16:17:31 +02:00
Andreas Hocevar
c55a3132a4 Checks before calling handleEvent on interactions 2020-08-18 15:39:53 +02:00
Andreas Hocevar
aa6d6b4d80 Merge pull request #11305 from megawac/avoid-crash-when-interaction-removed
PluggableMap: avoid crash when multiple interactions are removed
2020-08-18 13:21:47 +02:00
Andreas Hocevar
d674143cc4 Merge pull request #11443 from openlayers/dependabot/npm_and_yarn/eslint-7.7.0
Bump eslint from 7.6.0 to 7.7.0
2020-08-17 12:38:52 +02:00
Andreas Hocevar
da49bf7964 Merge pull request #11441 from openlayers/dependabot/npm_and_yarn/terser-webpack-plugin-4.1.0
Bump terser-webpack-plugin from 4.0.0 to 4.1.0
2020-08-17 12:38:17 +02:00
Andreas Hocevar
54ef456a1f Merge pull request #11440 from openlayers/dependabot/npm_and_yarn/rollup-2.26.3
Bump rollup from 2.23.1 to 2.26.3
2020-08-17 12:37:49 +02:00
Andreas Hocevar
2d4fcab041 Merge pull request #11439 from openlayers/dependabot/npm_and_yarn/sinon-9.0.3
Bump sinon from 9.0.2 to 9.0.3
2020-08-17 12:37:17 +02:00
Andreas Hocevar
c671224243 Merge pull request #11442 from openlayers/dependabot/npm_and_yarn/ol-mapbox-style-6.1.3
Bump ol-mapbox-style from 6.1.2 to 6.1.3
2020-08-17 12:08:26 +02:00
Frédéric Junod
702a8c0e34 Merge pull request #11433 from fredj/f_11432
Fix typo in module name
2020-08-17 11:42:48 +02:00
dependabot-preview[bot]
b6852b10ed Bump eslint from 7.6.0 to 7.7.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.6.0 to 7.7.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.6.0...v7.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 09:34:05 +00:00
dependabot-preview[bot]
74843dddd7 Bump ol-mapbox-style from 6.1.2 to 6.1.3
Bumps [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) from 6.1.2 to 6.1.3.
- [Release notes](https://github.com/openlayers/ol-mapbox-style/releases)
- [Changelog](https://github.com/openlayers/ol-mapbox-style/blob/master/CHANGELOG.md)
- [Commits](https://github.com/openlayers/ol-mapbox-style/compare/v6.1.2...v6.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 09:33:00 +00:00
dependabot-preview[bot]
97590bbf27 Bump terser-webpack-plugin from 4.0.0 to 4.1.0
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v4.0.0...v4.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 09:31:52 +00:00
dependabot-preview[bot]
197ed17ca0 Bump rollup from 2.23.1 to 2.26.3
Bumps [rollup](https://github.com/rollup/rollup) from 2.23.1 to 2.26.3.
- [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.23.1...v2.26.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 09:30:51 +00:00
dependabot-preview[bot]
a9754bcd9b Bump sinon from 9.0.2 to 9.0.3
Bumps [sinon](https://github.com/sinonjs/sinon) from 9.0.2 to 9.0.3.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v9.0.2...v9.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 09:29:55 +00:00
Tim Schaub
3c58b25670 Merge pull request #11419 from bjornharrtell/wfs2
WFS 2.0.0 support
2020-08-13 05:07:53 -06:00
Frederic Junod
e932233103 Fix typo in module name 2020-08-13 10:48:00 +02:00
Andreas Hocevar
f0170f378f Merge pull request #11418 from MoonE/icon-color-default-to-composite-operation
Icon color default to composite operation
2020-08-11 20:57:40 +02:00
Björn Harrtell
4eef96d5d8 Fix docs 2020-08-11 16:30:29 +02:00
Björn Harrtell
0bbde3d840 Tests for Transaction writes 2020-08-11 16:21:39 +02:00
Björn Harrtell
8cddfa0d22 Refactor tests 2020-08-11 16:14:39 +02:00
Björn Harrtell
1335937ddd Verified fix 2020-08-11 16:09:43 +02:00
Björn Harrtell
0484e45c89 Fix WFS 2.0.0 GetFeature response parsing 2020-08-11 15:46:40 +02:00
Björn Harrtell
01f355c37f Verify GetFeature with more complex filter 2020-08-10 21:30:06 +02:00
Graeme Yeates
d7a8e45294 PluggableMap: avoid crash when multiple interactions are removed 2020-08-10 10:32:51 -04:00
Andreas Hocevar
678a61cba0 Merge pull request #11416 from MoonE/examples-add-labels-to-inputs
Examples add labels to inputs
2020-08-10 14:24:51 +02:00
Andreas Hocevar
c8956b7084 Merge pull request #11426 from openlayers/dependabot/npm_and_yarn/babel/core-7.11.1
Bump @babel/core from 7.11.0 to 7.11.1
2020-08-10 14:08:07 +02:00
Andreas Hocevar
d2e17ee5db Merge pull request #11425 from openlayers/dependabot/npm_and_yarn/rollup-2.23.1
Bump rollup from 2.23.0 to 2.23.1
2020-08-10 14:07:36 +02:00
Andreas Hocevar
f9f70940a7 Merge pull request #11424 from openlayers/dependabot/npm_and_yarn/rollup-plugin-terser-7.0.0
Bump rollup-plugin-terser from 6.1.0 to 7.0.0
2020-08-10 14:07:07 +02:00
Andreas Hocevar
1aa646c61c Merge pull request #11423 from openlayers/dependabot/npm_and_yarn/worker-loader-3.0.1
Bump worker-loader from 3.0.0 to 3.0.1
2020-08-10 14:06:27 +02:00
Andreas Hocevar
03b127062c Merge pull request #11422 from openlayers/dependabot/npm_and_yarn/terser-webpack-plugin-4.0.0
Bump terser-webpack-plugin from 3.0.8 to 4.0.0
2020-08-10 14:05:52 +02:00
Andreas Hocevar
f700d20a8a Merge pull request #11421 from openlayers/dependabot/npm_and_yarn/mocha-8.1.1
Bump mocha from 8.1.0 to 8.1.1
2020-08-10 14:05:07 +02:00
Andreas Hocevar
bb2bf0877b Merge pull request #11417 from ahocevar/example-search-sort
Fix sort order of examples search results
2020-08-10 14:04:16 +02:00
dependabot-preview[bot]
5343b8c742 Bump @babel/core from 7.11.0 to 7.11.1
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.0 to 7.11.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.1/packages/babel-core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-10 09:04:22 +00:00
dependabot-preview[bot]
7bae616edb Bump rollup from 2.23.0 to 2.23.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.23.0 to 2.23.1.
- [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.23.0...v2.23.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-10 09:03:40 +00:00
dependabot-preview[bot]
6d04653077 Bump rollup-plugin-terser from 6.1.0 to 7.0.0
Bumps [rollup-plugin-terser](https://github.com/TrySound/rollup-plugin-terser) from 6.1.0 to 7.0.0.
- [Release notes](https://github.com/TrySound/rollup-plugin-terser/releases)
- [Commits](https://github.com/TrySound/rollup-plugin-terser/compare/v6.1.0...v7.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-10 09:02:52 +00:00
dependabot-preview[bot]
6f1b327c1a Bump worker-loader from 3.0.0 to 3.0.1
Bumps [worker-loader](https://github.com/webpack-contrib/worker-loader) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/webpack-contrib/worker-loader/releases)
- [Changelog](https://github.com/webpack-contrib/worker-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/worker-loader/compare/v3.0.0...v3.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-10 09:02:08 +00:00
dependabot-preview[bot]
dcc7dc5fd8 Bump terser-webpack-plugin from 3.0.8 to 4.0.0
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 3.0.8 to 4.0.0.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v3.0.8...v4.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-10 09:01:31 +00:00
dependabot-preview[bot]
6194611e5a Bump mocha from 8.1.0 to 8.1.1
Bumps [mocha](https://github.com/mochajs/mocha) from 8.1.0 to 8.1.1.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.1.0...v8.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-10 09:00:53 +00:00
Andreas Hocevar
49a3f9ff58 Merge pull request #11413 from mike-000/patch-12
Include scale option in RegularShape and Circle style constructors
2020-08-10 09:44:08 +02:00
Björn Harrtell
a58bff0981 Initial GetFeature verification 2020-08-10 03:50:39 +02:00
Björn Harrtell
daa0824b17 Refactor transaction serialization 2020-08-09 23:28:22 +02:00
Björn Harrtell
c675ce5217 Fix srsName wrong context 2020-08-09 22:47:03 +02:00
Björn Harrtell
d3041295a1 Initial spike on WFS 2.0 2020-08-09 22:36:41 +02:00
Maximilian Krög
558b3a3ed2 Support alpha channel for icon tinting 2020-08-09 21:58:33 +02:00
Maximilian Krög
38ecaa9814 Use compositing operation for icon colorization when possible. 2020-08-09 21:58:33 +02:00
Andreas Hocevar
d9fb969765 Fix sort order of examples search results 2020-08-09 21:23:13 +02:00
Maximilian Krög
d2d1022359 Link labels to input elements 2020-08-09 20:49:07 +02:00
Maximilian Krög
37e5529b22 Update some example styles / formatting 2020-08-09 20:49:07 +02:00
mike-000
722e0c5b69 Include scale in options
Add rectangle to example
Add ellipse and rectangle to rendering tests
2020-08-09 10:25:16 +01:00
Andreas Hocevar
82328fe2c1 Merge pull request #11401 from mike-000/patch-10
Ensure image extent is valid when scale is negative
2020-08-08 21:15:10 +02:00
Andreas Hocevar
25f8b4d8d7 Merge pull request #11395 from mike-000/patch-9
Correct inchesPerMeter and add tests for ScaleBar text
2020-08-08 14:10:40 +02:00
mike-000
588e3b91d8 use numbers for expected values 2020-08-08 13:01:04 +01:00
Andreas Hocevar
11c715c5a4 Merge pull request #11407 from bjornharrtell/gml3backcompat
Support deprecated coordinates element for GML3+ formats
2020-08-08 12:28:37 +02:00
mike-000
857f4e01ac use precise international inchesPerMeter
test scalebar text
2020-08-07 10:49:31 +01:00
mike-000
9468a088c0 ensure extent is valid when scale is negative
test large flipped icon in buffer zone
test hit detection for negative image scale
2020-08-07 10:26:38 +01:00
Björn Harrtell
dbc7b8b602 Support deprecated coordinates element for GML3+ formats 2020-08-07 03:02:25 +02:00
Mihai CAZACU
49f883664a fix comments 2020-08-06 21:30:10 +03:00
Mihai CAZACU
2a683a2672 format code 2020-08-06 21:27:13 +03:00
Mihai CAZACU
bd22d427ab add CSS class name support for full-screen button 2020-08-06 21:23:16 +03:00
Mihai CAZACU
7cbdf16a64 format code 2020-08-06 20:34:54 +03:00
Mihai CAZACU
c53ff622f2 add CSS class name support for rotate button 2020-08-06 20:32:26 +03:00
Mihai CAZACU
97568b21cd remove typos 2020-08-06 20:14:16 +03:00
Mihai CAZACU
fd264f86a6 format code 2020-08-06 20:11:37 +03:00
Mihai CAZACU
ec1a87443d format code 2020-08-06 20:09:27 +03:00
Mihai CAZACU
ebf0d87aa8 add CSS class name support for attribution button 2020-08-06 20:06:28 +03:00
Mihai CAZACU
fe3295b469 format code 2020-08-06 16:40:45 +03:00
Mihai CAZACU
763629382e format code 2020-08-06 16:36:08 +03:00
Mihai CAZACU
1aa33085c1 add CSS class name support for zoom buttons 2020-08-06 16:15:59 +03:00
Andreas Hocevar
1a356332f3 Merge pull request #11398 from MoonE/fix-workshop-slash-download-links
Fix link to workshop / download
2020-08-05 09:41:45 +02:00
Maximilian Krög
5e30b15860 Fix link to workshop / download 2020-08-04 21:47:58 +02:00
Tim Schaub
1b77409b63 Merge pull request #11391 from mike-000/patch-8
Simplify scale calculation used for WMS getLegendUrl()
2020-08-03 21:24:22 -06:00
mike-000
95702648b2 simplify scale calculation
update tests to reflect more accurate calculation
2020-08-03 23:03:56 +01:00
Andreas Hocevar
425214eb4c Merge pull request #11390 from openlayers/release-v6.4.3
Release v6.4.3
2020-08-03 19:45:39 +02:00
Andreas Hocevar
95d8fbd538 Develop on 6.4.4-dev 2020-08-03 19:44:45 +02:00
Andreas Hocevar
246aded819 Update package to version 6.4.3 2020-08-03 19:41:16 +02:00
Andreas Hocevar
ecc6f83451 Changelog for v6.4.3 2020-08-03 19:40:05 +02:00
Tim Schaub
36d8760b0d Merge pull request #11381 from openlayers/dependabot/npm_and_yarn/karma-5.1.1
Bump karma from 5.1.0 to 5.1.1
2020-08-03 07:31:30 -06:00
Tim Schaub
6ebaecb9ca Merge pull request #11383 from openlayers/dependabot/npm_and_yarn/worker-loader-3.0.0
Bump worker-loader from 2.0.0 to 3.0.0
2020-08-03 07:30:57 -06:00
Tim Schaub
1015274574 Merge pull request #11386 from openlayers/dependabot/npm_and_yarn/webpack-4.44.1
Bump webpack from 4.44.0 to 4.44.1
2020-08-03 07:30:22 -06:00
dependabot-preview[bot]
785c355453 Bump webpack from 4.44.0 to 4.44.1
Bumps [webpack](https://github.com/webpack/webpack) from 4.44.0 to 4.44.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.44.0...v4.44.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-03 13:25:21 +00:00
dependabot-preview[bot]
88259ebd13 Bump karma from 5.1.0 to 5.1.1
Bumps [karma](https://github.com/karma-runner/karma) from 5.1.0 to 5.1.1.
- [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/v5.1.0...v5.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-03 13:25:17 +00:00
Tim Schaub
26fce9f69d Merge pull request #11384 from openlayers/dependabot/npm_and_yarn/babel/core-7.11.0
Bump @babel/core from 7.10.5 to 7.11.0
2020-08-03 07:23:54 -06:00
Tim Schaub
b44ab84fcf Merge pull request #11382 from openlayers/dependabot/npm_and_yarn/mocha-8.1.0
Bump mocha from 8.0.1 to 8.1.0
2020-08-03 07:20:45 -06:00
dependabot-preview[bot]
a5161d7664 Bump @babel/core from 7.10.5 to 7.11.0
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.10.5 to 7.11.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.0/packages/babel-core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-03 13:20:10 +00:00
Tim Schaub
0df64f2d47 Merge pull request #11385 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.11.0
Bump @babel/preset-env from 7.10.4 to 7.11.0
2020-08-03 07:15:44 -06:00
Tim Schaub
f51460a95c Merge pull request #11387 from openlayers/dependabot/npm_and_yarn/eslint-7.6.0
Bump eslint from 7.5.0 to 7.6.0
2020-08-03 07:14:15 -06:00
Tim Schaub
d57ba05a6e Merge pull request #11388 from openlayers/dependabot/npm_and_yarn/terser-webpack-plugin-3.0.8
Bump terser-webpack-plugin from 3.0.7 to 3.0.8
2020-08-03 07:13:00 -06:00
dependabot-preview[bot]
e62e5dca06 Bump terser-webpack-plugin from 3.0.7 to 3.0.8
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 3.0.7 to 3.0.8.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v3.0.7...v3.0.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-03 09:54:45 +00:00
dependabot-preview[bot]
afe468331c Bump eslint from 7.5.0 to 7.6.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.5.0 to 7.6.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.5.0...v7.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-03 09:54:11 +00:00
dependabot-preview[bot]
bee28fcef4 Bump @babel/preset-env from 7.10.4 to 7.11.0
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.10.4 to 7.11.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.0/packages/babel-preset-env)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-03 09:52:39 +00:00
dependabot-preview[bot]
71fd444a56 Bump worker-loader from 2.0.0 to 3.0.0
Bumps [worker-loader](https://github.com/webpack-contrib/worker-loader) from 2.0.0 to 3.0.0.
- [Release notes](https://github.com/webpack-contrib/worker-loader/releases)
- [Changelog](https://github.com/webpack-contrib/worker-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/worker-loader/compare/v2.0.0...v3.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-03 09:51:00 +00:00
dependabot-preview[bot]
d3a8118499 Bump mocha from 8.0.1 to 8.1.0
Bumps [mocha](https://github.com/mochajs/mocha) from 8.0.1 to 8.1.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.0.1...v8.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-03 09:50:31 +00:00
Andreas Hocevar
10dd6ce210 Merge pull request #11379 from jipexu/tooltipbranch
tooltip bs on fullscreen
2020-08-02 21:42:34 +02:00
Andreas Hocevar
7591df8b35 Merge pull request #11378 from mike-000/patch-7
Fix imageSmoothing: false when ImageStatic is stretched to fit extent
2020-08-02 21:35:24 +02:00
Andreas Hocevar
f6c860eb7d Merge pull request #11367 from MoonE/examples-mapbox-use-https
Use https for mapbox tiles
2020-08-02 21:33:39 +02:00
jeanpierre
6f59216974 tooltip bs on fullscreen 2020-08-02 20:41:30 +02:00
Andreas Hocevar
2658dec59d Merge pull request #11377 from ahocevar/hitdetect-no-buffer
Only include renderBuffer when decluttering
2020-08-01 23:44:58 +02:00
Tim Schaub
b99bf19fa2 Merge pull request #11376 from MoonE/examples-fix-overlay-order
Overlay Eample - Show the popup in front of the other overlays
2020-08-01 15:27:19 -06:00
mike-000
95e506cf36 Apply context options in handleImageChange
update tests
add new tests
2020-08-01 16:07:58 +01:00
Andreas Hocevar
3744283f02 Only include renderBuffer when decluttering 2020-08-01 10:58:43 +02:00
Maximilian Krög
cd069e30fb Show the popup over in front of the other overlays 2020-08-01 00:34:22 +02:00
Andreas Hocevar
302bc662af Merge pull request #11368 from openlayers/release-v6.4.2
Release v6.4.2
2020-07-30 23:16:06 +02:00
Andreas Hocevar
bf33d47374 Fix typo in changelog 2020-07-30 23:15:08 +02:00
Andreas Hocevar
bbad40f08b Develop on 6.4.3-dev 2020-07-30 23:13:51 +02:00
Andreas Hocevar
7c93439383 Update package version to 6.4.2 2020-07-30 23:09:27 +02:00
Andreas Hocevar
873505e82a Changelog for v6.4.2 2020-07-30 23:08:46 +02:00
Andreas Hocevar
52afff2e29 Merge pull request #11364 from ahocevar/pep-examples
Load pointer events polyfill - before other polyfills
2020-07-30 22:55:37 +02:00
Andreas Hocevar
82118b0e4d Merge pull request #11365 from mike-000/patch-6
Revert to original method proposed in #11193
2020-07-30 22:54:28 +02:00
Andreas Hocevar
5a86e1aaa4 Add rendering test for rotated image vector clipping with intersection 2020-07-30 22:49:18 +02:00
Maximilian Krög
8645dbc333 Use https for mapbox tiles 2020-07-30 22:28:48 +02:00
mike-000
562b2f632f Revert #11193, set vectorRenderer.clipping = false 2020-07-30 20:11:11 +01:00
Andreas Hocevar
7b297283f2 Load pointer events polyfill - before other polyfills 2020-07-30 21:01:10 +02:00
mike-000
6610391c0b Add clipping property 2020-07-30 19:58:23 +01:00
Andreas Hocevar
6db0e1d2dc Merge pull request #11359 from mike-000/patch-3
check projection can wrap before getting width
2020-07-30 18:24:01 +02:00
Andreas Hocevar
f9792f69a4 Add more tests 2020-07-30 18:04:44 +02:00
mike-000
e6592c95ea remove whitespace 2020-07-30 14:23:51 +01:00
mike-000
eee7e2523c fix prettier 2020-07-30 14:18:58 +01:00
mike-000
dcdaf6ddc5 add non-global projection wrapX text 2020-07-30 14:15:17 +01:00
mike-000
39334fa95d check projection can wrap before getting width 2020-07-30 12:24:03 +01:00
Andreas Hocevar
ba41100799 Merge pull request #11355 from ahocevar/api-key
Cloak API key with instructions where to get one
2020-07-30 12:02:55 +02:00
Andreas Hocevar
4f0f81c802 Cloak API key with instructions where to get one 2020-07-30 09:39:34 +02:00
Andreas Hocevar
82ff027a30 Merge pull request #11354 from ahocevar/line-breaks
Fix line breaks in changelog
2020-07-30 09:18:10 +02:00
Andreas Hocevar
c0223590dc Fix line breaks in changelog 2020-07-30 09:16:14 +02:00
Andreas Hocevar
f43ea770e1 Merge pull request #11351 from openlayers/release-v6.4.1
Release v6.4.1
2020-07-29 20:33:06 +02:00
Andreas Hocevar
e128804e2a Develop on 4.6.1-dev 2020-07-29 20:31:06 +02:00
296 changed files with 15005 additions and 5999 deletions

4
.github/codeql/config.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
name: "OpenLayers CodeQL Config"
paths:
- src

40
.github/workflows/security.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: "Security Scan"
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * 0' # At 00:00 on Sunday
jobs:
codeql:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# Must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head of the pull request.
# Only include this option if you are running this workflow on pull requests.
fetch-depth: 2
# If this run was triggered by a pull request event then checkout
# the head of the pull request instead of the merge commit.
# Only include this step if you are running this workflow on pull requests.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: javascript
config-file: ./.github/codeql/config.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -112,10 +112,12 @@ OpenLayers runs on all modern browsers that support [HTML5](https://html.spec.wh
For older browsers and platforms (Internet Explorer, Android 4.x, iOS v12 and older, Safari v12 and older), polyfills may be needed for the following browser features:
* [`fetch`](https://caniuse.com/#feat=fetch): Available from [polyfill.io](https://polyfill.io/).
* [`requestAnimationFrame`](https://caniuse.com/#feat=requestanimationframe): Available from [polyfill.io](https://polyfill.io/).
* [`element.prototype.classList` (`add`/`remove`)](https://caniuse.com/#feat=classlist): Available from [polyfill.io](https://polyfill.io/).
* [`URL` API](https://caniuse.com/#feat=url): Available from [polyfill.io](https://polyfill.io/).
* [Pointer events](https://caniuse.com/#feat=pointer): Use [elm-pep](https://npmjs.com/package/elm-pep) (lightweight) or [@openlayers/pepjs](https://npmjs.com/package/pepjs) (for really, really old browsers).
* [`TextDecoder`](https://caniuse.com/#feat=textencoder): Available from [polyfill.io](https://polyfill.io/).
* [Pointer events](https://caniuse.com/#feat=pointer): Use [elm-pep](https://npmjs.com/package/elm-pep) (lightweight) or [pepjs](https://npmjs.com/package/pepjs) (for really, really old browsers).
## Documentation

View File

@@ -1,5 +1,20 @@
## Upgrade notes
### v6.5.0
#### Units of the `hitTolerance` option fixed
Previously, the `hitTolerance` option of the map's `getFeaturesAtPixel()`, `forEachFeatureAtPixel()` and `hasFeatureAtPixel()` methods behaved differently depending on the `devicePixelRatio` (or the `pixelRatio` of the map), because the original value was internally multiplied by the device pixel ratio twice instead of just once. Now this is fixed. **Note**: The `hitTolerance`'s units are css pixels. The documentation was updated to reflect this.
If your application adjusts for that with code like
```js
{ hitTolerance: 10 / devicePixelRatio, }
```
you'll have to change that code to
```js
{ hitTolerance: 10, }
```
### v6.4.0
#### Pointer events polyfill removed

View File

@@ -2,7 +2,9 @@
This is a bugfix release which removes a few regressions that were introduced by v6.4.0, and fixes a few issues in examples caused by the website facelift.
## List of all changes * [#11346](https://github.com/openlayers/openlayers/pull/11346) - Fix text instruction flat coordinates when stride is not 2 ([@ahocevar](https://github.com/ahocevar))
## List of all changes
* [#11346](https://github.com/openlayers/openlayers/pull/11346) - Fix text instruction flat coordinates when stride is not 2 ([@ahocevar](https://github.com/ahocevar))
* [#11348](https://github.com/openlayers/openlayers/pull/11348) - Add all layers to layer export ([@M393](https://github.com/M393))
* [#11337](https://github.com/openlayers/openlayers/pull/11337) - Do not rely on old value for target ([@ahocevar](https://github.com/ahocevar))
* [#11345](https://github.com/openlayers/openlayers/pull/11345) - Fix the popup in the geographic example ([@MoonE](https://github.com/MoonE))

14
changelog/v6.4.2.md Normal file
View File

@@ -0,0 +1,14 @@
# 6.4.2
This is a bugfix release which removes a few regressions that were introduced by v6.4.0, and fixes a few issues in examples.
See the [v6.4.0 release notes](https://github.com/openlayers/openlayers/releases/tag/v6.4.0) for a complete list of changes and upgrade notes when upgrading from v6.3.x.
## List of all changes
* [#11364](https://github.com/openlayers/openlayers/pull/11364) - Load pointer events polyfill - before other polyfills ([@ahocevar](https://github.com/ahocevar))
* [#11365](https://github.com/openlayers/openlayers/pull/11365) - Revert to original method proposed in #11193 ([@mike-000](https://github.com/mike-000))
* [#11359](https://github.com/openlayers/openlayers/pull/11359) - check projection can wrap before getting width ([@mike-000](https://github.com/mike-000))
* [#11355](https://github.com/openlayers/openlayers/pull/11355) - Cloak API key with instructions where to get one ([@ahocevar](https://github.com/ahocevar))
* [#11354](https://github.com/openlayers/openlayers/pull/11354) - Fix line breaks in changelog ([@ahocevar](https://github.com/ahocevar))

29
changelog/v6.4.3.md Normal file
View File

@@ -0,0 +1,29 @@
# 6.4.3
This is a bugfix release which fixes a performance regression, a rendering issue, and adds improvements to a few examples.
See the [v6.4.0 release notes](https://github.com/openlayers/openlayers/releases/tag/v6.4.0) for a complete list of changes and upgrade notes when upgrading from v6.3.x.
## List of all changes
* [#11379](https://github.com/openlayers/openlayers/pull/11379) - tooltip bs on fullscreen ([@jipexu](https://github.com/jipexu))
* [#11378](https://github.com/openlayers/openlayers/pull/11378) - Fix imageSmoothing: false when ImageStatic is stretched to fit extent ([@mike-000](https://github.com/mike-000))
* [#11367](https://github.com/openlayers/openlayers/pull/11367) - Use https for mapbox tiles ([@MoonE](https://github.com/MoonE))
* [#11377](https://github.com/openlayers/openlayers/pull/11377) - Only include renderBuffer when decluttering ([@ahocevar](https://github.com/ahocevar))
* [#11376](https://github.com/openlayers/openlayers/pull/11376) - Overlay Eample - Show the popup in front of the other overlays ([@MoonE](https://github.com/MoonE))
<details>
<summary>Dependency Updates</summary>
* [#11381](https://github.com/openlayers/openlayers/pull/11381) - Bump karma from 5.1.0 to 5.1.1 ([@openlayers](https://github.com/openlayers))
* [#11383](https://github.com/openlayers/openlayers/pull/11383) - Bump worker-loader from 2.0.0 to 3.0.0 ([@openlayers](https://github.com/openlayers))
* [#11386](https://github.com/openlayers/openlayers/pull/11386) - Bump webpack from 4.44.0 to 4.44.1 ([@openlayers](https://github.com/openlayers))
* [#11384](https://github.com/openlayers/openlayers/pull/11384) - Bump @babel/core from 7.10.5 to 7.11.0 ([@openlayers](https://github.com/openlayers))
* [#11382](https://github.com/openlayers/openlayers/pull/11382) - Bump mocha from 8.0.1 to 8.1.0 ([@openlayers](https://github.com/openlayers))
* [#11385](https://github.com/openlayers/openlayers/pull/11385) - Bump @babel/preset-env from 7.10.4 to 7.11.0 ([@openlayers](https://github.com/openlayers))
* [#11387](https://github.com/openlayers/openlayers/pull/11387) - Bump eslint from 7.5.0 to 7.6.0 ([@openlayers](https://github.com/openlayers))
* [#11388](https://github.com/openlayers/openlayers/pull/11388) - Bump terser-webpack-plugin from 3.0.7 to 3.0.8 ([@openlayers](https://github.com/openlayers))
</details>

279
changelog/v6.5.0.md Normal file
View File

@@ -0,0 +1,279 @@
# 6.5.0
With more than 110 pull requests, this release not only brings WFS 2.0 support and improved touch support for drawing geometries and querying features. In addition to that, several improvements, many bugs fixes, and nicer API docs and examples have found their way into the 6.5.0 release.
## Upgrade notes
### Units of the `hitTolerance` option fixed
Previously, the `hitTolerance` option of the map's `getFeaturesAtPixel()`, `forEachFeatureAtPixel()` and `hasFeatureAtPixel()` methods behaved differently depending on the `devicePixelRatio` (or the `pixelRatio` of the map), because the original value was internally multiplied by the device pixel ratio twice instead of just once. Now this is fixed. **Note**: The `hitTolerance`'s units are css pixels. The documentation was updated to reflect this.
If your application adjusts for that with code like
```js
{ hitTolerance: 10 / devicePixelRatio, }
```
you'll have to change that code to
```js
{ hitTolerance: 10, }
```
## New features and improvements
* New scale option in `RegularShape` and `Circle` style constructors
* WFS 2.0.0 support
* Added `preRender` and `postRender` methods to `WebGLLayerRenderer`
* Added `className` constructor option in `ol/layer/Heatmap`
* Added load events for `ol/source/Vector`
* New `iconUrlFunction` option for `ol/format/KML`
* Added `transition` option to `OSM` and `CartoDB` sources
* `DragAndDrop` interaction support for formats that read ArrayBuffer sources
* New `padding` option for `ol/View`
* New `cancel` event for the `DragBox` interaction
* When using `hitTolerance`, detect closest features first
* Ability to draw `Circle` geometries with a custom renderer
## List of all changes
* [#11859](https://github.com/openlayers/openlayers/pull/11859) - Do not fire duplicate postrender events ([@MoonE](https://github.com/MoonE))
* [#11858](https://github.com/openlayers/openlayers/pull/11858) - Correct documented event names for VectorSourceEvent ([@MoonE](https://github.com/MoonE))
* [#11844](https://github.com/openlayers/openlayers/pull/11844) - Fix Style expressions error message ([@MoonE](https://github.com/MoonE))
* [#11838](https://github.com/openlayers/openlayers/pull/11838) - Custom circle render ([@changqingom](https://github.com/changqingom))
* [#11811](https://github.com/openlayers/openlayers/pull/11811) - Better getPointResolution default when no transform available ([@mike-000](https://github.com/mike-000))
* [#11821](https://github.com/openlayers/openlayers/pull/11821) - Call the finishCondition when drawing points / circles ([@MoonE](https://github.com/MoonE))
* [#11824](https://github.com/openlayers/openlayers/pull/11824) - Add Units back to API docs ([@ahocevar](https://github.com/ahocevar))
* [#11817](https://github.com/openlayers/openlayers/pull/11817) - stopPropagation support for PluggableMap ([@greggian](https://github.com/greggian))
* [#11815](https://github.com/openlayers/openlayers/pull/11815) - Remove unnecessary line that breaks drawing with multi-touch ([@ahocevar](https://github.com/ahocevar))
* [#11800](https://github.com/openlayers/openlayers/pull/11800) - Fix removeLastPoint when removing last point ([@ahocevar](https://github.com/ahocevar))
* [#11769](https://github.com/openlayers/openlayers/pull/11769) - Modify interaction developer experience improvements ([@ahocevar](https://github.com/ahocevar))
* [#11803](https://github.com/openlayers/openlayers/pull/11803) - Modify fix vertex insertion ([@MoonE](https://github.com/MoonE))
* [#11783](https://github.com/openlayers/openlayers/pull/11783) - Cache hit detect indexes and check closest pixels first. ([@MoonE](https://github.com/MoonE))
* [#11791](https://github.com/openlayers/openlayers/pull/11791) - Now that pepjs was updated, we can point to the official package ([@ahocevar](https://github.com/ahocevar))
* [#11790](https://github.com/openlayers/openlayers/pull/11790) - Fix attributions links for WMS layers from swisstopo ([@openlayers](https://github.com/openlayers))
* [#11781](https://github.com/openlayers/openlayers/pull/11781) - Pass geometry to forEachFeatureAtPixel callback ([@ahocevar](https://github.com/ahocevar))
* [#11778](https://github.com/openlayers/openlayers/pull/11778) - No need to adjust hitTolerance for pixel ratio twice ([@ahocevar](https://github.com/ahocevar))
* [#11780](https://github.com/openlayers/openlayers/pull/11780) - Add a cancel event to the DragBox interaction ([@M393](https://github.com/M393))
* [#11779](https://github.com/openlayers/openlayers/pull/11779) - Restore Mode.CIRCLE in Draw interaction ([@mike-000](https://github.com/mike-000))
* [#11753](https://github.com/openlayers/openlayers/pull/11753) - Use Mode.LINE_STRING in Draw interaction for Circle geometries ([@mike-000](https://github.com/mike-000))
* [#11767](https://github.com/openlayers/openlayers/pull/11767) - Improve documentation of geometry rotation ([@mike-000](https://github.com/mike-000))
* [#11755](https://github.com/openlayers/openlayers/pull/11755) - Add padding option for View ([@ahocevar](https://github.com/ahocevar))
* [#11754](https://github.com/openlayers/openlayers/pull/11754) - Fix typo that prevents Rotate icon from indicating the view rotation ([@ahocevar](https://github.com/ahocevar))
* [#11719](https://github.com/openlayers/openlayers/pull/11719) - Clamp EPSG:3857 y to lowest/highest possible value instead of validity extent ([@ahocevar](https://github.com/ahocevar))
* [#11737](https://github.com/openlayers/openlayers/pull/11737) - Write the correct SRS code in EsriJSON ([@ahocevar](https://github.com/ahocevar))
* [#11749](https://github.com/openlayers/openlayers/pull/11749) - Document that snapTolerance must be greater than 0 ([@ahocevar](https://github.com/ahocevar))
* [#11750](https://github.com/openlayers/openlayers/pull/11750) - Update TMS tileUrlFunction example in ol/source/XYZ documentation ([@mike-000](https://github.com/mike-000))
* [#11739](https://github.com/openlayers/openlayers/pull/11739) - Fix: Check for layer extent in CanvasLayerRenderer.getDataAtPixel ([@boeckMt](https://github.com/boeckMt))
* [#11748](https://github.com/openlayers/openlayers/pull/11748) - Add fetch and TextDecoder to polyfill list in README ([@mike-000](https://github.com/mike-000))
* [#11740](https://github.com/openlayers/openlayers/pull/11740) - Wfs bbox per feature type ([@ger-benjamin](https://github.com/ger-benjamin))
* [#11722](https://github.com/openlayers/openlayers/pull/11722) - Correct meaning of 'start' and 'end' text align for LTR text ([@ahocevar](https://github.com/ahocevar))
* [#11741](https://github.com/openlayers/openlayers/pull/11741) - Include LICENSE.md in built package ([@bz2](https://github.com/bz2))
* [#11718](https://github.com/openlayers/openlayers/pull/11718) - Initialize sketch point on Draw#extend() ([@ahocevar](https://github.com/ahocevar))
* [#11732](https://github.com/openlayers/openlayers/pull/11732) - Replace readURI with readStyleURL for KML StyleURLs ([@mike-000](https://github.com/mike-000))
* [#11723](https://github.com/openlayers/openlayers/pull/11723) - Drag and Drop Interaction support for formats that read ArrayBuffer sources ([@mike-000](https://github.com/mike-000))
* [#11724](https://github.com/openlayers/openlayers/pull/11724) - Add transition option to OSM and CartoDB sources, document default ([@MoonE](https://github.com/MoonE))
* [#11721](https://github.com/openlayers/openlayers/pull/11721) - Handle empty Z coordinates in KML ([@mike-000](https://github.com/mike-000))
* [#11587](https://github.com/openlayers/openlayers/pull/11587) - Determine orientation by actual text start and end x ([@MoonE](https://github.com/MoonE))
* [#11720](https://github.com/openlayers/openlayers/pull/11720) - Return to simpler and less efficient winding order algorithm ([@ahocevar](https://github.com/ahocevar))
* [#11715](https://github.com/openlayers/openlayers/pull/11715) - Add all symbols to the legacy build ([@ahocevar](https://github.com/ahocevar))
* [#11716](https://github.com/openlayers/openlayers/pull/11716) - Treat svg as binary resource ([@mike-000](https://github.com/mike-000))
* [#11698](https://github.com/openlayers/openlayers/pull/11698) - Draw pointer improvements ([@ahocevar](https://github.com/ahocevar))
* [#11490](https://github.com/openlayers/openlayers/pull/11490) - iconUrlFunction option for ol/format/KML ([@mike-000](https://github.com/mike-000))
* [#11628](https://github.com/openlayers/openlayers/pull/11628) - VectorSource load events ([@simonseyock](https://github.com/simonseyock))
* [#11691](https://github.com/openlayers/openlayers/pull/11691) - Use Parcel v2 in copy/paste example code ([@ahocevar](https://github.com/ahocevar))
* [#11673](https://github.com/openlayers/openlayers/pull/11673) - Do not emulate dblclick and slingleclick on multi-touch ([@ahocevar](https://github.com/ahocevar))
* [#11676](https://github.com/openlayers/openlayers/pull/11676) - Fix countries.geojson Antarctica polygon so it wraps correctly ([@mike-000](https://github.com/mike-000))
* [#11646](https://github.com/openlayers/openlayers/pull/11646) - Ensure a unique tile key for each tile coordinate ([@ahocevar](https://github.com/ahocevar))
* [#11655](https://github.com/openlayers/openlayers/pull/11655) - Fix documentation of image render mode for vector tile layers ([@ahocevar](https://github.com/ahocevar))
* [#11668](https://github.com/openlayers/openlayers/pull/11668) - Don't try to get image data for zero sized images ([@tapioko](https://github.com/tapioko))
* [#11648](https://github.com/openlayers/openlayers/pull/11648) - Dwithin filter ([@virtualcitySYSTEMS](https://github.com/virtualcitySYSTEMS))
* [#11658](https://github.com/openlayers/openlayers/pull/11658) - Make webpack dev server run with current version ([@MoonE](https://github.com/MoonE))
* [#11590](https://github.com/openlayers/openlayers/pull/11590) - Export all the Event sub class ([@sbrunner](https://github.com/sbrunner))
* [#11594](https://github.com/openlayers/openlayers/pull/11594) - Display current OS copyright date in the Raster Reprojection example ([@mike-000](https://github.com/mike-000))
* [#11657](https://github.com/openlayers/openlayers/pull/11657) - Use https to avoid security warnings ([@mike-000](https://github.com/mike-000))
* [#11649](https://github.com/openlayers/openlayers/pull/11649) - Deal with undefined units from proj4 longlat projections ([@ahocevar](https://github.com/ahocevar))
* [#11403](https://github.com/openlayers/openlayers/pull/11403) - #11402 add CSS class name support for control buttons ([@cazacugmihai](https://github.com/cazacugmihai))
* [#11592](https://github.com/openlayers/openlayers/pull/11592) - New decluttering implementation ([@ahocevar](https://github.com/ahocevar))
* [#11618](https://github.com/openlayers/openlayers/pull/11618) - Update the Marker Animation example ([@mike-000](https://github.com/mike-000))
* [#11620](https://github.com/openlayers/openlayers/pull/11620) - Add charset to the examples html below the map ([@MoonE](https://github.com/MoonE))
* [#11613](https://github.com/openlayers/openlayers/pull/11613) - Allow mouse input if map is rendered in an other window ([@elnabo](https://github.com/elnabo))
* [#11597](https://github.com/openlayers/openlayers/pull/11597) - Improved performance when removing feature with only one Select ([@MoonE](https://github.com/MoonE))
* [#11607](https://github.com/openlayers/openlayers/pull/11607) - Reset attributions control to collapsible when no uncollapsible sources are visible ([@mike-000](https://github.com/mike-000))
* [#11609](https://github.com/openlayers/openlayers/pull/11609) - Modify interaction insert only one vertex ([@M393](https://github.com/M393))
* [#11605](https://github.com/openlayers/openlayers/pull/11605) - Remove context references when releasing tiles ([@ahocevar](https://github.com/ahocevar))
* [#11591](https://github.com/openlayers/openlayers/pull/11591) - Make permalink example less complex ([@kannes](https://github.com/kannes))
* [#11569](https://github.com/openlayers/openlayers/pull/11569) - Fix binary data exports to codesandbox in examples ([@mike-000](https://github.com/mike-000))
* [#11579](https://github.com/openlayers/openlayers/pull/11579) - Replace Animated GIF example globe gif ([@mike-000](https://github.com/mike-000))
* [#11565](https://github.com/openlayers/openlayers/pull/11565) - Animated GIF example ([@mike-000](https://github.com/mike-000))
* [#11571](https://github.com/openlayers/openlayers/pull/11571) - Replace countryflags.io with flagcdn.com in the Style Renderer example ([@mike-000](https://github.com/mike-000))
* [#11568](https://github.com/openlayers/openlayers/pull/11568) - Fix raster source crash bug when using multiple threads ([@rgroothuijsen](https://github.com/rgroothuijsen))
* [#11563](https://github.com/openlayers/openlayers/pull/11563) - Fix end world calculation if projection is not symmetric ([@MoonE](https://github.com/MoonE))
* [#11561](https://github.com/openlayers/openlayers/pull/11561) - Constrain resolution when fit called without duration ([@M393](https://github.com/M393))
* [#11559](https://github.com/openlayers/openlayers/pull/11559) - Only draw visible worlds ([@MoonE](https://github.com/MoonE))
* [#11519](https://github.com/openlayers/openlayers/pull/11519) - Do not draw multipoints outside render extent ([@MoonE](https://github.com/MoonE))
* [#11532](https://github.com/openlayers/openlayers/pull/11532) - Make TileGrid behave as documented with extent and sizes options ([@ahocevar](https://github.com/ahocevar))
* [#11545](https://github.com/openlayers/openlayers/pull/11545) - Use the className param in ol.layer.Heatmap ([@fredj](https://github.com/fredj))
* [#11548](https://github.com/openlayers/openlayers/pull/11548) - Bind tileUrlFunction before returning it from getTileUrlFunction ([@ahocevar](https://github.com/ahocevar))
* [#11549](https://github.com/openlayers/openlayers/pull/11549) - Only use elementFromPoint with ShadowRoot ([@ahocevar](https://github.com/ahocevar))
* [#11502](https://github.com/openlayers/openlayers/pull/11502) - Fix issue with WMS Capabilities containing a single layer ([@jbelien](https://github.com/jbelien))
* [#11540](https://github.com/openlayers/openlayers/pull/11540) - Avoid unnecessary transform in the MVT format ([@gberaudo](https://github.com/gberaudo))
* [#11537](https://github.com/openlayers/openlayers/pull/11537) - Add rotation and rotateWithView to ol/style/Circle clone method and options ([@mike-000](https://github.com/mike-000))
* [#11543](https://github.com/openlayers/openlayers/pull/11543) - wmts matrixset null pointer fix and improved handling of Identifier ([@sweco-dkjesh](https://github.com/sweco-dkjesh))
* [#11509](https://github.com/openlayers/openlayers/pull/11509) - Add urn:x-ogc:def:crs:EPSG:6.6:4326 as WGS84 proj identifier ([@fgravin](https://github.com/fgravin))
* [#11521](https://github.com/openlayers/openlayers/pull/11521) - Do not use fractional pixel ratio for rendering vector tiles ([@ahocevar](https://github.com/ahocevar))
* [#11517](https://github.com/openlayers/openlayers/pull/11517) - Make clockwise check work when coordinates are duplicated ([@ahocevar](https://github.com/ahocevar))
* [#11501](https://github.com/openlayers/openlayers/pull/11501) - Empty this.canvas_ for all pixel ratios when render() is called ([@mike-000](https://github.com/mike-000))
* [#11471](https://github.com/openlayers/openlayers/pull/11471) - Feature: added preRender and postRender methods to WebGLLayerRenderer… ([@MichaelLangbein](https://github.com/MichaelLangbein))
* [#11491](https://github.com/openlayers/openlayers/pull/11491) - Cosmetic fix to doc (missing closing quote) ([@mike-000](https://github.com/mike-000))
* [#11488](https://github.com/openlayers/openlayers/pull/11488) - "Layer Z-Index" example bugfix ([@michalzielanski](https://github.com/michalzielanski))
* [#11486](https://github.com/openlayers/openlayers/pull/11486) - guard for null ([@davidiamaf](https://github.com/davidiamaf))
* [#11481](https://github.com/openlayers/openlayers/pull/11481) - Adding original properties to cloned geometry ([@michalzielanski](https://github.com/michalzielanski))
* [#11404](https://github.com/openlayers/openlayers/pull/11404) - Add security scan ([@tschaub](https://github.com/tschaub))
* [#11470](https://github.com/openlayers/openlayers/pull/11470) - Fix pointer events polyfill link ([@ahocevar](https://github.com/ahocevar))
* [#11467](https://github.com/openlayers/openlayers/pull/11467) - Style renderer example ([@ahocevar](https://github.com/ahocevar))
* [#11455](https://github.com/openlayers/openlayers/pull/11455) - Apidoc improvements ([@MoonE](https://github.com/MoonE))
* [#11474](https://github.com/openlayers/openlayers/pull/11474) - fix: modify rbush package import ([@haasz](https://github.com/haasz))
* [#11472](https://github.com/openlayers/openlayers/pull/11472) - Typescript 4.0.2 ([@ahocevar](https://github.com/ahocevar))
* [#11454](https://github.com/openlayers/openlayers/pull/11454) - VectorTile source projection has to match the view projection ([@ahocevar](https://github.com/ahocevar))
* [#11438](https://github.com/openlayers/openlayers/pull/11438) - Better scroll behaviour for apidocs ([@MoonE](https://github.com/MoonE))
* [#11446](https://github.com/openlayers/openlayers/pull/11446) - Checks before calling handleEvent on interactions ([@ahocevar](https://github.com/ahocevar))
* [#11305](https://github.com/openlayers/openlayers/pull/11305) - PluggableMap: avoid crash when multiple interactions are removed ([@megawac](https://github.com/megawac))
* [#11433](https://github.com/openlayers/openlayers/pull/11433) - Fix typo in module name ([@fredj](https://github.com/fredj))
* [#11419](https://github.com/openlayers/openlayers/pull/11419) - WFS 2.0.0 support ([@bjornharrtell](https://github.com/bjornharrtell))
* [#11418](https://github.com/openlayers/openlayers/pull/11418) - Icon color default to composite operation ([@MoonE](https://github.com/MoonE))
* [#11416](https://github.com/openlayers/openlayers/pull/11416) - Examples add labels to inputs ([@MoonE](https://github.com/MoonE))
* [#11417](https://github.com/openlayers/openlayers/pull/11417) - Fix sort order of examples search results ([@ahocevar](https://github.com/ahocevar))
* [#11413](https://github.com/openlayers/openlayers/pull/11413) - Include scale option in RegularShape and Circle style constructors ([@mike-000](https://github.com/mike-000))
* [#11401](https://github.com/openlayers/openlayers/pull/11401) - Ensure image extent is valid when scale is negative ([@mike-000](https://github.com/mike-000))
* [#11395](https://github.com/openlayers/openlayers/pull/11395) - Correct inchesPerMeter and add tests for ScaleBar text ([@mike-000](https://github.com/mike-000))
* [#11407](https://github.com/openlayers/openlayers/pull/11407) - Support deprecated coordinates element for GML3+ formats ([@bjornharrtell](https://github.com/bjornharrtell))
* [#11398](https://github.com/openlayers/openlayers/pull/11398) - Fix link to workshop / download ([@MoonE](https://github.com/MoonE))
* [#11391](https://github.com/openlayers/openlayers/pull/11391) - Simplify scale calculation used for WMS getLegendUrl() ([@mike-000](https://github.com/mike-000))
<details>
<summary>Dependency Updates</summary>
* [#11851](https://github.com/openlayers/openlayers/pull/11851) - Bump @babel/preset-env from 7.12.10 to 7.12.11 ([@openlayers](https://github.com/openlayers))
* [#11850](https://github.com/openlayers/openlayers/pull/11850) - Bump marked from 1.2.6 to 1.2.7 ([@openlayers](https://github.com/openlayers))
* [#11852](https://github.com/openlayers/openlayers/pull/11852) - Bump rollup from 2.35.0 to 2.35.1 ([@openlayers](https://github.com/openlayers))
* [#11853](https://github.com/openlayers/openlayers/pull/11853) - Bump copy-webpack-plugin from 6.4.0 to 6.4.1 ([@openlayers](https://github.com/openlayers))
* [#11849](https://github.com/openlayers/openlayers/pull/11849) - Bump eslint from 7.15.0 to 7.16.0 ([@openlayers](https://github.com/openlayers))
* [#11848](https://github.com/openlayers/openlayers/pull/11848) - Bump ol-mapbox-style from 6.2.1 to 6.3.0 ([@openlayers](https://github.com/openlayers))
* [#11828](https://github.com/openlayers/openlayers/pull/11828) - Bump ol-mapbox-style from 6.1.4 to 6.2.1 ([@openlayers](https://github.com/openlayers))
* [#11830](https://github.com/openlayers/openlayers/pull/11830) - Bump jsdoc-plugin-typescript from 2.0.5 to 2.0.6 ([@openlayers](https://github.com/openlayers))
* [#11829](https://github.com/openlayers/openlayers/pull/11829) - Bump typescript from 4.1.2 to 4.1.3 ([@openlayers](https://github.com/openlayers))
* [#11833](https://github.com/openlayers/openlayers/pull/11833) - Bump rollup from 2.34.2 to 2.35.0 ([@openlayers](https://github.com/openlayers))
* [#11834](https://github.com/openlayers/openlayers/pull/11834) - Bump copy-webpack-plugin from 6.3.2 to 6.4.0 ([@openlayers](https://github.com/openlayers))
* [#11832](https://github.com/openlayers/openlayers/pull/11832) - Bump @babel/preset-env from 7.12.7 to 7.12.10 ([@openlayers](https://github.com/openlayers))
* [#11835](https://github.com/openlayers/openlayers/pull/11835) - Bump sinon from 9.2.1 to 9.2.2 ([@openlayers](https://github.com/openlayers))
* [#11831](https://github.com/openlayers/openlayers/pull/11831) - Bump marked from 1.2.5 to 1.2.6 ([@openlayers](https://github.com/openlayers))
* [#11827](https://github.com/openlayers/openlayers/pull/11827) - Bump @babel/core from 7.12.9 to 7.12.10 ([@openlayers](https://github.com/openlayers))
* [#11820](https://github.com/openlayers/openlayers/pull/11820) - [Security] Bump ini from 1.3.5 to 1.3.7 ([@openlayers](https://github.com/openlayers))
* [#11809](https://github.com/openlayers/openlayers/pull/11809) - Bump yargs from 16.1.1 to 16.2.0 ([@openlayers](https://github.com/openlayers))
* [#11808](https://github.com/openlayers/openlayers/pull/11808) - Bump worker-loader from 3.0.5 to 3.0.6 ([@openlayers](https://github.com/openlayers))
* [#11807](https://github.com/openlayers/openlayers/pull/11807) - Bump eslint from 7.14.0 to 7.15.0 ([@openlayers](https://github.com/openlayers))
* [#11806](https://github.com/openlayers/openlayers/pull/11806) - Bump rollup from 2.34.0 to 2.34.2 ([@openlayers](https://github.com/openlayers))
* [#11786](https://github.com/openlayers/openlayers/pull/11786) - Bump rollup from 2.33.3 to 2.34.0 ([@openlayers](https://github.com/openlayers))
* [#11787](https://github.com/openlayers/openlayers/pull/11787) - Bump babel-loader from 8.2.1 to 8.2.2 ([@openlayers](https://github.com/openlayers))
* [#11785](https://github.com/openlayers/openlayers/pull/11785) - Bump @babel/core from 7.12.7 to 7.12.9 ([@openlayers](https://github.com/openlayers))
* [#11762](https://github.com/openlayers/openlayers/pull/11762) - Bump typescript from 4.0.5 to 4.1.2 ([@openlayers](https://github.com/openlayers))
* [#11764](https://github.com/openlayers/openlayers/pull/11764) - Bump copy-webpack-plugin from 6.3.1 to 6.3.2 ([@openlayers](https://github.com/openlayers))
* [#11758](https://github.com/openlayers/openlayers/pull/11758) - Bump rollup from 2.33.2 to 2.33.3 ([@openlayers](https://github.com/openlayers))
* [#11761](https://github.com/openlayers/openlayers/pull/11761) - Bump @babel/core from 7.12.3 to 7.12.7 ([@openlayers](https://github.com/openlayers))
* [#11760](https://github.com/openlayers/openlayers/pull/11760) - Bump proj4 from 2.6.2 to 2.6.3 ([@openlayers](https://github.com/openlayers))
* [#11763](https://github.com/openlayers/openlayers/pull/11763) - Bump eslint from 7.13.0 to 7.14.0 ([@openlayers](https://github.com/openlayers))
* [#11759](https://github.com/openlayers/openlayers/pull/11759) - Bump @babel/preset-env from 7.12.1 to 7.12.7 ([@openlayers](https://github.com/openlayers))
* [#11757](https://github.com/openlayers/openlayers/pull/11757) - Bump marked from 1.2.4 to 1.2.5 ([@openlayers](https://github.com/openlayers))
* [#11756](https://github.com/openlayers/openlayers/pull/11756) - Bump puppeteer from 5.4.1 to 5.5.0 ([@openlayers](https://github.com/openlayers))
* [#11747](https://github.com/openlayers/openlayers/pull/11747) - Bump rollup from 2.33.1 to 2.33.2 ([@openlayers](https://github.com/openlayers))
* [#11746](https://github.com/openlayers/openlayers/pull/11746) - Bump babel-loader from 8.1.0 to 8.2.1 ([@openlayers](https://github.com/openlayers))
* [#11745](https://github.com/openlayers/openlayers/pull/11745) - Bump yargs from 16.1.0 to 16.1.1 ([@openlayers](https://github.com/openlayers))
* [#11744](https://github.com/openlayers/openlayers/pull/11744) - Bump webpack-dev-middleware from 4.0.0 to 4.0.2 ([@openlayers](https://github.com/openlayers))
* [#11743](https://github.com/openlayers/openlayers/pull/11743) - Bump copy-webpack-plugin from 6.3.0 to 6.3.1 ([@openlayers](https://github.com/openlayers))
* [#11742](https://github.com/openlayers/openlayers/pull/11742) - Bump marked from 1.2.3 to 1.2.4 ([@openlayers](https://github.com/openlayers))
* [#11731](https://github.com/openlayers/openlayers/pull/11731) - Bump mocha from 8.2.0 to 8.2.1 ([@openlayers](https://github.com/openlayers))
* [#11730](https://github.com/openlayers/openlayers/pull/11730) - Bump marked from 1.2.2 to 1.2.3 ([@openlayers](https://github.com/openlayers))
* [#11729](https://github.com/openlayers/openlayers/pull/11729) - Bump eslint from 7.12.1 to 7.13.0 ([@openlayers](https://github.com/openlayers))
* [#11728](https://github.com/openlayers/openlayers/pull/11728) - Bump webpack-cli from 4.1.0 to 4.2.0 ([@openlayers](https://github.com/openlayers))
* [#11727](https://github.com/openlayers/openlayers/pull/11727) - Bump karma-firefox-launcher from 2.0.0 to 2.1.0 ([@openlayers](https://github.com/openlayers))
* [#11726](https://github.com/openlayers/openlayers/pull/11726) - Bump copy-webpack-plugin from 6.2.1 to 6.3.0 ([@openlayers](https://github.com/openlayers))
* [#11708](https://github.com/openlayers/openlayers/pull/11708) - Bump rollup from 2.32.1 to 2.33.1 ([@openlayers](https://github.com/openlayers))
* [#11705](https://github.com/openlayers/openlayers/pull/11705) - Bump webpack-dev-middleware from 3.7.2 to 4.0.0 ([@openlayers](https://github.com/openlayers))
* [#11706](https://github.com/openlayers/openlayers/pull/11706) - Bump url-polyfill from 1.1.11 to 1.1.12 ([@openlayers](https://github.com/openlayers))
* [#11707](https://github.com/openlayers/openlayers/pull/11707) - Bump typescript from 4.0.3 to 4.0.5 ([@openlayers](https://github.com/openlayers))
* [#11709](https://github.com/openlayers/openlayers/pull/11709) - Bump sinon from 9.2.0 to 9.2.1 ([@openlayers](https://github.com/openlayers))
* [#11710](https://github.com/openlayers/openlayers/pull/11710) - Bump puppeteer from 5.4.0 to 5.4.1 ([@openlayers](https://github.com/openlayers))
* [#11711](https://github.com/openlayers/openlayers/pull/11711) - Bump eslint from 7.12.0 to 7.12.1 ([@openlayers](https://github.com/openlayers))
* [#11689](https://github.com/openlayers/openlayers/pull/11689) - Bump pngjs from 5.0.0 to 6.0.0 ([@openlayers](https://github.com/openlayers))
* [#11686](https://github.com/openlayers/openlayers/pull/11686) - Bump shx from 0.3.2 to 0.3.3 ([@openlayers](https://github.com/openlayers))
* [#11683](https://github.com/openlayers/openlayers/pull/11683) - Bump puppeteer from 5.3.1 to 5.4.0 ([@openlayers](https://github.com/openlayers))
* [#11682](https://github.com/openlayers/openlayers/pull/11682) - Bump karma-firefox-launcher from 1.3.0 to 2.0.0 ([@openlayers](https://github.com/openlayers))
* [#11684](https://github.com/openlayers/openlayers/pull/11684) - Bump marked from 1.2.0 to 1.2.2 ([@openlayers](https://github.com/openlayers))
* [#11685](https://github.com/openlayers/openlayers/pull/11685) - Bump rollup from 2.32.0 to 2.32.1 ([@openlayers](https://github.com/openlayers))
* [#11688](https://github.com/openlayers/openlayers/pull/11688) - Bump webpack-cli from 4.0.0 to 4.1.0 ([@openlayers](https://github.com/openlayers))
* [#11687](https://github.com/openlayers/openlayers/pull/11687) - Bump eslint from 7.11.0 to 7.12.0 ([@openlayers](https://github.com/openlayers))
* [#11666](https://github.com/openlayers/openlayers/pull/11666) - Bump worker-loader from 3.0.4 to 3.0.5 ([@openlayers](https://github.com/openlayers))
* [#11665](https://github.com/openlayers/openlayers/pull/11665) - Bump url-polyfill from 1.1.10 to 1.1.11 ([@openlayers](https://github.com/openlayers))
* [#11664](https://github.com/openlayers/openlayers/pull/11664) - Bump @babel/core from 7.11.6 to 7.12.3 ([@openlayers](https://github.com/openlayers))
* [#11663](https://github.com/openlayers/openlayers/pull/11663) - Bump yargs from 16.0.3 to 16.1.0 ([@openlayers](https://github.com/openlayers))
* [#11662](https://github.com/openlayers/openlayers/pull/11662) - Bump mocha from 8.1.3 to 8.2.0 ([@openlayers](https://github.com/openlayers))
* [#11661](https://github.com/openlayers/openlayers/pull/11661) - Bump rollup from 2.29.0 to 2.32.0 ([@openlayers](https://github.com/openlayers))
* [#11660](https://github.com/openlayers/openlayers/pull/11660) - Bump @babel/preset-env from 7.11.5 to 7.12.1 ([@openlayers](https://github.com/openlayers))
* [#11643](https://github.com/openlayers/openlayers/pull/11643) - Bump terser-webpack-plugin from 4.2.2 to 4.2.3 ([@openlayers](https://github.com/openlayers))
* [#11645](https://github.com/openlayers/openlayers/pull/11645) - Bump webpack-cli from 3.3.12 to 4.0.0 ([@openlayers](https://github.com/openlayers))
* [#11644](https://github.com/openlayers/openlayers/pull/11644) - Bump copy-webpack-plugin from 6.2.0 to 6.2.1 ([@openlayers](https://github.com/openlayers))
* [#11642](https://github.com/openlayers/openlayers/pull/11642) - Bump sinon from 9.1.0 to 9.2.0 ([@openlayers](https://github.com/openlayers))
* [#11641](https://github.com/openlayers/openlayers/pull/11641) - Bump rollup from 2.28.2 to 2.29.0 ([@openlayers](https://github.com/openlayers))
* [#11640](https://github.com/openlayers/openlayers/pull/11640) - Bump worker-loader from 3.0.3 to 3.0.4 ([@openlayers](https://github.com/openlayers))
* [#11639](https://github.com/openlayers/openlayers/pull/11639) - Bump eslint from 7.10.0 to 7.11.0 ([@openlayers](https://github.com/openlayers))
* [#11622](https://github.com/openlayers/openlayers/pull/11622) - Bump sinon from 9.0.3 to 9.1.0 ([@openlayers](https://github.com/openlayers))
* [#11623](https://github.com/openlayers/openlayers/pull/11623) - Bump copy-webpack-plugin from 6.1.1 to 6.2.0 ([@openlayers](https://github.com/openlayers))
* [#11603](https://github.com/openlayers/openlayers/pull/11603) - Bump rollup from 2.28.1 to 2.28.2 ([@openlayers](https://github.com/openlayers))
* [#11602](https://github.com/openlayers/openlayers/pull/11602) - Bump marked from 1.1.1 to 1.2.0 ([@openlayers](https://github.com/openlayers))
* [#11601](https://github.com/openlayers/openlayers/pull/11601) - Bump puppeteer from 5.3.0 to 5.3.1 ([@openlayers](https://github.com/openlayers))
* [#11600](https://github.com/openlayers/openlayers/pull/11600) - Bump eslint from 7.9.0 to 7.10.0 ([@openlayers](https://github.com/openlayers))
* [#11599](https://github.com/openlayers/openlayers/pull/11599) - Bump worker-loader from 3.0.2 to 3.0.3 ([@openlayers](https://github.com/openlayers))
* [#11598](https://github.com/openlayers/openlayers/pull/11598) - Bump karma from 5.2.2 to 5.2.3 ([@openlayers](https://github.com/openlayers))
* [#11578](https://github.com/openlayers/openlayers/pull/11578) - Bump rollup from 2.26.11 to 2.28.1 ([@openlayers](https://github.com/openlayers))
* [#11576](https://github.com/openlayers/openlayers/pull/11576) - Bump terser-webpack-plugin from 4.2.0 to 4.2.2 ([@openlayers](https://github.com/openlayers))
* [#11575](https://github.com/openlayers/openlayers/pull/11575) - Bump typescript from 4.0.2 to 4.0.3 ([@openlayers](https://github.com/openlayers))
* [#11577](https://github.com/openlayers/openlayers/pull/11577) - Bump copy-webpack-plugin from 6.1.0 to 6.1.1 ([@openlayers](https://github.com/openlayers))
* [#11574](https://github.com/openlayers/openlayers/pull/11574) - Bump jsdoc from 3.6.5 to 3.6.6 ([@openlayers](https://github.com/openlayers))
* [#11573](https://github.com/openlayers/openlayers/pull/11573) - Bump webpack from 4.44.1 to 4.44.2 ([@openlayers](https://github.com/openlayers))
* [#11558](https://github.com/openlayers/openlayers/pull/11558) - Bump yargs from 15.4.1 to 16.0.3 ([@openlayers](https://github.com/openlayers))
* [#11557](https://github.com/openlayers/openlayers/pull/11557) - Bump eslint from 7.8.1 to 7.9.0 ([@openlayers](https://github.com/openlayers))
* [#11556](https://github.com/openlayers/openlayers/pull/11556) - Bump puppeteer from 5.2.1 to 5.3.0 ([@openlayers](https://github.com/openlayers))
* [#11555](https://github.com/openlayers/openlayers/pull/11555) - Bump karma from 5.2.1 to 5.2.2 ([@openlayers](https://github.com/openlayers))
* [#11554](https://github.com/openlayers/openlayers/pull/11554) - Bump terser-webpack-plugin from 4.1.0 to 4.2.0 ([@openlayers](https://github.com/openlayers))
* [#11553](https://github.com/openlayers/openlayers/pull/11553) - Bump rollup from 2.26.10 to 2.26.11 ([@openlayers](https://github.com/openlayers))
* [#11531](https://github.com/openlayers/openlayers/pull/11531) - Bump rollup from 2.26.8 to 2.26.10 ([@openlayers](https://github.com/openlayers))
* [#11530](https://github.com/openlayers/openlayers/pull/11530) - Bump @babel/preset-env from 7.11.0 to 7.11.5 ([@openlayers](https://github.com/openlayers))
* [#11529](https://github.com/openlayers/openlayers/pull/11529) - Bump rollup-plugin-terser from 7.0.1 to 7.0.2 ([@openlayers](https://github.com/openlayers))
* [#11528](https://github.com/openlayers/openlayers/pull/11528) - Bump @babel/core from 7.11.4 to 7.11.6 ([@openlayers](https://github.com/openlayers))
* [#11526](https://github.com/openlayers/openlayers/pull/11526) - Bump eslint from 7.7.0 to 7.8.1 ([@openlayers](https://github.com/openlayers))
* [#11527](https://github.com/openlayers/openlayers/pull/11527) - Bump karma from 5.1.1 to 5.2.1 ([@openlayers](https://github.com/openlayers))
* [#11525](https://github.com/openlayers/openlayers/pull/11525) - Bump copy-webpack-plugin from 6.0.4 to 6.1.0 ([@openlayers](https://github.com/openlayers))
* [#11515](https://github.com/openlayers/openlayers/pull/11515) - [Security] Bump http-proxy from 1.17.0 to 1.18.1 ([@openlayers](https://github.com/openlayers))
* [#11504](https://github.com/openlayers/openlayers/pull/11504) - [Security] Bump bl from 4.0.2 to 4.0.3 ([@openlayers](https://github.com/openlayers))
* [#11496](https://github.com/openlayers/openlayers/pull/11496) - Bump mocha from 8.1.1 to 8.1.3 ([@openlayers](https://github.com/openlayers))
* [#11495](https://github.com/openlayers/openlayers/pull/11495) - Bump rollup-plugin-terser from 7.0.0 to 7.0.1 ([@openlayers](https://github.com/openlayers))
* [#11494](https://github.com/openlayers/openlayers/pull/11494) - Bump copy-webpack-plugin from 6.0.3 to 6.0.4 ([@openlayers](https://github.com/openlayers))
* [#11493](https://github.com/openlayers/openlayers/pull/11493) - Bump rollup from 2.26.5 to 2.26.8 ([@openlayers](https://github.com/openlayers))
* [#11462](https://github.com/openlayers/openlayers/pull/11462) - Bump rollup from 2.26.3 to 2.26.5 ([@openlayers](https://github.com/openlayers))
* [#11460](https://github.com/openlayers/openlayers/pull/11460) - Bump karma-sourcemap-loader from 0.3.7 to 0.3.8 ([@openlayers](https://github.com/openlayers))
* [#11459](https://github.com/openlayers/openlayers/pull/11459) - Bump ol-mapbox-style from 6.1.3 to 6.1.4 ([@openlayers](https://github.com/openlayers))
* [#11458](https://github.com/openlayers/openlayers/pull/11458) - Bump worker-loader from 3.0.1 to 3.0.2 ([@openlayers](https://github.com/openlayers))
* [#11457](https://github.com/openlayers/openlayers/pull/11457) - Bump @babel/core from 7.11.1 to 7.11.4 ([@openlayers](https://github.com/openlayers))
* [#11443](https://github.com/openlayers/openlayers/pull/11443) - Bump eslint from 7.6.0 to 7.7.0 ([@openlayers](https://github.com/openlayers))
* [#11441](https://github.com/openlayers/openlayers/pull/11441) - Bump terser-webpack-plugin from 4.0.0 to 4.1.0 ([@openlayers](https://github.com/openlayers))
* [#11440](https://github.com/openlayers/openlayers/pull/11440) - Bump rollup from 2.23.1 to 2.26.3 ([@openlayers](https://github.com/openlayers))
* [#11439](https://github.com/openlayers/openlayers/pull/11439) - Bump sinon from 9.0.2 to 9.0.3 ([@openlayers](https://github.com/openlayers))
* [#11442](https://github.com/openlayers/openlayers/pull/11442) - Bump ol-mapbox-style from 6.1.2 to 6.1.3 ([@openlayers](https://github.com/openlayers))
* [#11426](https://github.com/openlayers/openlayers/pull/11426) - Bump @babel/core from 7.11.0 to 7.11.1 ([@openlayers](https://github.com/openlayers))
* [#11425](https://github.com/openlayers/openlayers/pull/11425) - Bump rollup from 2.23.0 to 2.23.1 ([@openlayers](https://github.com/openlayers))
* [#11424](https://github.com/openlayers/openlayers/pull/11424) - Bump rollup-plugin-terser from 6.1.0 to 7.0.0 ([@openlayers](https://github.com/openlayers))
* [#11423](https://github.com/openlayers/openlayers/pull/11423) - Bump worker-loader from 3.0.0 to 3.0.1 ([@openlayers](https://github.com/openlayers))
* [#11422](https://github.com/openlayers/openlayers/pull/11422) - Bump terser-webpack-plugin from 3.0.8 to 4.0.0 ([@openlayers](https://github.com/openlayers))
* [#11421](https://github.com/openlayers/openlayers/pull/11421) - Bump mocha from 8.1.0 to 8.1.1 ([@openlayers](https://github.com/openlayers))
</details>

View File

@@ -36,7 +36,7 @@ $(function () {
}
// If everything else is equal, prefer shorter names, and prefer classes over modules
let weight = 10000 + matchedItem.dataset.longname.length - name.length * 100;
if (name.match(re.begin)) {
if (re.begin.test(name)) {
weight += 10000;
if (re.baseName.test(name)) {
weight += 10000;
@@ -79,6 +79,7 @@ $(function () {
$currentItem: currentItem ? $(currentItem) : undefined,
lastSearchTerm: undefined,
lastState: {},
lastClasses: undefined,
getClassList: function () {
return $classItems || ($classItems = $navList.find('li.item'));
},
@@ -143,9 +144,9 @@ $(function () {
if (state === 'search-empty' && search.$currentItem) {
search.manualToggle(search.$currentItem, true);
}
search.lastClasses = undefined;
} else {
search.changeStateClass('searching');
searchTerm = searchTerm.toLowerCase();
const beginOnly = searchTerm.length < minInputForFullText;
const getSearchWeight = getWeightFunction(searchTerm, allowRegex);
const re = constructRegex(searchTerm, function (searchTerm) {
@@ -197,13 +198,14 @@ $(function () {
li.classList.add('match');
}
});
classes.sort(function (a, b) {
return b.weight - a.weight;
});
clearOldMatches(search.lastState, searchState);
search.lastState = searchState;
search.lastClasses = classes;
classes.sort(function (a, b) {
return a.weight - b.weight;
});
for (let i = classes.length - 1; i >= 0; --i) {
for (let i = 0, ii = classes.length; i < ii; ++i) {
navList.appendChild(classes[i].item);
}
}
@@ -217,15 +219,24 @@ $(function () {
key = setTimeout(function () {
key = undefined;
const searchTerm = searchInput.value;
doSearch(searchTerm);
doSearch(searchInput.value);
}, 0);
}
}
// Search Items
searchInput.addEventListener('input', queueSearch);
searchInput.addEventListener('keydown', function(e) {
if (e.key === 'Enter') {
doSearch(searchInput.value);
const first = search.lastClasses ? search.lastClasses[0].item : null;
if (first) {
window.location.href = first.querySelector('.title a').href;
}
}
});
doSearch(searchInput.value);
searchInput.focus();
// Toggle when click an item element
search.$navList.on('click', '.toggle', function (e) {
@@ -237,33 +248,8 @@ $(function () {
search.manualToggle(clsItem, show);
});
// Auto resizing on navigation
var _onResize = function () {
var height_w = $(window).height();
var height_s = $('section').height();
var $el = $('.navigation');
var dif_h = height_w - height_s;
if (window.matchMedia("(min-width: 768px)").matches) {
if (dif_h >=0){
$('.navigation').height(height_s+dif_h+74);
$('.navigation-list').height(height_s+dif_h)
}
else {
$('.navigation').height(height_s+74);
$('.navigation-list').height(height_s-60);
}
}
else{
$('.navigation').height(220);
$('.navigation-list').height(140);
}
}
$(window).on('resize', _onResize);
_onResize();
var currentVersion = document.getElementById('package-version').innerHTML;
// warn about outdated version
var currentVersion = document.getElementById('package-version').innerHTML;
var packageUrl = 'https://raw.githubusercontent.com/openlayers/openlayers.github.io/build/package.json';
fetch(packageUrl).then(function(response) {
return response.json();
@@ -288,15 +274,4 @@ $(function () {
}
}
});
// create source code links to github
var srcLinks = $('div.tag-source');
srcLinks.each(function(i, el) {
var textParts = el.innerHTML.trim().split(', ');
var link = 'https://github.com/openlayers/openlayers/blob/v' + currentVersion + '/src/ol/' +
textParts[0];
el.innerHTML = '<a href="' + link + '">' + textParts[0] + '</a>, ' +
'<a href="' + link + textParts[1].replace('line ', '#L') + '">' +
textParts[1] + '</a>';
});
});

View File

@@ -18,7 +18,7 @@
}
body {
padding-top: 55px;
padding-top: 54px;
}
.nameContainer .anchor {
padding-top: 70px;
@@ -61,23 +61,42 @@ ol {
li {
list-style-type: none;
}
::-webkit-scrollbar {
width: 8px;
background-color: transparent;
}
::-webkit-scrollbar-thumb {
background-color: transparent;
border-radius: 4px;
#wrap {
display: flex;
flex-flow: row;
}
.navigation {
background-color: #2a2a2a;
}
@media (max-width:768px) {
.navigation-list {
padding: 0 15px 0 15px;
}
@supports (position: sticky) {
.navigation {
max-height:220px;
position: sticky;
top: 54px;
height: calc(100vh - 54px);
}
.navigation-list{
height:140px;
.navigation-list {
overflow: auto;
/* 54px navbar height */
/* 4.25rem + 2px searchbox height */
/* 25px navigation padding */
height: calc(100vh - 54px - 4.25rem - 2px - 25px);
}
}
@media (max-width: 768px) {
#wrap {
flex-flow: column;
}
.navigation {
height: inherit;
position: inherit;
}
.navigation-list {
overflow: auto;
max-height: 33vh;
height: inherit;
}
}
@@ -107,10 +126,8 @@ li {
color: #fff;
border-color: #555;
}
.navigation .navigation-list {
padding: 10px 15px 0 15px;
position: relative;
overflow: auto;
.navigation .navigation-list-wrapper {
padding: 10px 0 15px 0;
width: 100%;
}
.navigation li.item {
@@ -318,8 +335,8 @@ span.type-signature.static {
}
.main .nameContainer {
position: relative;
margin-top: 20px;
padding-top: 5px;
margin-top: 1.2rem;
padding-top: 1.2rem;
border-top: 2px solid #1F6B75;
}
.main .nameContainer .inherited {
@@ -337,7 +354,7 @@ span.type-signature.static {
@media (min-width: 768px) {
.main .nameContainer .tag-source {
position: absolute;
top: 0.2rem;
top: 1.2rem;
right: 0;
font-size: 0.8rem;
}

View File

@@ -54,11 +54,15 @@
<article>
<div class="container-overview">
<?js if (doc.kind === 'module' && doc.module) { ?>
<dl>
<?js= self.partial('method.tmpl', doc.module) ?>
</dl>
<?js } ?>
<?js if (doc.kind === 'class') { ?>
<dl>
<?js= self.partial('method.tmpl', doc) ?>
</dl>
<?js } else { ?>
<?js if (doc.description) { ?>
<div class="description"><?js= doc.description ?></div>

View File

@@ -4,6 +4,7 @@ var version = obj.packageInfo.version;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script>
var gaProperty = 'UA-2577926-1';
// Disable tracking if the opt-out cookie exists.
@@ -61,7 +62,6 @@ var version = obj.packageInfo.version;
})
});
</script>
<meta charset="utf-8">
<title>OpenLayers v<?js= version ?> API - <?js= title ?></title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch"></script>
<script src="scripts/prettify/prettify.js"> </script>
@@ -97,7 +97,7 @@ var version = obj.packageInfo.version;
<a class="dropdown-item" href="../doc/quickstart.html"><i class="fa fa-check fa-fw mr-2 fa-lg"></i>Quick Start</a>
<a class="dropdown-item" href="../doc/faq.html"><i class="fa fa-question fa-fw mr-2 fa-lg"></i>FAQ</a>
<a class="dropdown-item" href="../doc/tutorials/"><i class="fa fa-book fa-fw mr-2 fa-lg"></i>Tutorials</a>
<a class="dropdown-item" href="../workshop/"><i class="fa fa-graduation-cap fa-fw mr-2 fa-lg"></i>Workshop</a>
<a class="dropdown-item" href="/workshop/"><i class="fa fa-graduation-cap fa-fw mr-2 fa-lg"></i>Workshop</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i class="fa fa-stack-overflow fa-fw mr-2"></i>Ask a Question</a>
</div>
@@ -108,7 +108,7 @@ var version = obj.packageInfo.version;
<a class="nav-link dropdown-toggle" href="#" id="codedropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Code</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="codedropdown">
<a class="dropdown-item" href="https://github.com/openlayers/openlayers"><i class="fa fa-github fa-fw mr-2 fa-lg"></i>Repository</a>
<a class="dropdown-item" href="../download/"><i class="fa fa-download fa-fw mr-2 fa-lg"></i>Download</a>
<a class="dropdown-item" href="/download/"><i class="fa fa-download fa-fw mr-2 fa-lg"></i>Download</a>
</div>
</li>
</ul>

View File

@@ -1,10 +1,16 @@
<?js
var data = obj;
var self = this;
var version = self.find({kind: 'package' })[0].version;
if (/-dev$/.test(version)) {
version = 'main';
} else {
version = 'v' + version;
}
?>
<dt class="<?js= (data.stability && data.stability !== 'stable') ? 'unstable' : '' ?>">
<div class="nameContainer<?js if (data.inherited) { ?> inherited<?js } ?>">
<?js if (data.stability || kind !== 'class') { ?>
<div class="nameContainer<?js if (data.inherited) { ?> inherited<?js } ?>">
<div class="anchor" id="<?js= id ?>">
</div>
<h4 class="name">
@@ -16,11 +22,12 @@ var self = this;
</h4>
<?js if (data.meta) {?>
<div class="tag-source">
<?js= self.linkto(meta.filename) ?>, <?js= self.linkto(meta.filename, 'line ' + meta.lineno, null, 'line' + meta.lineno) ?>
<a href="https://github.com/openlayers/openlayers/blob/<?js= version ?>/src/ol/<?js= meta.filename ?>"><?js= meta.filename ?></a>,
<a href="https://github.com/openlayers/openlayers/blob/<?js= version ?>/src/ol/<?js= meta.filename ?>#L<?js= meta.lineno ?>">line <?js= meta.lineno ?></a>
</div>
<?js } ?>
<?js } ?>
</div>
<?js } ?>
<?js if (data.summary) { ?>
<p class="summary"><?js= summary ?></p>
<?js } ?>

View File

@@ -51,9 +51,12 @@ function listContent(item, title, listItemPrinter) {
}
?>
<div class="navigation col-md-4 col-lg-3">
<div class="search-wrapper">
<div class="search">
<input id="search" type="text" autocomplete="off" class="form-control input-sm" placeholder="Search Documentation">
</div>
</div>
<div class="navigation-list-wrapper">
<ul class="navigation-list search-empty"><?js
this.nav.forEach(function (item) { ?>
<li class="item item-<?js= item.type ?>" data-longname="<?js= item.longname ?>" data-name="<?js= item.prettyname.toLowerCase() ?>">
@@ -67,4 +70,5 @@ function listContent(item, title, listItemPrinter) {
listContent(item, 'Fires', printFiresListItem);
}); ?>
</ul>
</div>
</div>

View File

@@ -1,11 +0,0 @@
/**
* Handle the api annotation.
* @param {Object} dictionary The tag dictionary.
*/
exports.defineTags = function (dictionary) {
dictionary.defineTag('api', {
onTagged: function (doclet, tag) {
doclet.api = true;
},
});
};

View File

@@ -11,7 +11,6 @@
},
"plugins": [
"jsdoc-plugin-typescript",
"config/jsdoc/info/api-plugin",
"config/jsdoc/info/define-plugin",
"config/jsdoc/info/virtual-plugin"
],

View File

@@ -1,6 +1,5 @@
/**
* @fileoverview Generates JSON output based on exportable symbols (those with
* an api tag) and boolean defines (with a define tag and a default value).
* @fileoverview Generates JSON output based on exportable symbols.
*/
const assert = require('assert');
const path = require('path');
@@ -20,26 +19,27 @@ exports.publish = function (data, opts) {
return types;
}
// get all doclets with the "api" property or define (excluding events)
// get all doclets that have exports
const classes = {};
const docs = data(
[
{define: {isObject: true}},
function () {
if (this.kind == 'class') {
if (!('extends' in this) || typeof this.api == 'boolean') {
classes[this.longname] = this;
return true;
}
}
return (
typeof this.api == 'boolean' ||
(this.meta && /[\\\/]externs$/.test(this.meta.path))
this.meta &&
this.meta.path &&
this.longname.indexOf('<anonymous>') !== 0 &&
this.longname !== 'module:ol'
);
},
],
{kind: {'!is': 'file'}},
{kind: {'!is': 'event'}}
{kind: {'!is': 'event'}},
{kind: {'!is': 'module'}}
).get();
// get symbols data, filter out those that are members of private classes
@@ -77,7 +77,7 @@ exports.publish = function (data, opts) {
path: path.join(doc.meta.path, doc.meta.filename),
default: doc.define.default,
});
} else if (doc.kind == 'typedef' || doc.isEnum === true) {
} else if (doc.type && (doc.kind == 'typedef' || doc.isEnum === true)) {
typedefs.push({
name: doc.longname,
types: getTypes(doc.type.names),
@@ -136,7 +136,7 @@ exports.publish = function (data, opts) {
});
}
const target = isExterns ? externs : doc.api ? symbols : base;
const target = isExterns ? externs : symbols;
const existingSymbol = symbolsByName[symbol.name];
if (existingSymbol) {
const idx = target.indexOf(existingSymbol);
@@ -145,10 +145,9 @@ exports.publish = function (data, opts) {
target.push(symbol);
symbolsByName[symbol.name] = symbol;
if (doc.api && symbol.extends) {
if (symbol.extends) {
while (
symbol.extends in classes &&
!classes[symbol.extends].api &&
classes[symbol.extends].augments
) {
symbol.extends = classes[symbol.extends].augments[0];

View File

@@ -47,7 +47,7 @@ The default `geometryFunction` can only handle `ol/geom/Point` geometries.
### 11
`options.featureTypes` should be an Array.
`options.featureTypes` must be an Array.
### 12
@@ -249,3 +249,7 @@ This is done by providing adequate shaders using the `hitVertexShader` and `hitF
### 67
A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both.
### 68
Data from this source can only be rendered if it has a projection compatible with the view projection.

View File

@@ -19,7 +19,7 @@ OpenLayers is available as [`ol` npm package](https://npmjs.com/package/ol), whi
By default, OpenLayers uses a performance optimized Canvas renderer.
OpenLayers runs on all modern browsers that support [HTML5](https://html.spec.whatwg.org/multipage/) and [ECMAScript 5](http://www.ecma-international.org/ecma-262/5.1/). This includes Chrome, Firefox, Safari and Edge. For older browsers and platforms like Internet Explorer (down to version 9) and Android 4.x, [polyfills](http://polyfill.io), the application bundle needs to be transpiled (e.g. using [Babel](https://babeljs.io)) and bundled with polyfills for `requestAnimationFrame`, `Element.prototype.classList` and `URL`.
OpenLayers runs on all modern browsers that support [HTML5](https://html.spec.whatwg.org/multipage/) and [ECMAScript 5](http://www.ecma-international.org/ecma-262/5.1/). This includes Chrome, Firefox, Safari and Edge. For older browsers and platforms like Internet Explorer (down to version 9) and Android 4.x, [polyfills](http://polyfill.io), the application bundle needs to be transpiled (e.g. using [Babel](https://babeljs.io)) and bundled with polyfills for `fetch`, `requestAnimationFrame`, `Element.prototype.classList`, `URL` and `TextDecoder`.
The library is intended for use on both desktop/laptop and mobile devices, and supports pointer and touch interactions.

View File

@@ -7,9 +7,11 @@
"d3": false,
"domtoimage": false,
"geojsonvt": false,
"gifler": false,
"GyroNorm": false,
"jsPDF": false,
"jsts": false,
"JSZip": false,
"mapboxgl": false,
"saveAs": false,
"toastr": false,

View File

@@ -0,0 +1,12 @@
---
layout: example.html
title: Animated GIF
shortdesc: Example of using an animated GIF as an icon.
docs: >
Example of using an animated GIF as an icon.
Animation is achieved using the <a href="http://themadcreator.github.io/gifler/" target="_blank">Gifler</a> library.
tags: "animation, vector, style, icon, gif"
resources:
- https://unpkg.com/gifler@0.1.0/gifler.min.js
---
<div id="map" class="map"></div>

64
examples/animated-gif.js Normal file
View File

@@ -0,0 +1,64 @@
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import Point from '../src/ol/geom/Point.js';
import View from '../src/ol/View.js';
import {Icon, Style} from '../src/ol/style.js';
import {Stamen, Vector as VectorSource} from '../src/ol/source.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
const iconFeature = new Feature({
geometry: new Point([0, 0]),
});
const vectorSource = new VectorSource({
features: [iconFeature],
});
const vectorLayer = new VectorLayer({
source: vectorSource,
});
const rasterLayer = new TileLayer({
source: new Stamen({
layer: 'toner',
}),
});
const map = new Map({
layers: [rasterLayer, vectorLayer],
target: document.getElementById('map'),
view: new View({
center: [0, 0],
zoom: 2,
}),
});
const gifUrl = 'data/globe.gif';
const gif = gifler(gifUrl);
gif.frames(
document.createElement('canvas'),
function (ctx, frame) {
if (!iconFeature.getStyle()) {
iconFeature.setStyle(
new Style({
image: new Icon({
img: ctx.canvas,
imgSize: [frame.width, frame.height],
opacity: 0.8,
}),
})
);
}
ctx.clearRect(0, 0, frame.width, frame.height);
ctx.drawImage(frame.buffer, frame.x, frame.y);
map.render();
},
true
);
// change mouse cursor when over icon
map.on('pointermove', function (e) {
const pixel = map.getEventPixel(e.originalEvent);
const hit = map.hasFeatureAtPixel(pixel);
map.getTarget().style.cursor = hit ? 'pointer' : '';
});

View File

@@ -4,6 +4,7 @@ title: Custom Tooltips
shortdesc: This example shows how to customize the buttons tooltips with Bootstrap.
docs: >
This example shows how to customize the buttons tooltips with <a href="https://getbootstrap.com/docs/4.5/components/tooltips/">Bootstrap</a>.
For the tooltips to work in fullscreen mode, set the container property to a selector that matches the map target.
tags: "custom, tooltip"
resources:
- https://code.jquery.com/jquery-3.5.1.min.js

View File

@@ -19,7 +19,9 @@ const map = new Map({
$('.ol-zoom-in, .ol-zoom-out').tooltip({
placement: 'right',
container: '#map',
});
$('.ol-rotate-reset, .ol-attribution button[title]').tooltip({
placement: 'left',
container: '#map',
});

View File

@@ -11,6 +11,11 @@ docs: >
view's <code>centerOn</code> method is used to position a coordinate (Lausanne)
at a specific pixel location (the center of the black box).
<p>Use <code>Alt+Shift+Drag</code> to rotate the map.</p>
<p><b>Note:</b> This example does not shift the view center. So the zoom
controls and rotating the map will still use the center of the viewport as anchor.
To shift the whole view based on a padding, use the `padding` option on the view,
as shown in the <a href="view-padding.html">view-padding.html</a> example.
</p>
tags: "center, rotation, openstreetmap"
---
<div class="mapcontainer">

View File

@@ -8,6 +8,6 @@ tags: "cluster, vector"
---
<div id="map" class="map"></div>
<form>
<label>cluster distance</label>
<label for="distance">cluster distance</label>
<input id="distance" type="range" min="0" max="100" step="1" value="40"/>
</form>

View File

@@ -1,5 +1,7 @@
table.controls td {
text-align: center;
padding: 2px 5px;
min-width: 60px;
}
table.controls td:nth-child(3) {
text-align: right;
min-width: 4.5em;
}

View File

@@ -9,18 +9,18 @@ tags: "color, hue, lightness, chroma"
<div id="map" class="map"></div>
<table class="controls">
<tr>
<td>hue</td>
<td><span id="hueOut"></span>°</td>
<td><label for="hue">hue</label></td>
<td><input id="hue" type="range" min="-180" max="180" value="0"/></td>
<td><span id="hueOut"></span> °&nbsp;</td>
</tr>
<tr>
<td>chroma</td>
<td><span id="chromaOut"></span> %</td>
<td><label for="chroma">chroma</label></td>
<td><input id="chroma" type="range" min="0" max="100" value="100"/></td>
<td><span id="chromaOut"></span> %</td>
</tr>
<tr>
<td>lightness</td>
<td><span id="lightnessOut"></span> %</td>
<td><label for="lightness">lightness</label></td>
<td><input id="lightness" type="range" min="0" max="100" value="100"/></td>
<td><span id="lightnessOut"></span> %</td>
</tr>
</table>

View File

@@ -0,0 +1,9 @@
---
layout: example.html
title: Custom Circle Render
shortdesc: Example of a custom circle render.
docs: >
This example demonstrates the use of 'ol/style/Style' render option function to render circle feature.
tags: "circle, feature, vector, render, custom"
---
<div id="map" class="map"></div>

View File

@@ -0,0 +1,64 @@
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {Circle} from '../src/ol/geom.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Style} from '../src/ol/style.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
const circleFeature = new Feature({
geometry: new Circle([12127398.797692968, 4063894.123105166], 50),
});
circleFeature.setStyle(
new Style({
renderer(coordinates, state) {
const [[x, y], [x1, y1]] = coordinates;
const ctx = state.context;
const dx = x1 - x;
const dy = y1 - y;
const radius = Math.sqrt(dx * dx + dy * dy);
const innerRadius = 0;
const outerRadius = radius * 1.4;
const gradient = ctx.createRadialGradient(
x,
y,
innerRadius,
x,
y,
outerRadius
);
gradient.addColorStop(0, 'rgba(255,0,0,0)');
gradient.addColorStop(0.6, 'rgba(255,0,0,0.2)');
gradient.addColorStop(1, 'rgba(255,0,0,0.8)');
ctx.beginPath();
ctx.arc(x, y, radius, 0, 2 * Math.PI, true);
ctx.fillStyle = gradient;
ctx.fill();
ctx.arc(x, y, radius, 0, 2 * Math.PI, true);
ctx.strokeStyle = 'rgba(255,0,0,1)';
ctx.stroke();
},
})
);
new Map({
layers: [
new TileLayer({
source: new OSM(),
visible: true,
}),
new VectorLayer({
source: new VectorSource({
features: [circleFeature],
}),
}),
],
target: 'map',
view: new View({
center: [12127398.797692968, 4063894.123105166],
zoom: 19,
}),
});

View File

@@ -139,7 +139,7 @@ const map = new Map({
new TileLayer({
source: new TileJSON({
url:
'https://a.tiles.mapbox.com/v4/aj.1x1-degrees.json?access_token=' +
'https://a.tiles.mapbox.com/v4/aj.1x1-degrees.json?secure&access_token=' +
key,
}),
}),

File diff suppressed because one or more lines are too long

BIN
examples/data/globe.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

4661
examples/data/kml/states.kml Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -0,0 +1 @@
{"routes":[{"geometry":"hldhx@lnau`BCG_EaC??cFjAwDjF??uBlKMd@}@z@??aC^yk@z_@se@b[wFdE??wFfE}NfIoGxB_I\\gG}@eHoCyTmPqGaBaHOoD\\??yVrGotA|N??o[N_STiwAtEmHGeHcAkiA}^aMyBiHOkFNoI`CcVvM??gG^gF_@iJwC??eCcA]OoL}DwFyCaCgCcCwDcGwHsSoX??wI_EkUFmq@hBiOqBgTwS??iYse@gYq\\cp@ce@{vA}s@csJqaE}{@iRaqE{lBeRoIwd@_T{]_Ngn@{PmhEwaA{SeF_u@kQuyAw]wQeEgtAsZ}LiCarAkVwI}D??_}RcjEinPspDwSqCgs@sPua@_OkXaMeT_Nwk@ob@gV}TiYs[uTwXoNmT{Uyb@wNg]{Nqa@oDgNeJu_@_G}YsFw]kDuZyDmm@i_@uyIJe~@jCg|@nGiv@zUi_BfNqaAvIow@dEed@dCcf@r@qz@Egs@{Acu@mCum@yIey@gGig@cK_m@aSku@qRil@we@{mAeTej@}Tkz@cLgr@aHko@qOmcEaJw~C{w@kai@qBchBq@kmBS{kDnBscBnFu_Dbc@_~QHeU`IuyDrC_}@bByp@fCyoA?qMbD}{AIkeAgBk_A_A{UsDke@gFej@qH{o@qGgb@qH{`@mMgm@uQus@kL{_@yOmd@ymBgwE}x@ouBwtA__DuhEgaKuWct@gp@cnBii@mlBa_@}|Asj@qrCg^eaC}L{dAaJ_aAiOyjByH{nAuYu`GsAwXyn@ywMyOyqD{_@cfIcDe}@y@aeBJmwA`CkiAbFkhBlTgdDdPyiB`W}xDnSa}DbJyhCrXitAhT}x@bE}Z_@qW_Kwv@qKaaAiBgXvIm}A~JovAxCqW~WanB`XewBbK{_A`K}fBvAmi@xBycBeCauBoF}}@qJioAww@gjHaPopA_NurAyJku@uGmi@cDs[eRaiBkQstAsQkcByNmaCsK_uBcJgbEw@gkB_@ypEqDoqSm@eZcDwjBoGw`BoMegBaU_`Ce_@_uBqb@ytBwkFqiT_fAqfEwe@mfCka@_eC_UmlB}MmaBeWkkDeHwqAoX}~DcBsZmLcxBqOwqE_DkyAuJmrJ\\o~CfIewG|YibQxBssB?es@qGciA}RorAoVajA_nAodD{[y`AgPqp@mKwr@ms@umEaW{dAmb@umAw|@ojBwzDaaJsmBwbEgdCsrFqhAihDquAi`Fux@}_Dui@_eB_u@guCuyAuiHukA_lKszAu|OmaA{wKm}@clHs_A_rEahCssKo\\sgBsSglAqk@yvDcS_wAyTwpBmPc|BwZknFoFscB_GsaDiZmyMyLgtHgQonHqT{hKaPg}Dqq@m~Hym@c`EuiBudIabB{hF{pWifx@snAw`GkFyVqf@y~BkoAi}Lel@wtc@}`@oaXi_C}pZsi@eqGsSuqJ|Lqeb@e]kgPcaAu}SkDwzGhn@gjYh\\qlNZovJieBqja@ed@siO{[ol\\kCmjMe\\isHorCmec@uLebB}EqiBaCg}@m@qwHrT_vFps@kkI`uAszIrpHuzYxx@e{Crw@kpDhN{wBtQarDy@knFgP_yCu\\wyCwyA{kHo~@omEoYmoDaEcPiuAosDagD}rO{{AsyEihCayFilLaiUqm@_bAumFo}DgqA_uByi@swC~AkzDlhA}xEvcBa}Cxk@ql@`rAo|@~bBq{@``Bye@djDww@z_C_cAtn@ye@nfC_eC|gGahH~s@w}@``Fi~FpnAooC|u@wlEaEedRlYkrPvKerBfYs}Arg@m}AtrCkzElw@gjBbh@woBhR{gCwGkgCc[wtCuOapAcFoh@uBy[yBgr@c@iq@o@wvEv@sp@`FajBfCaq@fIipAdy@ewJlUc`ExGuaBdEmbBpBssArAuqBBg}@s@g{AkB{bBif@_bYmC}r@kDgm@sPq_BuJ_s@{X_{AsK_d@eM{d@wVgx@oWcu@??aDmOkNia@wFoSmDyMyCkPiBePwAob@XcQ|@oNdCoSfFwXhEmOnLi\\lbAulB`X_d@|k@au@bc@oc@bqC}{BhwDgcD`l@ed@??bL{G|a@eTje@oS~]cLr~Bgh@|b@}Jv}EieAlv@sPluD{z@nzA_]`|KchCtd@sPvb@wSb{@ko@f`RooQ~e[upZbuIolI|gFafFzu@iq@nMmJ|OeJn^{Qjh@yQhc@uJ~j@iGdd@kAp~BkBxO{@|QsAfYgEtYiGd]}Jpd@wRhVoNzNeK`j@ce@vgK}cJnSoSzQkVvUm^rSgc@`Uql@xIq\\vIgg@~kDyq[nIir@jNoq@xNwc@fYik@tk@su@neB}uBhqEesFjoGeyHtCoD|D}Ed|@ctAbIuOzqB_}D~NgY`\\um@v[gm@v{Cw`G`w@o{AdjAwzBh{C}`Gpp@ypAxn@}mAfz@{bBbNia@??jIab@`CuOlC}YnAcV`@_^m@aeB}@yk@YuTuBg^uCkZiGk\\yGeY}Lu_@oOsZiTe[uWi[sl@mo@soAauAsrBgzBqgAglAyd@ig@asAcyAklA}qAwHkGi{@s~@goAmsAyDeEirB_{B}IsJuEeFymAssAkdAmhAyTcVkFeEoKiH}l@kp@wg@sj@ku@ey@uh@kj@}EsFmG}Jk^_r@_f@m~@ym@yjA??a@cFd@kBrCgDbAUnAcBhAyAdk@et@??kF}D??OL"}]}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
#info {
width: 100%;
height: 24rem;
overflow: scroll;
display: flex;
align-items: baseline;
border: 1px solid black;
justify-content: flex-start;
}

View File

@@ -0,0 +1,22 @@
---
layout: example.html
title: Custom Drag-and-Drop (KMZ)
shortdesc: Example of using the drag-and-drop interaction with a custom format to handle KMZ files.
docs: >
Example of using the drag-and-drop interaction with a custom format to handle KMZ files.
In addition to the formats used in the [Drag-and-Drop](drag-and-drop.html) example a custom format (subclassing KML) is used to handle KMZ files.
KML and icons must be extracted from the KMZ array buffer synchronously.
<a href="https://stuk.github.io/jszip/documentation/upgrade_guide.html" target="_blank">JSZip 2.x</a> is used as it has better browser compatibility and is simpler to code than the more recent <a href="https://github.com/ericvergnaud/jszip#readme" target="_blank">JSZip-sync</a>.
There is no projection transform support, so this will only work with data in EPSG:4326 and EPSG:3857.
tags: "drag-and-drop, kml, kmz"
resources:
- https://cdnjs.cloudflare.com/ajax/libs/jszip/2.6.1/jszip.min.js
---
<div id="map" class="map"></div>
<br />
<div>
<a id="download" download></a>
<button id="download-kmz">Download sample</button>
</div>
<br />
<div id="info">&nbsp;</div>

View File

@@ -0,0 +1,155 @@
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {
DragAndDrop,
defaults as defaultInteractions,
} from '../src/ol/interaction.js';
import {GPX, GeoJSON, IGC, KML, TopoJSON} from '../src/ol/format.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
// Create functions to extract KML and icons from KMZ array buffer,
// which must be done synchronously.
const zip = new JSZip();
function getKMLData(buffer) {
let kmlData;
zip.load(buffer);
const kmlFile = zip.file(/.kml$/i)[0];
if (kmlFile) {
kmlData = kmlFile.asText();
}
return kmlData;
}
function getKMLImage(href) {
let url = href;
let path = window.location.href;
path = path.slice(0, path.lastIndexOf('/') + 1);
if (href.indexOf(path) === 0) {
const regexp = new RegExp(href.replace(path, '') + '$', 'i');
const kmlFile = zip.file(regexp)[0];
if (kmlFile) {
url = URL.createObjectURL(new Blob([kmlFile.asArrayBuffer()]));
}
}
return url;
}
// Define a KMZ format class by subclassing ol/format/KML
class KMZ extends KML {
constructor(opt_options) {
const options = opt_options || {};
options.iconUrlFunction = getKMLImage;
super(options);
}
getType() {
return 'arraybuffer';
}
readFeature(source, options) {
const kmlData = getKMLData(source);
return super.readFeature(kmlData, options);
}
readFeatures(source, options) {
const kmlData = getKMLData(source);
return super.readFeatures(kmlData, options);
}
}
// Set up map with Drag and Drop interaction
const dragAndDropInteraction = new DragAndDrop({
formatConstructors: [KMZ, GPX, GeoJSON, IGC, KML, TopoJSON],
});
const map = new Map({
interactions: defaultInteractions().extend([dragAndDropInteraction]),
layers: [
new TileLayer({
source: new OSM(),
}),
],
target: 'map',
view: new View({
center: [0, 0],
zoom: 2,
}),
});
dragAndDropInteraction.on('addfeatures', function (event) {
const vectorSource = new VectorSource({
features: event.features,
});
map.addLayer(
new VectorLayer({
source: vectorSource,
})
);
map.getView().fit(vectorSource.getExtent());
});
const displayFeatureInfo = function (pixel) {
const features = [];
map.forEachFeatureAtPixel(pixel, function (feature) {
features.push(feature);
});
if (features.length > 0) {
const info = [];
let i, ii;
for (i = 0, ii = features.length; i < ii; ++i) {
const description =
features[i].get('description') ||
features[i].get('name') ||
features[i].get('_name') ||
features[i].get('layer');
if (description) {
info.push(description);
}
}
document.getElementById('info').innerHTML = info.join('<br/>') || '&nbsp';
} else {
document.getElementById('info').innerHTML = '&nbsp;';
}
};
map.on('pointermove', function (evt) {
if (evt.dragging) {
return;
}
const pixel = map.getEventPixel(evt.originalEvent);
displayFeatureInfo(pixel);
});
map.on('click', function (evt) {
displayFeatureInfo(evt.pixel);
});
// Sample data download
const link = document.getElementById('download');
function download(fullpath, filename) {
fetch(fullpath)
.then(function (response) {
return response.blob();
})
.then(function (blob) {
if (navigator.msSaveBlob) {
// link download attribuute does not work on MS browsers
navigator.msSaveBlob(blob, filename);
} else {
link.href = URL.createObjectURL(blob);
link.download = filename;
link.click();
}
});
}
document.getElementById('download-kmz').addEventListener('click', function () {
download('data/kmz/iceland.kmz', 'iceland.kmz');
});

View File

@@ -0,0 +1,3 @@
.tileCoord input {
width: 60px;
}

View File

@@ -0,0 +1,23 @@
---
layout: example.html
title: Custom Drag-and-Drop (MVT preview)
shortdesc: Example of using the drag-and-drop interaction with a custom format to preview MVT tiles.
docs: >
Example of using the drag-and-drop interaction with a custom format to preview MVT tiles.
In addition to the formats used in the [Drag-and-Drop](drag-and-drop.html) example individual MVT tiles can be previewed.
There is no projection transform support, so this will only work with data in EPSG:4326 and EPSG:3857.
tags: "drag-and-drop, mvt"
---
<div id="map" class="map"></div>
<br />
<div class="tileCoord">
<a id="download" download></a>
<span>Tile coordinate&nbsp;&nbsp;</span>
<span>&nbsp;z: <input type="number" id="tileCoordZ" value="6" /></span>
<span>&nbsp;x: <input type="number" id="tileCoordX" value="30" /></span>
<span>&nbsp;y: <input type="number" id="tileCoordY" value="20" /></span>
<span>&nbsp;&nbsp;</span>
<button id="download-mvt">Download sample</button>
</div>
<br />
<div id="info">&nbsp;</div>

View File

@@ -0,0 +1,133 @@
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {
DragAndDrop,
defaults as defaultInteractions,
} from '../src/ol/interaction.js';
import {GPX, GeoJSON, IGC, KML, MVT, TopoJSON} from '../src/ol/format.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
import {createXYZ} from '../src/ol/tilegrid.js';
// Define a custom MVT format as ol/format/MVT requires an extent
const tileCoordZ = document.getElementById('tileCoordZ');
const tileCoordX = document.getElementById('tileCoordX');
const tileCoordY = document.getElementById('tileCoordY');
class customMVT extends MVT {
constructor() {
super({featureClass: Feature});
}
readFeatures(source, options) {
options.extent = createXYZ().getTileCoordExtent([
parseInt(tileCoordZ.value),
parseInt(tileCoordX.value),
parseInt(tileCoordY.value),
]);
return super.readFeatures(source, options);
}
}
// Set up map with Drag and Drop interaction
const dragAndDropInteraction = new DragAndDrop({
formatConstructors: [customMVT, GPX, GeoJSON, IGC, KML, TopoJSON],
});
const map = new Map({
interactions: defaultInteractions().extend([dragAndDropInteraction]),
layers: [
new TileLayer({
source: new OSM(),
}),
],
target: 'map',
view: new View({
center: [0, 0],
zoom: 2,
}),
});
dragAndDropInteraction.on('addfeatures', function (event) {
const vectorSource = new VectorSource({
features: event.features,
});
map.addLayer(
new VectorLayer({
source: vectorSource,
})
);
map.getView().fit(vectorSource.getExtent());
});
const displayFeatureInfo = function (pixel) {
const features = [];
map.forEachFeatureAtPixel(pixel, function (feature) {
features.push(feature);
});
if (features.length > 0) {
const info = [];
let i, ii;
for (i = 0, ii = features.length; i < ii; ++i) {
const description =
features[i].get('name') ||
features[i].get('_name') ||
features[i].get('layer');
if (description) {
info.push(description);
}
}
document.getElementById('info').innerHTML = info.join(', ') || '&nbsp';
} else {
document.getElementById('info').innerHTML = '&nbsp;';
}
};
map.on('pointermove', function (evt) {
if (evt.dragging) {
return;
}
const pixel = map.getEventPixel(evt.originalEvent);
displayFeatureInfo(pixel);
});
map.on('click', function (evt) {
displayFeatureInfo(evt.pixel);
});
// Sample data download
const link = document.getElementById('download');
function download(fullpath, filename) {
fetch(fullpath)
.then(function (response) {
return response.blob();
})
.then(function (blob) {
if (navigator.msSaveBlob) {
// link download attribuute does not work on MS browsers
navigator.msSaveBlob(blob, filename);
} else {
link.href = URL.createObjectURL(blob);
link.download = filename;
link.click();
}
});
}
document.getElementById('download-mvt').addEventListener('click', function () {
const fullpath =
'https://basemaps.arcgis.com/v1/arcgis/rest/services/World_Basemap/VectorTileServer/tile/' +
tileCoordZ.value +
'/' +
tileCoordY.value +
'/' +
tileCoordX.value +
'.pbf';
const filename =
tileCoordZ.value + '-' + tileCoordX.value + '-' + tileCoordY.value + '.mvt';
download(fullpath, filename);
});

View File

@@ -10,4 +10,20 @@ cloak:
value: Get your own API key at https://www.maptiler.com/cloud/
---
<div id="map" class="map"></div>
<div><label><input type="checkbox" id="extractstyles" checked /> Extract styles from KML</label></div>
<br />
<div>
<a id="download" download></a>
Download samples:&nbsp;&nbsp;
<button id="download-gpx">GPX</button>
&nbsp;
<button id="download-geojson">GeoJSON</button>
&nbsp;
<button id="download-igc">IGC</button>
&nbsp;
<button id="download-kml">KML</button>
&nbsp;
<button id="download-topojson">TopoJSON</button>
</div>
<br />
<div id="info">&nbsp;</div>

View File

@@ -1,24 +1,16 @@
import DragAndDrop from '../src/ol/interaction/DragAndDrop.js';
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {
DragAndDrop,
defaults as defaultInteractions,
} from '../src/ol/interaction.js';
import {GPX, GeoJSON, IGC, KML, TopoJSON} from '../src/ol/format.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
import {Vector as VectorSource, XYZ} from '../src/ol/source.js';
const dragAndDropInteraction = new DragAndDrop({
formatConstructors: [GPX, GeoJSON, IGC, KML, TopoJSON],
});
const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB';
const 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>';
const map = new Map({
interactions: defaultInteractions().extend([dragAndDropInteraction]),
layers: [
new TileLayer({
source: new XYZ({
@@ -36,7 +28,24 @@ const map = new Map({
}),
});
dragAndDropInteraction.on('addfeatures', function (event) {
const extractStyles = document.getElementById('extractstyles');
let dragAndDropInteraction;
function setInteraction() {
if (dragAndDropInteraction) {
map.removeInteraction(dragAndDropInteraction);
}
dragAndDropInteraction = new DragAndDrop({
formatConstructors: [
GPX,
GeoJSON,
IGC,
// use constructed format to set options
new KML({extractStyles: extractStyles.checked}),
TopoJSON,
],
});
dragAndDropInteraction.on('addfeatures', function (event) {
const vectorSource = new VectorSource({
features: event.features,
});
@@ -46,7 +55,12 @@ dragAndDropInteraction.on('addfeatures', function (event) {
})
);
map.getView().fit(vectorSource.getExtent());
});
});
map.addInteraction(dragAndDropInteraction);
}
setInteraction();
extractStyles.addEventListener('change', setInteraction);
const displayFeatureInfo = function (pixel) {
const features = [];
@@ -76,3 +90,48 @@ map.on('pointermove', function (evt) {
map.on('click', function (evt) {
displayFeatureInfo(evt.pixel);
});
// Sample data downloads
const link = document.getElementById('download');
function download(fullpath, filename) {
fetch(fullpath)
.then(function (response) {
return response.blob();
})
.then(function (blob) {
if (navigator.msSaveBlob) {
// link download attribuute does not work on MS browsers
navigator.msSaveBlob(blob, filename);
} else {
link.href = URL.createObjectURL(blob);
link.download = filename;
link.click();
}
});
}
document.getElementById('download-gpx').addEventListener('click', function () {
download('data/gpx/fells_loop.gpx', 'fells_loop.gpx');
});
document
.getElementById('download-geojson')
.addEventListener('click', function () {
download('data/geojson/roads-seoul.geojson', 'roads-seoul.geojson');
});
document.getElementById('download-igc').addEventListener('click', function () {
download('data/igc/Ulrich-Prinz.igc', 'Ulrich-Prinz.igc');
});
document.getElementById('download-kml').addEventListener('click', function () {
download('data/kml/states.kml', 'states.kml');
});
document
.getElementById('download-topojson')
.addEventListener('click', function () {
download('data/topojson/fr-departments.json', 'fr-departments.json');
});

View File

@@ -8,7 +8,7 @@ tags: "draw, edit, modify, vector, featureoverlay"
---
<div id="map" class="map"></div>
<form class="form-inline">
<label>Geometry type &nbsp;</label>
<label for="type">Geometry type &nbsp;</label>
<select id="type">
<option value="Point">Point</option>
<option value="LineString">LineString</option>

View File

@@ -6,17 +6,18 @@ docs: >
Example of using the Draw interaction. Select a geometry type from the
dropdown above to start drawing. To finish drawing, click the last
point. To activate freehand drawing for lines, polygons, and circles, hold
the `Shift` key.
the `Shift` key. To remove the last point of a line or polygon, press "Undo".
tags: "draw, edit, freehand, vector"
---
<div id="map" class="map"></div>
<form class="form-inline">
<label>Geometry type &nbsp;</label>
<select id="type">
<label for="type">Geometry type: &nbsp;</label>
<select class="form-control mr-2 mb-2 mt-2" id="type">
<option value="Point">Point</option>
<option value="LineString">LineString</option>
<option value="Polygon">Polygon</option>
<option value="Circle">Circle</option>
<option value="None">None</option>
</select>
<input class="form-control mr-2 mb-2 mt-2" type="button" value="Undo" id="undo">
</form>

View File

@@ -45,4 +45,8 @@ typeSelect.onchange = function () {
addInteraction();
};
document.getElementById('undo').addEventListener('click', function () {
draw.removeLastPoint();
});
addInteraction();

View File

@@ -12,7 +12,7 @@ tags: "draw, edit, freehand, vector"
---
<div id="map" class="map"></div>
<form class="form-inline">
<label>Geometry type &nbsp;</label>
<label for="type">Geometry type &nbsp;</label>
<select id="type">
<option value="LineString">LineString</option>
<option value="Polygon">Polygon</option>

View File

@@ -9,18 +9,19 @@ docs: >
achieved by using `type: 'Circle'` type with a `geometryFunction` that creates
a 4-sided regular polygon instead of a circle. Box drawing uses `type: 'Circle'`
with a `geometryFunction` that creates a box-shaped polygon instead of a
circle. Star drawing uses a custom geometry function that coverts a circle
into a start using the center and radius provided by the draw interaction.
circle. Star drawing uses a custom geometry function that converts a circle
into a star using the center and radius provided by the draw interaction.
tags: "draw, edit, freehand, vector"
---
<div id="map" class="map"></div>
<form class="form-inline">
<label>Shape type &nbsp;</label>
<select id="type">
<label for="type">Shape type: &nbsp;</label>
<select class="form-control mr-2 mb-2 mt-2" id="type">
<option value="Circle">Circle</option>
<option value="Square">Square</option>
<option value="Box">Box</option>
<option value="Star">Star</option>
<option value="None">None</option>
</select>
<input class="form-control mr-2 mb-2 mt-2" type="button" value="Undo" id="undo">
</form>

View File

@@ -44,7 +44,7 @@ function addInteraction() {
value = 'Circle';
geometryFunction = function (coordinates, geometry) {
const center = coordinates[0];
const last = coordinates[1];
const last = coordinates[coordinates.length - 1];
const dx = center[0] - last[0];
const dy = center[1] - last[1];
const radius = Math.sqrt(dx * dx + dy * dy);
@@ -84,4 +84,8 @@ typeSelect.onchange = function () {
addInteraction();
};
document.getElementById('undo').addEventListener('click', function () {
draw.removeLastPoint();
});
addInteraction();

View File

@@ -14,7 +14,7 @@ resources:
</div>
</div>
<form class="form">
<label>Page size </label>
<label for="format">Page size </label>
<select id="format">
<option value="a0">A0 (slow)</option>
<option value="a1">A1</option>
@@ -23,7 +23,7 @@ resources:
<option value="a4" selected>A4</option>
<option value="a5">A5 (fast)</option>
</select>
<label>Resolution </label>
<label for="resolution">Resolution </label>
<select id="resolution">
<option value="72">72 dpi (fast)</option>
<option value="150">150 dpi</option>

View File

@@ -15,124 +15,6 @@ import {
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
import {getVectorContext} from '../src/ol/render.js';
// This long string is placed here due to jsFiddle limitations.
// It is usually loaded with AJAX.
const polyline = [
'hldhx@lnau`BCG_EaC??cFjAwDjF??uBlKMd@}@z@??aC^yk@z_@se@b[wFdE??wFfE}N',
'fIoGxB_I\\gG}@eHoCyTmPqGaBaHOoD\\??yVrGotA|N??o[N_STiwAtEmHGeHcAkiA}^',
'aMyBiHOkFNoI`CcVvM??gG^gF_@iJwC??eCcA]OoL}DwFyCaCgCcCwDcGwHsSoX??wI_E',
'kUFmq@hBiOqBgTwS??iYse@gYq\\cp@ce@{vA}s@csJqaE}{@iRaqE{lBeRoIwd@_T{]_',
'Ngn@{PmhEwaA{SeF_u@kQuyAw]wQeEgtAsZ}LiCarAkVwI}D??_}RcjEinPspDwSqCgs@',
'sPua@_OkXaMeT_Nwk@ob@gV}TiYs[uTwXoNmT{Uyb@wNg]{Nqa@oDgNeJu_@_G}YsFw]k',
'DuZyDmm@i_@uyIJe~@jCg|@nGiv@zUi_BfNqaAvIow@dEed@dCcf@r@qz@Egs@{Acu@mC',
'um@yIey@gGig@cK_m@aSku@qRil@we@{mAeTej@}Tkz@cLgr@aHko@qOmcEaJw~C{w@ka',
'i@qBchBq@kmBS{kDnBscBnFu_Dbc@_~QHeU`IuyDrC_}@bByp@fCyoA?qMbD}{AIkeAgB',
'k_A_A{UsDke@gFej@qH{o@qGgb@qH{`@mMgm@uQus@kL{_@yOmd@ymBgwE}x@ouBwtA__',
'DuhEgaKuWct@gp@cnBii@mlBa_@}|Asj@qrCg^eaC}L{dAaJ_aAiOyjByH{nAuYu`GsAw',
'Xyn@ywMyOyqD{_@cfIcDe}@y@aeBJmwA`CkiAbFkhBlTgdDdPyiB`W}xDnSa}DbJyhCrX',
'itAhT}x@bE}Z_@qW_Kwv@qKaaAiBgXvIm}A~JovAxCqW~WanB`XewBbK{_A`K}fBvAmi@',
'xBycBeCauBoF}}@qJioAww@gjHaPopA_NurAyJku@uGmi@cDs[eRaiBkQstAsQkcByNma',
'CsK_uBcJgbEw@gkB_@ypEqDoqSm@eZcDwjBoGw`BoMegBaU_`Ce_@_uBqb@ytBwkFqiT_',
'fAqfEwe@mfCka@_eC_UmlB}MmaBeWkkDeHwqAoX}~DcBsZmLcxBqOwqE_DkyAuJmrJ\\o',
'~CfIewG|YibQxBssB?es@qGciA}RorAoVajA_nAodD{[y`AgPqp@mKwr@ms@umEaW{dAm',
'b@umAw|@ojBwzDaaJsmBwbEgdCsrFqhAihDquAi`Fux@}_Dui@_eB_u@guCuyAuiHukA_',
'lKszAu|OmaA{wKm}@clHs_A_rEahCssKo\\sgBsSglAqk@yvDcS_wAyTwpBmPc|BwZknF',
'oFscB_GsaDiZmyMyLgtHgQonHqT{hKaPg}Dqq@m~Hym@c`EuiBudIabB{hF{pWifx@snA',
'w`GkFyVqf@y~BkoAi}Lel@wtc@}`@oaXi_C}pZsi@eqGsSuqJ|Lqeb@e]kgPcaAu}SkDw',
'zGhn@gjYh\\qlNZovJieBqja@ed@siO{[ol\\kCmjMe\\isHorCmec@uLebB}EqiBaCg}',
'@m@qwHrT_vFps@kkI`uAszIrpHuzYxx@e{Crw@kpDhN{wBtQarDy@knFgP_yCu\\wyCwy',
'A{kHo~@omEoYmoDaEcPiuAosDagD}rO{{AsyEihCayFilLaiUqm@_bAumFo}DgqA_uByi',
'@swC~AkzDlhA}xEvcBa}Cxk@ql@`rAo|@~bBq{@``Bye@djDww@z_C_cAtn@ye@nfC_eC',
'|gGahH~s@w}@``Fi~FpnAooC|u@wlEaEedRlYkrPvKerBfYs}Arg@m}AtrCkzElw@gjBb',
'h@woBhR{gCwGkgCc[wtCuOapAcFoh@uBy[yBgr@c@iq@o@wvEv@sp@`FajBfCaq@fIipA',
'dy@ewJlUc`ExGuaBdEmbBpBssArAuqBBg}@s@g{AkB{bBif@_bYmC}r@kDgm@sPq_BuJ_',
's@{X_{AsK_d@eM{d@wVgx@oWcu@??aDmOkNia@wFoSmDyMyCkPiBePwAob@XcQ|@oNdCo',
'SfFwXhEmOnLi\\lbAulB`X_d@|k@au@bc@oc@bqC}{BhwDgcD`l@ed@??bL{G|a@eTje@',
'oS~]cLr~Bgh@|b@}Jv}EieAlv@sPluD{z@nzA_]`|KchCtd@sPvb@wSb{@ko@f`RooQ~e',
'[upZbuIolI|gFafFzu@iq@nMmJ|OeJn^{Qjh@yQhc@uJ~j@iGdd@kAp~BkBxO{@|QsAfY',
'gEtYiGd]}Jpd@wRhVoNzNeK`j@ce@vgK}cJnSoSzQkVvUm^rSgc@`Uql@xIq\\vIgg@~k',
'Dyq[nIir@jNoq@xNwc@fYik@tk@su@neB}uBhqEesFjoGeyHtCoD|D}Ed|@ctAbIuOzqB',
'_}D~NgY`\\um@v[gm@v{Cw`G`w@o{AdjAwzBh{C}`Gpp@ypAxn@}mAfz@{bBbNia@??jI',
'ab@`CuOlC}YnAcV`@_^m@aeB}@yk@YuTuBg^uCkZiGk\\yGeY}Lu_@oOsZiTe[uWi[sl@',
'mo@soAauAsrBgzBqgAglAyd@ig@asAcyAklA}qAwHkGi{@s~@goAmsAyDeEirB_{B}IsJ',
'uEeFymAssAkdAmhAyTcVkFeEoKiH}l@kp@wg@sj@ku@ey@uh@kj@}EsFmG}Jk^_r@_f@m',
'~@ym@yjA??a@cFd@kBrCgDbAUnAcBhAyAdk@et@??kF}D??OL',
].join('');
const route = /** @type {import("../src/ol/geom/LineString.js").default} */ (new Polyline(
{
factor: 1e6,
}
).readGeometry(polyline, {
dataProjection: 'EPSG:4326',
featureProjection: 'EPSG:3857',
}));
const routeCoords = route.getCoordinates();
const routeLength = routeCoords.length;
const routeFeature = new Feature({
type: 'route',
geometry: route,
});
const geoMarker = /** @type Feature<import("../src/ol/geom/Point").default> */ (new Feature(
{
type: 'geoMarker',
geometry: new Point(routeCoords[0]),
}
));
const startMarker = new Feature({
type: 'icon',
geometry: new Point(routeCoords[0]),
});
const endMarker = new Feature({
type: 'icon',
geometry: new Point(routeCoords[routeLength - 1]),
});
const styles = {
'route': new Style({
stroke: new Stroke({
width: 6,
color: [237, 212, 0, 0.8],
}),
}),
'icon': new Style({
image: new Icon({
anchor: [0.5, 1],
src: 'data/icon.png',
}),
}),
'geoMarker': new Style({
image: new CircleStyle({
radius: 7,
fill: new Fill({color: 'black'}),
stroke: new Stroke({
color: 'white',
width: 2,
}),
}),
}),
};
let animating = false;
let speed, now;
const speedInput = document.getElementById('speed');
const startButton = document.getElementById('start-animation');
const vectorLayer = new VectorLayer({
source: new VectorSource({
features: [routeFeature, geoMarker, startMarker, endMarker],
}),
style: function (feature) {
// hide geoMarker if animation is active
if (animating && feature.get('type') === 'geoMarker') {
return null;
}
return styles[feature.get('type')];
},
});
const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB';
const attributions =
'<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> ' +
@@ -155,63 +37,134 @@ const map = new Map({
tileSize: 512,
}),
}),
vectorLayer,
],
});
const moveFeature = function (event) {
// The polyline string is read from a JSON similiar to those returned
// by directions APIs such as Openrouteservice and Mapbox.
fetch('data/polyline/route.json').then(function (response) {
response.json().then(function (result) {
const polyline = result.routes[0].geometry;
const route = new Polyline({
factor: 1e6,
}).readGeometry(polyline, {
dataProjection: 'EPSG:4326',
featureProjection: 'EPSG:3857',
});
const routeFeature = new Feature({
type: 'route',
geometry: route,
});
const geoMarker = new Feature({
type: 'geoMarker',
geometry: new Point(route.getCoordinateAt(0)),
});
const startMarker = new Feature({
type: 'icon',
geometry: new Point(route.getCoordinateAt(0)),
});
const endMarker = new Feature({
type: 'icon',
geometry: new Point(route.getCoordinateAt(1)),
});
const styles = {
'route': new Style({
stroke: new Stroke({
width: 6,
color: [237, 212, 0, 0.8],
}),
}),
'icon': new Style({
image: new Icon({
anchor: [0.5, 1],
src: 'data/icon.png',
}),
}),
'geoMarker': new Style({
image: new CircleStyle({
radius: 7,
fill: new Fill({color: 'black'}),
stroke: new Stroke({
color: 'white',
width: 2,
}),
}),
}),
};
let animating = false;
const vectorLayer = new VectorLayer({
source: new VectorSource({
features: [routeFeature, geoMarker, startMarker, endMarker],
}),
style: function (feature) {
// hide geoMarker if animation is active
if (animating && feature.get('type') === 'geoMarker') {
return null;
}
return styles[feature.get('type')];
},
});
map.addLayer(vectorLayer);
let speed, startTime;
const speedInput = document.getElementById('speed');
const startButton = document.getElementById('start-animation');
function moveFeature(event) {
const vectorContext = getVectorContext(event);
const frameState = event.frameState;
if (animating) {
const elapsedTime = frameState.time - now;
// here the trick to increase speed is to jump some indexes
// on lineString coordinates
const index = Math.round((speed * elapsedTime) / 1000);
const elapsedTime = frameState.time - startTime;
const distance = (speed * elapsedTime) / 1e6;
if (index >= routeLength) {
if (distance >= 1) {
stopAnimation(true);
return;
}
const currentPoint = new Point(routeCoords[index]);
const currentPoint = new Point(route.getCoordinateAt(distance));
const feature = new Feature(currentPoint);
vectorContext.drawFeature(feature, styles.geoMarker);
}
// tell OpenLayers to continue the postrender animation
map.render();
};
}
function startAnimation() {
function startAnimation() {
if (animating) {
stopAnimation(false);
} else {
animating = true;
now = new Date().getTime();
startTime = new Date().getTime();
speed = speedInput.value;
startButton.textContent = 'Cancel Animation';
// hide geoMarker
geoMarker.setStyle(null);
geoMarker.changed();
// just in case you pan somewhere else
map.getView().setCenter(center);
vectorLayer.on('postrender', moveFeature);
map.render();
}
}
}
/**
* @param {boolean} ended end of animation.
*/
function stopAnimation(ended) {
function stopAnimation(ended) {
animating = false;
startButton.textContent = 'Start Animation';
// if animation cancelled set the marker at the beginning
const coord = ended ? routeCoords[routeLength - 1] : routeCoords[0];
const geometry = geoMarker.getGeometry();
geometry.setCoordinates(coord);
//remove listener
const coord = route.getCoordinateAt(ended ? 1 : 0);
geoMarker.getGeometry().setCoordinates(coord);
// remove listener
vectorLayer.un('postrender', moveFeature);
}
}
startButton.addEventListener('click', startAnimation, false);
startButton.addEventListener('click', startAnimation, false);
});
});

View File

@@ -19,8 +19,8 @@ experimental: true
<form>
<div id="status">Show impacts between <span class="min-year"></span> and <span class="max-year"></span></div>
<label>Minimum year:</label>
<label for="min-year">Minimum year:</label>
<input id="min-year" type="range" min="1850" max="2015" step="1" value="1850"/>
<label>Maximum year:</label>
<label for="max-year">Maximum year:</label>
<input id="max-year" type="range" min="1850" max="2015" step="1" value="2015"/>
</form>

View File

@@ -35,6 +35,8 @@ tags: "fullscreen, geolocation, orientation, mobile"
left: 10px;
}
</style>
<script src="https://unpkg.com/elm-pep"></script>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL"></script>
</head>
<body>
<div id="map" class="map"></div>

View File

@@ -8,8 +8,8 @@ tags: "heatmap, kml, vector, style, webgl"
---
<div id="map" class="map"></div>
<form>
<label>radius size</label>
<label for="radius">radius size</label>
<input id="radius" type="range" min="1" max="50" step="1" value="5"/>
<label>blur size</label>
<label for="blur">blur size</label>
<input id="blur" type="range" min="1" max="50" step="1" value="15"/>
</form>

View File

@@ -0,0 +1,9 @@
---
layout: example.html
title: Hit tolerance priority
shortdesc: Shows bad behavior of hit detection with hit tolerance.
docs: >
Hover over the map and observe how the small circles get a black outline as you hover over them. Is the expected feature getting highlighted?
tags: "simple, openstreetmap"
---
<div id="map" class="map"></div>

View File

@@ -0,0 +1,84 @@
import CircleStyle from '../src/ol/style/Circle.js';
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {Fill, Stroke, Style} from '../src/ol/style.js';
import {Point} from '../src/ol/geom.js';
const map = new Map({
target: 'map',
view: new View({
center: [0, 0],
resolution: 1,
resolutions: [1],
}),
});
const vectorLayer = new VectorLayer({
source: new VectorSource({
features: [
new Feature({
geometry: new Point([0, 0]),
color: 'white',
}),
new Feature({
geometry: new Point([-10, 0]),
color: 'fuchsia',
}),
new Feature({
geometry: new Point([-10, -10]),
color: 'orange',
}),
new Feature({
geometry: new Point([-10, 10]),
color: 'cyan',
}),
],
}),
style: (feature) => {
return new Style({
image: new CircleStyle({
radius: 5,
fill: new Fill({
color: feature.get('color'),
}),
stroke: new Stroke({
color: 'gray',
width: 1,
}),
}),
});
},
});
map.addLayer(vectorLayer);
const highlightFeature = new Feature(new Point([NaN, NaN]));
highlightFeature.setStyle(
new Style({
image: new CircleStyle({
radius: 5,
stroke: new Stroke({
color: 'black',
width: 2,
}),
}),
})
);
vectorLayer.getSource().addFeature(highlightFeature);
map.on('pointermove', (e) => {
const hit = map.forEachFeatureAtPixel(
e.pixel,
(feature) => {
highlightFeature.setGeometry(feature.getGeometry().clone());
return true;
},
{
hitTolerance: 10,
}
);
if (!hit) {
highlightFeature.setGeometry(new Point([NaN, NaN]));
}
});

View File

@@ -11,15 +11,14 @@ docs: >
tags: "hitTolerance"
---
<div id="map" class="map"></div>
<span id="status">Try to click the line in the map.</span>
<form class="form-inline">
<span id="status">&nbsp;No feature got hit.</span>
<br />
<label>Hit tolerance for selecting features </label>
<label for="hitTolerance">Hit tolerance for selecting features: &nbsp;</label>
<select id="hitTolerance" class="form-control">
<option value="0" selected>0 Pixels</option>
<option value="5">5 Pixels</option>
<option value="10">10 Pixels</option>
</select>
<br />
Area: &nbsp;<canvas id="circle" style="vertical-align: middle"/>
&nbsp; Area: &nbsp;
<canvas id="circle" style="vertical-align: middle" />
</form>

View File

@@ -57,10 +57,10 @@ map.on('singleclick', function (e) {
);
if (hit) {
style.getStroke().setColor('green');
statusElement.innerHTML = '&nbsp;A feature got hit!';
statusElement.innerHTML = 'A feature got hit!';
} else {
style.getStroke().setColor('black');
statusElement.innerHTML = '&nbsp;No feature got hit.';
statusElement.innerHTML = 'No feature got hit.';
}
feature.changed();
});

View File

@@ -41,7 +41,7 @@ rome.setStyle(
london.setStyle(
new Style({
image: new Icon({
color: '#4271AE',
color: 'rgba(255, 0, 0, .5)',
crossOrigin: 'anonymous',
src: 'data/bigdot.png',
scale: 0.2,
@@ -91,7 +91,7 @@ const vectorLayer = new VectorLayer({
const rasterLayer = new TileLayer({
source: new TileJSON({
url: 'https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json',
url: 'https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json?secure=1',
crossOrigin: '',
}),
});

View File

@@ -12,7 +12,7 @@ import {getVectorContext} from '../src/ol/render.js';
const rasterLayer = new TileLayer({
source: new TileJSON({
url: 'https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json',
url: 'https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json?secure=1',
crossOrigin: '',
}),
});

View File

@@ -21,6 +21,6 @@ cloak:
<div id="map" class="map"></div>
<div>Current sighting: <span id="info"></span></div>
<div>
Filter by UFO shape:
<label for="shape-filter">Filter by UFO shape:</label>
<select id="shape-filter"></select>
</div>

View File

@@ -36,7 +36,7 @@ const vectorLayer = new VectorLayer({
const rasterLayer = new TileLayer({
source: new TileJSON({
url: 'https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json',
url: 'https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json?secure=1',
crossOrigin: '',
}),
});

View File

@@ -10,7 +10,7 @@ tags: "IIIF, IIIF Image API, tile source"
<div id="map" class="map"></div>
<div class="controls">
<div id="iiif-notification">&nbsp;</div>
Enter <code>info.json</code> URL:
<label for="imageInfoUrl">Enter <code>info.json</code> URL:</label>
<input type="text" id="imageInfoUrl" value="https://iiif.ub.uni-leipzig.de/iiif/j2k/0000/0107/0000010732/00000072.jpx/info.json">
<button id="display">Display image</button>
</div>

View File

@@ -28,29 +28,6 @@
.example:hover {
background-color: #F5F5F5;
}
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-button {
width: 0;
height: 0;
display: none;
}
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.2);
-webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.10),inset 0 -1px 0 rgba(0, 0, 0, 0.07);
}
::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
}
::-webkit-scrollbar-corner {
background-color: transparent;
}
</style>
<script type="text/javascript" src="Jugl.js"></script>
<script type="text/javascript" src="examples-info.js"></script>
@@ -86,7 +63,7 @@
<a class="dropdown-item" href="../doc/quickstart.html"><i class="fa fa-check fa-fw mr-2 fa-lg"></i>Quick Start</a>
<a class="dropdown-item" href="../doc/faq.html"><i class="fa fa-question fa-fw mr-2 fa-lg"></i>FAQ</a>
<a class="dropdown-item" href="../doc/tutorials/"><i class="fa fa-book fa-fw mr-2 fa-lg"></i>Tutorials</a>
<a class="dropdown-item" href="../workshop/"><i class="fa fa-graduation-cap fa-fw mr-2 fa-lg"></i>Workshop</a>
<a class="dropdown-item" href="/workshop/"><i class="fa fa-graduation-cap fa-fw mr-2 fa-lg"></i>Workshop</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i class="fa fa-stack-overflow fa-fw mr-2"></i>Ask a Question</a>
</div>
@@ -97,7 +74,7 @@
<a class="nav-link dropdown-toggle" href="#" id="codedropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Code</a>
<div class="dropdown-menu dropdown-menu-right mb-3" aria-labelledby="codedropdown">
<a class="dropdown-item" href="https://github.com/openlayers/openlayers"><i class="fa fa-github fa-fw mr-2 fa-lg"></i>Repository</a>
<a class="dropdown-item" href="../download/"><i class="fa fa-download fa-fw mr-2 fa-lg"></i>Download</a>
<a class="dropdown-item" href="/download/"><i class="fa fa-download fa-fw mr-2 fa-lg"></i>Download</a>
</div>
</li>
</ul>

View File

@@ -72,7 +72,7 @@
// sort examples, first by number of words matched, then
// by word frequency
examples.sort(function (a, b) {
return a.score - b.score || a.words - b.words;
return b.score - a.score || b.words - a.words;
});
return examples;
}

View File

@@ -1,3 +1,6 @@
#layertree li > span {
cursor: pointer;
}
#layertree label {
display: block;
}

View File

@@ -18,37 +18,44 @@ cloak:
<li><span>OSM layer</span>
<fieldset id="layer0">
<label class="checkbox" for="visible0">
<input id="visible0" class="visible" type="checkbox"/>visibility
visibile <input id="visible0" class="visible" type="checkbox"/>
</label>
<label>
opacity <input class="opacity" type="range" min="0" max="1" step="0.01"/>
</label>
<label>opacity</label>
<input class="opacity" type="range" min="0" max="1" step="0.01"/>
</fieldset>
</li>
<li><span>Layer group</span>
<li>
<span>Layer group</span>
<fieldset id="layer1">
<label class="checkbox" for="visible1">
<input id="visible1" class="visible" type="checkbox"/>visibility
visibile <input id="visible1" class="visible" type="checkbox"/>
</label>
<label>
opacity <input class="opacity" type="range" min="0" max="1" step="0.01"/>
</label>
<label>opacity</label>
<input class="opacity" type="range" min="0" max="1" step="0.01"/>
</fieldset>
<ul>
<li><span>Food insecurity layer</span>
<li>
<span>Food insecurity layer</span>
<fieldset id="layer10">
<label class="checkbox" for="visible10">
<input id="visible10" class="visible" type="checkbox"/>visibility
visibile <input id="visible10" class="visible" type="checkbox"/>
</label>
<label>
opacity <input class="opacity" type="range" min="0" max="1" step="0.01"/>
</label>
<label>opacity</label>
<input class="opacity" type="range" min="0" max="1" step="0.01"/>
</fieldset>
</li>
<li><span>World borders layer</span>
<li>
<span>World borders layer</span>
<fieldset id="layer11">
<label class="checkbox" for="visible11">
<input id="visible11" class="visible" type="checkbox"/>visibility
visibile <input id="visible11" class="visible" type="checkbox"/>
</label>
<label>
opacity <input class="opacity" type="range" min="0" max="1" step="0.01"/>
</label>
<label>opacity</label>
<input class="opacity" type="range" min="0" max="1" step="0.01"/>
</fieldset>
</li>
</ul>

View File

@@ -49,19 +49,21 @@ function bindInputs(layerid, layer) {
visibilityInput.prop('checked', layer.getVisible());
const opacityInput = $(layerid + ' input.opacity');
opacityInput.on('input change', function () {
opacityInput.on('input', function () {
layer.setOpacity(parseFloat(this.value));
});
opacityInput.val(String(layer.getOpacity()));
}
map.getLayers().forEach(function (layer, i) {
bindInputs('#layer' + i, layer);
function setup(id, group) {
group.getLayers().forEach(function (layer, i) {
const layerid = id + i;
bindInputs(layerid, layer);
if (layer instanceof LayerGroup) {
layer.getLayers().forEach(function (sublayer, j) {
bindInputs('#layer' + i + j, sublayer);
});
setup(layerid, layer);
}
});
});
}
setup('#layer', map.getLayerGroup());
$('#layertree li > span')
.click(function () {

View File

@@ -56,7 +56,7 @@ function createLayer(coordinates, style, zIndex) {
return vectorLayer;
}
const layer0 = createLayer([40, 40], styles['star'], 0);
const layer0 = createLayer([40, 40], styles['star']);
const layer1 = createLayer([0, 0], styles['square'], 1);
const layer2 = createLayer([0, 40], styles['triangle'], 0);

View File

@@ -16,7 +16,7 @@ tags: "draw, edit, measure, vector"
---
<div id="map" class="map"></div>
<form class="form-inline">
<label>Measurement type &nbsp;</label>
<label for="type">Measurement type &nbsp;</label>
<select id="type">
<option value="length">Length (LineString)</option>
<option value="area">Area (Polygon)</option>

View File

@@ -23,6 +23,8 @@ cloak:
height: 100%;
}
</style>
<script src="https://unpkg.com/elm-pep"></script>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL"></script>
</head>
<body>
<div id="map" class="map"></div>

10
examples/modify-icon.html Normal file
View File

@@ -0,0 +1,10 @@
---
layout: example.html
title: Icon modification
shortdesc: Example using a Modify interaction to edit an icon.
docs: >
The icon on this map can be dragged to modify its location.
<p>The Modify interaction can be configured with a `layer` option. With this option, hit detection will be used to determine the modification candidate.</p>
tags: "vector, modify, icon, marker"
---
<div id="map" class="map"></div>

66
examples/modify-icon.js Normal file
View File

@@ -0,0 +1,66 @@
import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js';
import Point from '../src/ol/geom/Point.js';
import TileJSON from '../src/ol/source/TileJSON.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {Icon, Style} from '../src/ol/style.js';
import {Modify} from '../src/ol/interaction.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
const iconFeature = new Feature({
geometry: new Point([0, 0]),
name: 'Null Island',
population: 4000,
rainfall: 500,
});
const iconStyle = new Style({
image: new Icon({
anchor: [0.5, 46],
anchorXUnits: 'fraction',
anchorYUnits: 'pixels',
src: 'data/icon.png',
}),
});
iconFeature.setStyle(iconStyle);
const vectorSource = new VectorSource({
features: [iconFeature],
});
const vectorLayer = new VectorLayer({
source: vectorSource,
});
const rasterLayer = new TileLayer({
source: new TileJSON({
url: 'https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json?secure=1',
crossOrigin: '',
}),
});
const target = document.getElementById('map');
const map = new Map({
layers: [rasterLayer, vectorLayer],
target: target,
view: new View({
center: [0, 0],
zoom: 3,
}),
});
const modify = new Modify({
hitDetection: vectorLayer,
source: vectorSource,
});
modify.on(['modifystart', 'modifyend'], function (evt) {
target.style.cursor = evt.type === 'modifystart' ? 'grabbing' : 'pointer';
});
const overlaySource = modify.getOverlay().getSource();
overlaySource.on(['addfeature', 'removefeature'], function (evt) {
target.style.cursor = evt.type === 'addfeature' ? 'pointer' : '';
});
map.addInteraction(modify);

View File

@@ -9,11 +9,11 @@ tags: "mouse-position, openstreetmap"
<div id="map" class="map"></div>
<div id="mouse-position"></div>
<form>
<label>Projection </label>
<label for="projection">Projection </label>
<select id="projection">
<option value="EPSG:4326">EPSG:4326</option>
<option value="EPSG:3857">EPSG:3857</option>
</select>
<label>Precision </label>
<label for="precision">Precision</label>
<input id="precision" type="number" min="0" max="12" value="4"/>
</form>

View File

@@ -3,11 +3,15 @@ layout: example.html
title: Moveend Event
shortdesc: Use of the moveend event.
docs: >
<p>In this example, a listener is registered for the map's <code>moveend</code> event. Whenever this listener is called, it updates the inputs below with the map extent in decimal degrees.</p>
<p>
In this example, a listener is registered for the map's
<code>moveend</code> event. Whenever this listener is called,
it updates the inputs below with the map extent in decimal degrees.
</p>
tags: "moveend, map, event"
---
<div id="map" class="map"></div>
<label>top</label><input type="text" id="top">
<label>right</label><input type="text" id="right"><br>
<label>bottom</label><input type="text" id="bottom">
<label>left</label><input type="text" id="left">
<label>left: <input readonly="readonly" type="text" id="left"></label>
<label>right: <input readonly="readonly" type="text" id="right"></label>
<label>bottom: <input readonly="readonly" type="text" id="bottom"></label>
<label>top: <input readonly="readonly" type="text" id="top"></label>

View File

@@ -6,5 +6,9 @@ docs: >
The map in this example is rendered in a web worker, using `OffscreenCanvas`. **Note:** This is currently only supported in Chrome and Edge.
tags: "worker, offscreencanvas, vector-tiles"
experimental: true
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API key at https://www.maptiler.com/cloud/
---
<div id="map" class="map"></div>

View File

@@ -6,7 +6,6 @@ import stringify from 'json-stringify-safe';
import styleFunction from 'ol-mapbox-style/dist/stylefunction.js';
import {Projection} from '../src/ol/proj.js';
import {inView} from '../src/ol/layer/Layer.js';
import {renderDeclutterItems} from '../src/ol/render.js';
import {getTilePriority as tilePriorityFunction} from '../src/ol/TileQueue.js';
/** @type {any} */
@@ -145,7 +144,7 @@ worker.addEventListener('message', (event) => {
renderer.renderFrame(frameState, canvas);
}
});
renderDeclutterItems(frameState, null);
layers.forEach((layer) => layer.renderDeclutter(frameState));
if (tileQueue.getTilesLoading() < maxTotalLoading) {
tileQueue.reprioritize();
tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);

View File

@@ -21,6 +21,12 @@ const map = new Map({
const pos = fromLonLat([16.3725, 48.208889]);
// Popup showing the position the user clicked
const popup = new Overlay({
element: document.getElementById('popup'),
});
map.addOverlay(popup);
// Vienna marker
const marker = new Overlay({
position: pos,
@@ -37,12 +43,6 @@ const vienna = new Overlay({
});
map.addOverlay(vienna);
// Popup showing the position the user clicked
const popup = new Overlay({
element: document.getElementById('popup'),
});
map.addOverlay(popup);
map.on('click', function (evt) {
const element = popup.getElement();
const coordinate = evt.coordinate;

View File

@@ -11,4 +11,4 @@ cloak:
---
<div id="map" class="map"></div>
<div><input type="checkbox" id="rotateWithView">Rotate with view</div>
<div><label><input type="checkbox" id="rotateWithView"> Rotate with view</label></div>

View File

@@ -13,7 +13,7 @@ if (window.location.hash !== '') {
const hash = window.location.hash.replace('#map=', '');
const parts = hash.split('/');
if (parts.length === 4) {
zoom = parseInt(parts[0], 10);
zoom = parseFloat(parts[0]);
center = [parseFloat(parts[1]), parseFloat(parts[2])];
rotation = parseFloat(parts[3]);
}
@@ -45,11 +45,11 @@ const updatePermalink = function () {
const center = view.getCenter();
const hash =
'#map=' +
view.getZoom() +
view.getZoom().toFixed(2) +
'/' +
Math.round(center[0] * 100) / 100 +
center[0].toFixed(2) +
'/' +
Math.round(center[1] * 100) / 100 +
center[1].toFixed(2) +
'/' +
view.getRotation();
const state = {

View File

@@ -18,7 +18,7 @@ resources:
<div id="map" class="map"></div>
</div>
<form class="form">
<label>Page size </label>
<label for="format">Page size </label>
<select id="format">
<option value="a0">A0 (slow)</option>
<option value="a1">A1</option>
@@ -27,14 +27,14 @@ resources:
<option value="a4" selected>A4</option>
<option value="a5">A5 (fast)</option>
</select>
<label>Resolution </label>
<label for="resolution">Resolution </label>
<select id="resolution">
<option value="72">72 dpi (fast)</option>
<option value="150">150 dpi</option>
<option value="200" selected>200 dpi</option>
<option value="300">300 dpi (slow)</option>
</select>
<label>Scale </label>
<label for="scale">Scale </label>
<select id="scale">
<option value="500">1:500000</option>
<option value="250" selected>1:250000</option>

View File

@@ -1,4 +1,6 @@
table.controls td {
min-width: 110px;
padding: 2px 5px;
.map {
cursor: pointer;
}
#threshold {
margin: 0 0.6em;
}

View File

@@ -28,10 +28,11 @@ cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API key at https://www.maptiler.com/cloud/
---
<div id="map" class="map" style="cursor: pointer"></div>
<table class="controls">
<tr>
<td>Threshold: <span id="threshold-value"></span></td>
<td><input id="threshold" type="range" min="1" max="50" value="20"></td>
</tr>
</table>
<div id="map" class="map"></div>
<div>
<label class="input-group">
Threshold:
<input id="threshold" type="range" min="1" max="50" value="20">
<span id="threshold-value"></span>
</label>
</div>

View File

@@ -6,8 +6,9 @@ docs: >
This example shows how several regular shapes
or symbols (representing `x`, `cross`, `star`,
`triangle`, `square` and `stacked`) can be created.
A `rectangle` is produced by scaling a square created without rotation.
Style `stacked` represents possility to stack multiple shapes with offset
tags: "vector, symbol, regularshape, style, square, cross, star, triangle, x"
tags: "vector, symbol, regularshape, style, square, rectangle, cross, star, triangle, x"
---
<div id="map" class="map"></div>

View File

@@ -19,6 +19,17 @@ const styles = {
angle: Math.PI / 4,
}),
}),
'rectangle': new Style({
image: new RegularShape({
fill: fill,
stroke: stroke,
radius: 10 / Math.SQRT2,
radius2: 10,
points: 4,
angle: 0,
scale: [1, 0.5],
}),
}),
'triangle': new Style({
image: new RegularShape({
fill: fill,
@@ -82,14 +93,24 @@ const styles = {
],
};
const styleKeys = ['x', 'cross', 'star', 'triangle', 'square', 'stacked'];
const styleKeys = [
'x',
'cross',
'star',
'triangle',
'square',
'rectangle',
'stacked',
];
const count = 250;
const features = new Array(count);
const e = 4500000;
for (let i = 0; i < count; ++i) {
const coordinates = [2 * e * Math.random() - e, 2 * e * Math.random() - e];
features[i] = new Feature(new Point(coordinates));
features[i].setStyle(styles[styleKeys[Math.floor(Math.random() * 6)]]);
features[i].setStyle(
styles[styleKeys[Math.floor(Math.random() * styleKeys.length)]]
);
}
const source = new VectorSource({

View File

@@ -7,4 +7,7 @@ docs: >
tags: "reprojection, projection, proj4js, image, imagestatic"
---
<div id="map" class="map"></div>
<div><input type="checkbox" id="imageSmoothing" checked />Image smoothing</div>
<div>
<input type="checkbox" id="imageSmoothing" checked />
<label for="imageSmoothing">Image smoothing</label>
</div>

View File

@@ -9,14 +9,14 @@ tags: "reprojection, projection, proj4js, osm, wms, wmts, hidpi"
<div id="map" class="map"></div>
<form class="form-inline">
<div class="col-md-3">
<label>Base map:</label>
<label for="base-layer">Base map:</label>
<select id="base-layer">
<option value="osm">OSM (EPSG:3857)</option>
<option value="wms4326">WMS (EPSG:4326)</option>
</select>
</div>
<div class="col-md-4">
<label>Overlay map:</label>
<label for="overlay-layer">Overlay map:</label>
<select id="overlay-layer">
<option value="bng">British National Grid (EPSG:27700)</option>
<option value="wms21781">Swisstopo WMS (EPSG:21781)</option>
@@ -25,7 +25,7 @@ tags: "reprojection, projection, proj4js, osm, wms, wmts, hidpi"
</select>
</div>
<div class="col-md-5">
<label>View projection:</label>
<label for="view-projection">View projection:</label>
<select id="view-projection">
<option value="EPSG:3857">Spherical Mercator (EPSG:3857)</option>
<option value="EPSG:4326">WGS 84 (EPSG:4326)</option>

View File

@@ -7,7 +7,7 @@ import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js';
import proj4 from 'proj4';
import {OSM, TileImage, TileWMS} from '../src/ol/source.js';
import {getCenter, getWidth} from '../src/ol/extent.js';
import {get as getProjection} from '../src/ol/proj.js';
import {get as getProjection, transformExtent} from '../src/ol/proj.js';
import {register} from '../src/ol/proj/proj4.js';
proj4.defs(
@@ -51,7 +51,7 @@ proj4.defs(
register(proj4);
const proj27700 = getProjection('EPSG:27700');
proj27700.setExtent([0, 0, 700000, 1300000]);
proj27700.setExtent([-650000, -150000, 1350000, 1450000]);
const proj23032 = getProjection('EPSG:23032');
proj23032.setExtent([-1206118.71, 4021309.92, 1295389.0, 8051813.28]);
@@ -92,8 +92,8 @@ layers['wms4326'] = new TileLayer({
layers['wms21781'] = new TileLayer({
source: new TileWMS({
attributions:
'© <a href="http://www.geo.admin.ch/internet/geoportal/' +
'en/home.html">Pixelmap 1:1000000 / geo.admin.ch</a>',
'© <a href="https://shop.swisstopo.admin.ch/en/products/maps/national/lk1000"' +
'target="_blank">Pixelmap 1:1000000 / geo.admin.ch</a>',
crossOrigin: 'anonymous',
params: {
'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale',
@@ -139,7 +139,8 @@ fetch(urlB)
layer: 'OS_Open_Raster',
});
options.attributions =
'Contains OS data © Crown Copyright and database right 2019';
'Contains OS data © Crown Copyright and database right ' +
new Date().getFullYear();
options.crossOrigin = '';
options.projection = 'EPSG:27700';
options.wrapX = false;
@@ -195,8 +196,10 @@ function updateViewProjection() {
map.setView(newView);
// Example how to prevent double occurrence of map by limiting layer extent
if (newProj == getProjection('EPSG:3857')) {
layers['bng'].setExtent([-1057216, 6405988, 404315, 8759696]);
if (newProj.isGlobal()) {
layers['bng'].setExtent(
transformExtent(proj27700.getExtent(), proj27700, newProj, 2)
);
} else {
layers['bng'].setExtent(undefined);
}

View File

@@ -2,39 +2,31 @@
function compress(json) {
return LZString.compressToBase64(JSON.stringify(json))
.replace(/\+/g, `-`)
.replace(/\//g, `_`)
.replace(/=+$/, ``);
.replace(/\+/g, '-')
.replace(/\//g, '_')
.replace(/=+$/, '');
}
function fetchResource(resource) {
return new Promise((resolve, reject) => {
const isImage = /\.(png|jpe?g|gif|tiff)$/.test(resource);
const xhr = new XMLHttpRequest();
xhr.open('GET', resource);
return new Promise(function (resolve, reject) {
const isImage = /\.(png|jpe?g|gif|tiff|svg|kmz)$/.test(resource);
if (isImage) {
xhr.responseType = 'blob';
} else {
xhr.responseType = 'text';
}
xhr.addEventListener('load', () => {
if (isImage) {
const a = new FileReader();
a.addEventListener('load', e => {
resolve ({
isBinary: true,
content: e.target.result
})
content: new URL(resource, window.location.href).href
});
a.readAsDataURL(xhr.response);
} else {
const xhr = new XMLHttpRequest();
xhr.open('GET', resource);
xhr.responseType = 'text';
xhr.addEventListener('load', function () {
resolve ({
content: xhr.response
})
}
});
});
xhr.addEventListener('error', reject);
xhr.send();
}
})
}
@@ -42,24 +34,37 @@
if (codepenButton) {
const form = document.getElementById('codepen-form');
codepenButton.href = form.action;
codepenButton.addEventListener('click', function(event) {
codepenButton.addEventListener('click', function (event) {
event.preventDefault();
const html = document.getElementById('example-html-source').innerText;
const js = document.getElementById('example-js-source').innerText;
const innerText = document.documentMode ? 'textContent' : 'innerText';
const html = document.getElementById('example-html-source')[innerText];
const js = document.getElementById('example-js-source')[innerText];
const workerContainer = document.getElementById('example-worker-source');
const worker = workerContainer ? workerContainer.innerText : undefined;
const pkgJson = document.getElementById('example-pkg-source').innerText;
const worker = workerContainer ? workerContainer[innerText] : undefined;
const pkgJson = document.getElementById('example-pkg-source')[innerText];
const unique = new Set();
const localResources = (js.match(/'data\/[^']*/g) || [])
.concat(js.match(/'resources\/[^']*/g) || [])
.map(f => f.slice(1))
.filter(f => unique.has(f) ? false : unique.add(f));
const localResources = (js.match(/'(\.\/)?data\/[^']*/g) || [])
.concat(js.match(/'(\.\/)?resources\/[^']*/g) || [])
.map(
function (f) {
return f.replace(/^'(\.\/)?/, '');
}
)
.filter(
function (f) {
return unique.has(f) ? false : (unique.add(f) || unique);
}
);
const promises = localResources.map(resource => fetchResource(resource));
const promises = localResources.map(
function (resource) {
return fetchResource(resource);
}
);
Promise.all(promises)
.then(results => {
Promise.all(promises).then(
function (results) {
const files = {
'index.html': {
content: html
@@ -67,7 +72,7 @@
'main.js': {
content: js
},
"package.json": {
'package.json': {
content: pkgJson
},
'sandbox.config.json': {
@@ -89,7 +94,8 @@
form.parameters.value = compress(data);
form.submit();
});
}
);
});
}
})();

View File

@@ -28,5 +28,5 @@ tags: "scale-line, openstreetmap"
</select>
<div id="showScaleTextDiv" style="display:none">
<input type="checkbox" id="showScaleText" checked>Show scale text
<label><input type="checkbox" id="showScaleText" checked> Show scale text</label>
</div>

View File

@@ -10,7 +10,7 @@ tags: "select, vector"
---
<div id="map" class="map"></div>
<form class="form-inline">
<label>Action type &nbsp;</label>
<label for="type">Action type &nbsp;</label>
<select id="type" class="form-control">
<option value="click" selected>Click</option>
<option value="singleclick">Single-click</option>

View File

@@ -1,4 +1,7 @@
table.controls td {
text-align: center;
padding: 2px 5px;
}
table.controls td:nth-child(3) {
text-align: right;
min-width: 3em;
}

View File

@@ -28,15 +28,18 @@ tags: "raster, shaded relief"
<div id="map" class="map"></div>
<table class="controls">
<tr>
<td>vertical exaggeration: <span id="vertOut"></span>x</td>
<td><label for="vert">vertical exaggeration:</label></td>
<td><input id="vert" type="range" min="1" max="5" value="1"/></td>
<td><span id="vertOut"></span> x</td>
</tr>
<tr>
<td>sun elevation: <span id="sunElOut"></span>°</td>
<td><label for="sunEl">sun elevation:</label></td>
<td><input id="sunEl" type="range" min="0" max="90" value="45"/></td>
<td><span id="sunElOut"></span> °</td>
</tr>
<tr>
<td>sun azimuth: <span id="sunAzOut"></span>°</td>
<td><label for="sunAz">sun azimuth:</label></td>
<td><input id="sunAz" type="range" min="0" max="360" value="45"/></td>
<td><span id="sunAzOut"></span> °</td>
</tr>
</table>

View File

@@ -24,7 +24,7 @@ tags: "draw, edit, modify, vector, snap"
</label>
</div>
<div class="form-group">
<label>Draw type &nbsp;</label>
<label for="draw-type">Draw type &nbsp;</label>
<select name="draw-type" id="draw-type">
<option value="Point">Point</option>
<option value="LineString">LineString</option>

View File

@@ -0,0 +1,3 @@
#map {
background: #75d0f0;
}

View File

@@ -0,0 +1,10 @@
---
layout: example.html
title: Style renderer
shortdesc: Example of a style with a custom renderer.
docs: >
A custom style renderer and a clip path are used to render the flag of a country as fill for the country shape.
tags: "vector, geojson, style, custom, renderer"
---
<div id="map" class="map"></div>
<div id="info">&nbsp;</div>

View File

@@ -0,0 +1,73 @@
import GeoJSON from '../src/ol/format/GeoJSON.js';
import Map from '../src/ol/Map.js';
import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import {Fill, Stroke, Style} from '../src/ol/style.js';
import {getBottomLeft, getHeight, getWidth} from '../src/ol/extent.js';
import {toContext} from '../src/ol/render.js';
const fill = new Fill();
const stroke = new Stroke({
color: 'rgba(255,255,255,0.8)',
width: 2,
});
const style = new Style({
renderer: function (pixelCoordinates, state) {
const context = state.context;
const geometry = state.geometry.clone();
geometry.setCoordinates(pixelCoordinates);
const extent = geometry.getExtent();
const width = getWidth(extent);
const height = getHeight(extent);
const flag = state.feature.get('flag');
if (!flag || height < 1 || width < 1) {
return;
}
// Stitch out country shape from the blue canvas
context.save();
const renderContext = toContext(context, {
pixelRatio: 1,
});
renderContext.setFillStrokeStyle(fill, stroke);
renderContext.drawGeometry(geometry);
context.clip();
// Fill transparent country with the flag image
const bottomLeft = getBottomLeft(extent);
const left = bottomLeft[0];
const bottom = bottomLeft[1];
context.drawImage(flag, left, bottom, width, height);
context.restore();
},
});
const vectorLayer = new VectorLayer({
source: new VectorSource({
url:
'https://openlayersbook.github.io/openlayers_book_samples/assets/data/countries.geojson',
format: new GeoJSON(),
}),
style: style,
});
// Load country flags and set them as `flag` attribute on the country feature
vectorLayer.getSource().on('addfeature', function (event) {
const feature = event.feature;
const img = new Image();
img.onload = function () {
feature.set('flag', img);
};
img.src =
'https://flagcdn.com/w320/' + feature.get('iso_a2').toLowerCase() + '.png';
});
new Map({
layers: [vectorLayer],
target: 'map',
view: new View({
center: [0, 0],
zoom: 1,
}),
});

View File

@@ -67,8 +67,8 @@
<link rel="stylesheet" href="./resources/prism/prism-1.20.0.css" type="text/css">
<link rel="stylesheet" href="./css/ol.css" type="text/css">
<link rel="stylesheet" href="./resources/layout.css" type="text/css">
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="https://unpkg.com/elm-pep"></script>
<script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL,TextDecoder"></script>
{{{ extraHead.local }}}
{{{ css.tag }}}
<title>{{ title }}</title>
@@ -93,7 +93,7 @@
<a class="dropdown-item" href="../doc/quickstart.html"><i class="fa fa-check fa-fw mr-2 fa-lg"></i>Quick Start</a>
<a class="dropdown-item" href="../doc/faq.html"><i class="fa fa-question fa-fw mr-2 fa-lg"></i>FAQ</a>
<a class="dropdown-item" href="../doc/tutorials/"><i class="fa fa-book fa-fw mr-2 fa-lg"></i>Tutorials</a>
<a class="dropdown-item" href="../workshop/"><i class="fa fa-graduation-cap fa-fw mr-2 fa-lg"></i>Workshop</a>
<a class="dropdown-item" href="/workshop/"><i class="fa fa-graduation-cap fa-fw mr-2 fa-lg"></i>Workshop</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i class="fa fa-stack-overflow fa-fw mr-2"></i>Ask a Question</a>
</div>
@@ -104,7 +104,7 @@
<a class="nav-link dropdown-toggle" href="#" id="codedropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Code</a>
<div class="dropdown-menu dropdown-menu-right mb-3" aria-labelledby="codedropdown">
<a class="dropdown-item" href="https://github.com/openlayers/openlayers"><i class="fa fa-github fa-fw mr-2 fa-lg"></i>Repository</a>
<a class="dropdown-item" href="../download/"><i class="fa fa-download fa-fw mr-2 fa-lg"></i>Download</a>
<a class="dropdown-item" href="/download/"><i class="fa fa-download fa-fw mr-2 fa-lg"></i>Download</a>
</div>
</li>
</ul>
@@ -189,11 +189,12 @@
<pre><code id="example-html-source" class="language-markup">&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="UTF-8"&gt;
&lt;title&gt;{{ title }}&lt;/title&gt;
&lt;!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --&gt;
&lt;script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL"&gt;&lt;/script&gt;
&lt;!-- Pointer events polyfill for old browsers, see https://caniuse.com/#feat=pointer --&gt;
&lt;script src="https://unpkg.com/@openlayers/pepjs"&gt;&lt;/script&gt;{{#if extraHead.remote}}
&lt;script src="https://unpkg.com/elm-pep"&gt;&lt;/script&gt;{{#if extraHead.remote}}
&lt;!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --&gt;
&lt;script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL,TextDecoder"&gt;&lt;/script&gt;
{{ indent extraHead.remote spaces=4 }}{{/if}}
&lt;style&gt;
.map {

Some files were not shown because too many files have changed in this diff Show More