Compare commits

...

856 Commits

Author SHA1 Message Date
Ivan Vazhenin
15684caed3 fix 2022-08-31 17:42:18 +03:00
Tim Schaub
bd2ffd9641 Merge pull request #14079 from mike-000/full-screen-mobile
Fix control styles on Full Screen Mobile example
2022-08-31 08:09:04 -06:00
mike-000
d3a7a289ca update css path 2022-08-31 14:38:16 +01:00
mike-000
c5b1369cbc update css path 2022-08-31 14:38:13 +01:00
mike-000
90f9539468 Fix control styles 2022-08-31 11:27:39 +01:00
Tim Schaub
8cc8cdd903 Merge pull request #14067 from openlayers/embrace-legacy
Include the full build in the ol package
2022-08-30 09:44:41 -06:00
Tim Schaub
45480c764f Add upgrade note about full build URLs 2022-08-30 09:21:08 -06:00
Andreas Hocevar
e1bac72003 Make full build iife only, with external geotiff.js and ol-mapbox-style 2022-08-30 09:14:19 -06:00
Tim Schaub
8a9bf4ac7a Support a script tag only for the full build 2022-08-30 09:14:19 -06:00
Tim Schaub
1614a27ee1 Minify and use cjs extension 2022-08-30 09:14:19 -06:00
Tim Schaub
219fb093c1 Include the full build in the ol package 2022-08-30 09:14:19 -06:00
Tim Schaub
96ffd4113f Merge pull request #14073 from openlayers/dependabot/npm_and_yarn/typescript-4.8.2
Bump typescript from 4.7.4 to 4.8.2
2022-08-29 07:05:17 -05:00
Andreas Hocevar
8f3a050e49 Merge pull request #14069 from openlayers/dependabot/npm_and_yarn/eslint-8.23.0
Bump eslint from 8.22.0 to 8.23.0
2022-08-29 13:01:47 +02:00
Andreas Hocevar
f3afc5ed4d Merge pull request #14071 from openlayers/dependabot/npm_and_yarn/babel/core-7.18.13
Bump @babel/core from 7.18.10 to 7.18.13
2022-08-29 13:01:22 +02:00
Andreas Hocevar
09926ccf13 Merge pull request #14072 from openlayers/dependabot/npm_and_yarn/puppeteer-17.0.0
Bump puppeteer from 16.2.0 to 17.0.0
2022-08-29 13:00:59 +02:00
dependabot[bot]
d54fb94597 Bump typescript from 4.7.4 to 4.8.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.4 to 4.8.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.4...v4.8.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 11:00:36 +00:00
Andreas Hocevar
805ff4180c Merge pull request #14070 from openlayers/dependabot/npm_and_yarn/ol-mapbox-style-9.1.0
Bump ol-mapbox-style from 9.0.0 to 9.1.0
2022-08-29 13:00:36 +02:00
Andreas Hocevar
0fb52d35da Merge pull request #14074 from openlayers/dependabot/npm_and_yarn/jquery-3.6.1
Bump jquery from 3.6.0 to 3.6.1
2022-08-29 12:59:34 +02:00
Andreas Hocevar
6adb912314 Update tests for ol-mapbox-style's new background rendering technique 2022-08-29 12:50:48 +02:00
dependabot[bot]
9b1f8aa71d Bump jquery from 3.6.0 to 3.6.1
Bumps [jquery](https://github.com/jquery/jquery) from 3.6.0 to 3.6.1.
- [Release notes](https://github.com/jquery/jquery/releases)
- [Commits](https://github.com/jquery/jquery/compare/3.6.0...3.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 10:03:11 +00:00
dependabot[bot]
8f251ed598 Bump puppeteer from 16.2.0 to 17.0.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 16.2.0 to 17.0.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/v16.2.0...v17.0.0)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 10:02:31 +00:00
dependabot[bot]
7ef019ecd9 Bump @babel/core from 7.18.10 to 7.18.13
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.10 to 7.18.13.
- [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.18.13/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 10:02:15 +00:00
dependabot[bot]
ba61dbfbd5 Bump ol-mapbox-style from 9.0.0 to 9.1.0
Bumps [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) from 9.0.0 to 9.1.0.
- [Release notes](https://github.com/openlayers/ol-mapbox-style/releases)
- [Changelog](https://github.com/openlayers/ol-mapbox-style/blob/main/CHANGELOG.md)
- [Commits](https://github.com/openlayers/ol-mapbox-style/compare/v9.0.0...v9.1.0)

---
updated-dependencies:
- dependency-name: ol-mapbox-style
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 10:01:52 +00:00
dependabot[bot]
cffc99a25f Bump eslint from 8.22.0 to 8.23.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.22.0 to 8.23.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.22.0...v8.23.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 10:01:36 +00:00
Tim Schaub
558c659c0f Merge pull request #14066 from tschaub/auto-rgb
Add support for auto conversion to RGB
2022-08-28 14:41:26 -05:00
Tim Schaub
bd3b1bb434 Add support for auto conversion to RGB 2022-08-28 13:59:46 -05:00
Tim Schaub
c742fe965f Merge pull request #14064 from tschaub/geotiff-view
Avoid stuck maps when resolving views from a GeoTIFF
2022-08-28 13:56:40 -05:00
Tim Schaub
02cf27149a Avoid stuck maps when resolving views from a GeoTIFF 2022-08-28 11:10:21 -05:00
Andreas Hocevar
1dc8a18362 Merge pull request #14063 from tschaub/mask-support
GeoTIFF mask support
2022-08-28 15:29:41 +02:00
Tim Schaub
c860a362e8 Handle masks in GeoTIFFs 2022-08-27 21:25:03 -05:00
MoonE
d70e318443 Merge pull request #14062 from Firefishy/update-tile.openstreetmap.org-url
Use preferred tile.openstreetmap.org URL
2022-08-28 02:22:00 +02:00
Grant Slater
775091c012 Use preferred tile.openstreetmap.org URL
Use the preferred URL for tile.openstreetmap.org, the old aliases are no longer recommended now that tile supports HTTP/2 + HTTP/3.

Signed-off-by: Grant Slater <git@firefishy.com>
2022-08-28 00:34:40 +01:00
Andreas Hocevar
a98ef7937a Merge pull request #14061 from ahocevar/proj4-version
Clarify proj4 version
2022-08-27 16:08:26 +02:00
Andreas Hocevar
dc37775267 Clarify proj4 version 2022-08-27 16:02:50 +02:00
Andreas Hocevar
c7988de1d8 Merge pull request #14059 from openlayers/fix-register-import
Fix register import
2022-08-26 13:00:18 +02:00
Andreas Hocevar
7adcb1e169 Merge pull request #14048 from mike-000/wms-params
Clone the WMS params option
2022-08-26 12:23:14 +02:00
mike-000
d74379a7d9 clone the params option 2022-08-26 10:00:11 +01:00
Andreas Hocevar
20c2bdf2e3 Fix register import 2022-08-26 06:10:52 +02:00
Tim Schaub
ce907ff921 Merge pull request #14015 from mike-000/clear-cache
Clear cache when WebGL tile layer source reset
2022-08-25 17:29:02 +02:00
Tim Schaub
044540f8f4 Merge pull request #14057 from tschaub/trace-update
Consider both tracing directions when within snap tolerance
2022-08-25 17:25:21 +02:00
Tim Schaub
1424788f50 Rework condition 2022-08-25 17:23:58 +02:00
Tim Schaub
c8b869047a Add flat style types to draw and modify interactions 2022-08-25 17:17:28 +02:00
Tim Schaub
0df9561826 Consider both tracing directions when within snap tolerance 2022-08-25 17:17:28 +02:00
Tim Schaub
13bceb5e9d Merge pull request #14051 from mike-000/fix-preload-and-empty-reproj
Fix WebGL preload and empty reproj tiles
2022-08-25 17:12:38 +02:00
Tim Schaub
cd5a8d9839 Merge pull request #14056 from tschaub/version-check
Avoid rate limits from the GitHub API
2022-08-25 13:52:22 +02:00
mike-000
aa61e850c0 test layer min zoom relates to view zoom 2022-08-25 12:44:47 +01:00
mike-000
b3172a8c8b defer preload of tiles not immediately required 2022-08-25 11:59:46 +01:00
Tim Schaub
78bcf9d3f6 Avoid rate limits from the GitHub API 2022-08-25 12:50:23 +02:00
mike-000
49234b2263 defer preload of tiles not immediately required 2022-08-25 10:23:36 +01:00
mike-000
69fd11e836 handle empty reproj tiles 2022-08-25 10:23:35 +01:00
mike-000
549b07aead defer preload of tiles not immediately required
handle empty reproj tiles
ignore view zoom if layer inside ol/source/Raster
2022-08-25 10:23:35 +01:00
Tim Schaub
08ad881d5e Merge pull request #14046 from tschaub/trace
Support tracing with the draw interaction
2022-08-23 20:33:55 +02:00
Tim Schaub
f8ba7dec0c Support tracing with the draw interaction 2022-08-23 20:08:46 +02:00
MoonE
bb98f178b3 Merge pull request #14039 from MoonE/improve-examples
Improve some examples
2022-08-23 19:51:32 +02:00
Andreas Hocevar
31a42949e6 Merge pull request #14038 from ahocevar/skypack
Show how to use Skypack
2022-08-22 21:39:20 +02:00
Maximilian Krög
c528936519 Set cartodb initial map state from input 2022-08-22 19:35:52 +02:00
Maximilian Krög
defb6875d7 Sync form state with map on load 2022-08-22 19:35:52 +02:00
Maximilian Krög
a10c93d331 Remove tooltip when mouse leaves map or is over control is examples 2022-08-22 19:35:52 +02:00
MoonE
62914bb3df Merge pull request #13996 from MoonE/bootstrap-5
Update to bootstrap 5.2
2022-08-22 19:31:23 +02:00
Maximilian Krög
ebfee35a78 Add missing bootstrap css to two examples 2022-08-22 19:26:24 +02:00
Maximilian Krög
38a67ad575 Improve update prompt grammar on download page 2022-08-22 19:26:24 +02:00
Maximilian Krög
fd9c3de002 Drop domain from link 2022-08-22 19:26:24 +02:00
Maximilian Krög
6f3d40cb93 Upgrade jquery to 3.6.0 2022-08-22 19:26:24 +02:00
Maximilian Krög
aa7be0baeb Remove jquery from example index page 2022-08-22 19:26:24 +02:00
Maximilian Krög
8d1d1b0680 Update examples to use new bootstrap tooltip 2022-08-22 19:26:23 +02:00
Maximilian Krög
523a33c81a Update example styles to work with bootstrap 5.2 2022-08-22 19:26:23 +02:00
Maximilian Krög
bc9a6f230c Update to bootstrap 5.2 2022-08-22 19:26:23 +02:00
Maximilian Krög
559712f728 Fix some invalid html markup and some inconsistencies 2022-08-22 19:26:18 +02:00
Andreas Hocevar
d8e6cc7722 Show how to use Skypack 2022-08-22 14:05:52 +02:00
Andreas Hocevar
547ec358a1 Merge pull request #14035 from openlayers/dependabot/npm_and_yarn/puppeteer-16.2.0
Bump puppeteer from 16.1.0 to 16.2.0
2022-08-22 12:11:30 +02:00
Andreas Hocevar
4d6bd1bcbc Merge pull request #14033 from openlayers/dependabot/npm_and_yarn/marked-4.0.19
Bump marked from 4.0.18 to 4.0.19
2022-08-22 12:10:19 +02:00
Andreas Hocevar
13d9ec9dfd Merge pull request #14036 from openlayers/dependabot/npm_and_yarn/rollup-2.78.1
Bump rollup from 2.78.0 to 2.78.1
2022-08-22 12:09:49 +02:00
Andreas Hocevar
faec288eb1 Merge pull request #14034 from openlayers/dependabot/npm_and_yarn/octokit/rest-19.0.4
Bump @octokit/rest from 19.0.3 to 19.0.4
2022-08-22 12:08:44 +02:00
dependabot[bot]
b3e423d829 Bump rollup from 2.78.0 to 2.78.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.78.0 to 2.78.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.78.0...v2.78.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 10:02:02 +00:00
dependabot[bot]
b2883c5ffb Bump puppeteer from 16.1.0 to 16.2.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 16.1.0 to 16.2.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/v16.1.0...v16.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 10:01:37 +00:00
dependabot[bot]
439036b047 Bump @octokit/rest from 19.0.3 to 19.0.4
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 19.0.3 to 19.0.4.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v19.0.3...v19.0.4)

---
updated-dependencies:
- dependency-name: "@octokit/rest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 10:01:21 +00:00
dependabot[bot]
2a6368652a Bump marked from 4.0.18 to 4.0.19
Bumps [marked](https://github.com/markedjs/marked) from 4.0.18 to 4.0.19.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.18...v4.0.19)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 10:01:02 +00:00
Andreas Hocevar
a69c88c0f1 Merge pull request #14030 from ahocevar/assert-messages
Move assertion messages into code and deprecate AssertionError
2022-08-22 09:31:08 +02:00
Andreas Hocevar
a04ff795b5 Show only message 2022-08-22 09:20:13 +02:00
Andreas Hocevar
4e9626ef60 Move assertion messages into code and deprecate AssertionError 2022-08-22 09:20:13 +02:00
Tim Schaub
c5f8629f65 Merge pull request #14025 from tschaub/latest-check
New URL to check for latest release
2022-08-20 19:06:23 -06:00
Tim Schaub
8186580140 Merge pull request #14026 from tschaub/link-to-six
Link to latest 6.x release
2022-08-20 15:07:10 -06:00
Tim Schaub
722d5508e5 Link to latest 6.x release 2022-08-20 14:29:00 -06:00
Tim Schaub
528ab0ab56 New URL to check for latest release 2022-08-20 14:22:23 -06:00
Andreas Hocevar
38f45806e7 Merge pull request #14023 from mike-000/empty-attribution
Do not display TileJSON attributions if empty string
2022-08-20 14:08:31 +02:00
mike-000
c857ca440c do not display attributions if empty string 2022-08-20 12:24:09 +01:00
mike-000
24bbffab99 clear cache if view projection changed 2022-08-19 19:57:37 +01:00
mike-000
9df1a82162 clear cache when source reset
clear cache if view projection changed
test source reset
2022-08-19 19:57:36 +01:00
Tim Schaub
ba60c3ba4a Merge pull request #14019 from openlayers/release-v7.0.0
Updates for the 7.0.0 release
2022-08-19 07:38:31 -06:00
Tim Schaub
160d361b65 Develop on 7.0.1-dev 2022-08-18 22:58:43 -06:00
Tim Schaub
28aa80399b Updates for the 7.0.0 release 2022-08-18 22:06:52 -06:00
Tim Schaub
5e0ec23f26 Merge pull request #14017 from tschaub/deploy-if-changed
Make the website deploy job succeed even if there are no changes
2022-08-18 20:46:52 -06:00
Tim Schaub
98e87b06ad Only commit website changes if there are some 2022-08-18 20:32:01 -06:00
Tim Schaub
f724d67cfb Merge pull request #14014 from tschaub/release-job
Release actions
2022-08-18 20:15:42 -06:00
Tim Schaub
6db24d214b Deploy website and publish package for release tags 2022-08-18 20:07:42 -06:00
Tim Schaub
293f128558 Add a job to create a release 2022-08-18 19:49:47 -06:00
Andreas Hocevar
fae9e9097d Merge pull request #14013 from ahocevar/clear-reprojected-source
Properly clear and refresh reprojected sources
2022-08-19 01:51:37 +02:00
Andreas Hocevar
ad5283846f Merge pull request #14011 from ahocevar/remove-enable-raster-reprojection-flag
Remove ENABLE_RASTER_REPROJECTION flag
2022-08-19 01:50:44 +02:00
Andreas Hocevar
2ac6ccd31e Properly clear and refresh reprojected sources 2022-08-18 22:36:59 +02:00
Andreas Hocevar
b113c3fc7a Merge pull request #14012 from mike-000/feature-changed
Force render after update in Icon Scale example
2022-08-18 22:34:40 +02:00
mike-000
fc1f6aa3da force render after update 2022-08-18 21:04:49 +01:00
Andreas Hocevar
422db1b144 Remove ENABLE_RASTER_REPROJECTION flag 2022-08-18 22:03:15 +02:00
Andreas Hocevar
dfacb39c1a Merge pull request #14009 from ahocevar/ol-mapbox-style-v9
Update ol-mapbox-style to v9.0.0
2022-08-18 21:23:09 +02:00
Andreas Hocevar
90557c56ca Merge pull request #14007 from mike-000/icon-scale
Replace the Icon Scale example
2022-08-18 21:19:31 +02:00
Andreas Hocevar
34ac4b70c8 Update ol-mapbox-style to v9.0.0 2022-08-18 21:05:28 +02:00
mike-000
c2eb0485da replace example 2022-08-18 17:22:19 +01:00
Tim Schaub
6a5a92fe9b Merge pull request #14006 from mike-000/displacement
Improve description of displacement in docs
2022-08-18 07:36:56 -06:00
mike-000
bedec22bc0 Improve description of displacement
Group and improve descriptions
2022-08-18 14:13:02 +01:00
Tim Schaub
8d108dc29e Merge pull request #13995 from tschaub/browserslist
Remove IE workarounds for legacy build, examples, and workers
2022-08-18 06:55:18 -06:00
Tim Schaub
e242d93c32 Merge pull request #13998 from tschaub/doc-options
Use the full table for constructor options
2022-08-18 06:54:27 -06:00
Andreas Hocevar
43661e3bd1 Merge pull request #13975 from mike-000/do-not-scale-displacement
Do not scale Icon and RegularShape displacement
2022-08-18 12:30:20 +02:00
Tim Schaub
3767d111ba Merge pull request #14003 from mike-000/draganddrop
Support user projections in Drag and Drop
2022-08-17 14:11:42 -06:00
mike-000
bfee7f184a support userProjection 2022-08-17 15:59:25 +01:00
Tim Schaub
edd28d7096 Merge pull request #13997 from tschaub/stop-caching
Avoid append only cache in WebGL tile layers
2022-08-17 04:25:20 -06:00
Tim Schaub
a32830c16b Merge pull request #13981 from mike-000/immediate-text
Fix immediate renderer text rotation with offset
2022-08-16 20:04:48 -06:00
Tim Schaub
43098af87c Use the full table for constructor options 2022-08-16 17:24:26 -06:00
Tim Schaub
be8d2843cd Avoid append only cache in WebGL tile layers 2022-08-16 16:31:02 -06:00
mike-000
3e0b942b15 test text rotation with offset 2022-08-16 22:56:28 +01:00
Tim Schaub
dd876b1c8f Merge pull request #13984 from openlayers/deploy
Build and deploy the website
2022-08-16 12:47:58 -06:00
Marc Jansen
9b2240b8a7 Merge pull request #13992 from openlayers/template-fixes
Small example template fixes
2022-08-16 19:20:33 +02:00
Tim Schaub
a166b1da51 Remove IE workarounds for legacy build, examples, and workers 2022-08-16 10:19:59 -06:00
Marc Jansen
5396685667 More HTML img-attribute fixes, thx @MoonE 2022-08-16 17:06:02 +02:00
Marc Jansen
fcab3166b1 Merge pull request #13991 from openlayers/less-for
Fix wording in API docs
2022-08-16 12:24:51 +02:00
Marc Jansen
2546689cff Small example template fixes 2022-08-16 09:12:56 +02:00
Marc Jansen
58a222da93 Fix wording in API docs 2022-08-16 07:58:07 +02:00
Tim Schaub
7d296a9ffc Merge pull request #13970 from tschaub/apidoc-updates
Nicer links in the API docs
2022-08-15 17:04:19 -06:00
Tim Schaub
c2f1d1bbc7 Merge pull request #13989 from tschaub/space
Minor adjustments to the website style
2022-08-15 17:02:33 -06:00
Tim Schaub
e566868a5b Allow short name to be extracted 2022-08-15 16:58:42 -06:00
Tim Schaub
1c65ac4c85 Include : in characters that separate a short name 2022-08-15 16:58:18 -06:00
Tim Schaub
41d575b905 Cleaner example links 2022-08-15 16:46:11 -06:00
Tim Schaub
d23a77bebf Add space around pipe 2022-08-15 16:14:04 -06:00
Tim Schaub
b5b3cb7b18 Shorter names 2022-08-15 16:14:03 -06:00
Tim Schaub
73baef60e3 Use short name for exported functions 2022-08-15 16:14:03 -06:00
Tim Schaub
9c0e2f35d1 Shorten long names when creating links 2022-08-15 16:14:03 -06:00
Tim Schaub
9c378bd811 Add a favicon 2022-08-15 15:00:34 -06:00
Tim Schaub
f3a18a8f7c Shared colors 2022-08-15 14:45:55 -06:00
MoonE
0b326d9fa5 Merge pull request #13988 from MoonE/fix-theme-dir
Fix copying of non-linked ol.css, clean example build
2022-08-15 22:41:44 +02:00
Tim Schaub
50fdebbdbe Markup adjustments 2022-08-15 14:29:27 -06:00
Tim Schaub
27b1bc513d Whitespace adjustments 2022-08-15 14:17:26 -06:00
MoonE
688fc7e43f Merge pull request #13982 from MoonE/kml-timezone
Fix kml-timezone example calculations
2022-08-15 21:32:58 +02:00
Maximilian Krög
d82405666c Fix copying of non-linked ol.css, clean example build 2022-08-15 21:21:04 +02:00
Tim Schaub
e95b4914ce Merge pull request #13986 from openlayers/dependabot/npm_and_yarn/webpack-dev-server-4.10.0
Bump webpack-dev-server from 4.9.3 to 4.10.0
2022-08-15 09:47:11 -06:00
Tim Schaub
844279878b Merge pull request #13985 from openlayers/dependabot/npm_and_yarn/rollup-2.78.0
Bump rollup from 2.77.2 to 2.78.0
2022-08-15 08:10:11 -06:00
Tim Schaub
4176427184 Merge pull request #13987 from openlayers/dependabot/npm_and_yarn/eslint-8.22.0
Bump eslint from 8.21.0 to 8.22.0
2022-08-15 08:08:39 -06:00
dependabot[bot]
14261a34d9 Bump eslint from 8.21.0 to 8.22.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.21.0 to 8.22.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.21.0...v8.22.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 10:01:46 +00:00
dependabot[bot]
0feb83d914 Bump webpack-dev-server from 4.9.3 to 4.10.0
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.9.3 to 4.10.0.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.9.3...v4.10.0)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 10:01:30 +00:00
dependabot[bot]
cc240f7177 Bump rollup from 2.77.2 to 2.78.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.77.2 to 2.78.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.77.2...v2.78.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 10:01:14 +00:00
Tim Schaub
9d73a9185f Build and deploy the website 2022-08-14 23:58:31 -06:00
Maximilian Krög
cdc3235c89 Fix kml-timezone example calculations
- The parsed minutes had the wrong sign when the offset is negative.
- When calculating the local time, the minutes should be subtracted instead of added
- Fix a data error in the kml, a fullstop was used instead of a colon.
2022-08-15 00:01:48 +02:00
mike-000
0bea162f87 fix text rotation with offset 2022-08-14 19:36:04 +01:00
MoonE
adc9a5318e Merge pull request #13977 from MoonE/examples
Fix some errors in examples
2022-08-14 18:03:22 +02:00
Maximilian Krög
74a8759e3b Fix topolis example
toastr did not work because jquery has to bo loaded before toastr.
2022-08-14 16:44:43 +02:00
Maximilian Krög
9109ab8407 Only load lzstring script when clicking Edit 2022-08-14 16:36:49 +02:00
Maximilian Krög
5fb74d21e5 Some improvements to the edit-example script 2022-08-14 16:36:48 +02:00
Maximilian Krög
cf42592f78 Remove unused clipboard script
prism seems to no longer need it
2022-08-14 16:36:48 +02:00
Maximilian Krög
259e3fe1c9 Fix ol.css for some examples
- es2015-custom-element needs css variables declared in :host
- external-map-map still does not work when editing in codesandbox,
  though that neither worked before.
2022-08-14 16:36:48 +02:00
Maximilian Krög
839e1d1c65 Use non-symlinked ol.css for example-builder
File watching does not seem to work with symlinks
2022-08-14 16:36:48 +02:00
MoonE
3cbb40b943 Merge pull request #13978 from MoonE/fontawesome-6
Update FontAwesome to v6.1.2
2022-08-14 16:32:19 +02:00
Maximilian Krög
bc65f2d704 Update FontAwesome to v6.1.2 2022-08-13 23:10:31 +02:00
Tim Schaub
0c3b98592d Merge pull request #13974 from mike-000/LUMINANCE_ALPHA
Use correct bands with `LUMINANCE_ALPHA`
2022-08-13 08:23:24 -06:00
mike-000
4bc0ce0f03 do not scale displacement 2022-08-13 13:44:53 +01:00
mike-000
e6b4b08cac fix LUMINANCE_ALPHA 2022-08-12 15:55:25 +01:00
Tim Schaub
435e0bb9e8 Merge pull request #13972 from tschaub/un_opt
Remove opt_ prefix
2022-08-12 06:16:27 -06:00
Tim Schaub
ca90dd6fd7 Merge pull request #13973 from mike-000/bandcount
Fix bandcount per texture for 8, 12, 16, etc. bands
2022-08-12 06:08:58 -06:00
Andreas Hocevar
3e707d4ded Merge pull request #13955 from mike-000/immediate-icons
Do not apply #12467 change to Icons
2022-08-12 13:05:33 +02:00
mike-000
b5b53b244f fix bandcount per texture for 8, 12, 16, etc bands 2022-08-12 10:47:27 +01:00
Tim Schaub
99612e7f9a Remove opt_ prefix 2022-08-11 20:14:35 -06:00
MoonE
dd1edc37ca Merge pull request #13971 from MoonE/remove-ie-compatibility
Remove more IE compatibility
2022-08-12 00:38:47 +02:00
Tim Schaub
06dd88268b Merge pull request #13965 from tschaub/doc-update
Remove workaround and docs for IE 11
2022-08-11 16:30:13 -06:00
Maximilian Krög
5c4339f367 Remove more IE compatibility 2022-08-12 00:26:25 +02:00
Tim Schaub
c0d0e8e749 Merge pull request #13967 from tschaub/uncircular
Remove circular dependency
2022-08-11 15:49:13 -06:00
Maximilian Krög
f971393ee0 Correct import statement for default exported methods 2022-08-11 22:40:14 +02:00
Tim Schaub
4d3cb782c8 Remove circular dependency 2022-08-11 11:51:01 -06:00
Tim Schaub
c327740108 Merge pull request #13968 from tschaub/sponsors
Update link to sponsors
2022-08-10 15:15:13 -06:00
Tim Schaub
549073791f Updated link to sponsors 2022-08-10 14:46:32 -06:00
Tim Schaub
beed5cd1be Merge pull request #13966 from tschaub/map-update
Bundle code for the map on the homepage
2022-08-10 14:10:22 -06:00
Tim Schaub
b8b8ecd19a Make fullscreen map work in Safari 2022-08-10 13:55:16 -06:00
Tim Schaub
ba3517885c Updated example index 2022-08-10 12:36:14 -06:00
Tim Schaub
d535c37fe4 Update message from deploy preview job 2022-08-10 12:36:13 -06:00
Tim Schaub
157baa2782 Bundle code for the map on the homepage 2022-08-10 12:21:58 -06:00
Tim Schaub
ff0dcbef89 Remove workaround and docs for IE 11 2022-08-10 10:49:28 -06:00
Tim Schaub
9d447b9413 Merge pull request #13961 from tschaub/website
Website build
2022-08-10 10:45:28 -06:00
Tim Schaub
9dff55a8ac Build the website 2022-08-10 10:35:07 -06:00
Tim Schaub
3a05a73471 Merge pull request #13963 from tschaub/fewer-polyfills
Remove polyfills for IE and Android 4
2022-08-10 06:22:06 -06:00
Tim Schaub
30968b0786 Remove polyfills for IE and Android 4 2022-08-09 15:06:01 -06:00
MoonE
1bcc7770b0 Merge pull request #13957 from MoonE/util-version
Replace VERSION in un-transpiled source
2022-08-09 09:20:13 +02:00
MoonE
6d822bc790 Merge pull request #13958 from MoonE/const
Use const in docs and other places
2022-08-09 09:18:59 +02:00
MoonE
9f82a14f44 Merge pull request #13959 from MoonE/add-missing-new-lines
Add few missing new lines in example source listing
2022-08-09 09:17:12 +02:00
mike-000
8bbeb31cfb correct setting of pixelRatio 2022-08-08 23:48:50 +01:00
mike-000
4953f63fd7 Do not apply #12467 change to Icons
Use getPixelRatio() as in ImageBuilder
2022-08-08 23:48:49 +01:00
MoonE
67d90f2634 Merge pull request #13956 from MoonE/error-in-api-pages
Fix js error in api pages on load
2022-08-09 00:42:59 +02:00
Maximilian Krög
5fb69b1de1 Some more small code improvements 2022-08-09 00:28:41 +02:00
Maximilian Krög
5b8d810f80 Use const in more places 2022-08-09 00:25:30 +02:00
Maximilian Krög
f28a9c22e1 replace VERSION in un-transpiled source 2022-08-09 00:20:04 +02:00
Maximilian Krög
be324fbcb0 Fix js error in api pages on load 2022-08-09 00:12:33 +02:00
Maximilian Krög
2c9cf00126 Fix source formatting for some examples
For some css or html files a missing new line at end of file will
concatenate the last line with the following style or script tag
2022-08-08 22:17:17 +02:00
Maximilian Krög
7404397529 Improve example-builder code
Reduce amount of async calls and some other small changes
2022-08-08 22:13:48 +02:00
Olivier Guyot
bebf2db5ae Merge pull request #13953 from JakobMiksch/patch-1
Minor simplification
2022-08-08 16:01:08 +02:00
Jakob Miksch
0cd5ecdfde Minor simplification 2022-08-08 15:29:20 +02:00
Tim Schaub
45db7718fc Merge pull request #13946 from mike-000/upgrade-notes
Fix typo and formatting in upgrade notes
2022-08-08 06:52:01 -06:00
Tim Schaub
d80cc1a0fd Merge pull request #13948 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.18.10
Bump @babel/preset-env from 7.18.9 to 7.18.10
2022-08-08 06:50:46 -06:00
Tim Schaub
fbc2161846 Merge pull request #13949 from openlayers/dependabot/npm_and_yarn/babel/core-7.18.10
Bump @babel/core from 7.18.9 to 7.18.10
2022-08-08 06:49:57 -06:00
Tim Schaub
bd7c108672 Merge pull request #13951 from openlayers/dependabot/npm_and_yarn/rollup/plugin-commonjs-22.0.2
Bump @rollup/plugin-commonjs from 22.0.1 to 22.0.2
2022-08-08 06:48:46 -06:00
Tim Schaub
61be69de90 Merge pull request #13950 from openlayers/dependabot/npm_and_yarn/puppeteer-16.1.0
Bump puppeteer from 15.5.0 to 16.1.0
2022-08-08 06:47:50 -06:00
Andreas Hocevar
3ce1b885c1 Merge pull request #13947 from mike-000/exports
Fixes to export examples
2022-08-08 14:39:48 +02:00
dependabot[bot]
2c9430f683 Bump @rollup/plugin-commonjs from 22.0.1 to 22.0.2
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 22.0.1 to 22.0.2.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/commonjs-v22.0.2/packages/commonjs)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 10:08:25 +00:00
dependabot[bot]
5f81769802 Bump puppeteer from 15.5.0 to 16.1.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 15.5.0 to 16.1.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/v15.5.0...v16.1.0)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 10:07:48 +00:00
dependabot[bot]
7dc37e5782 Bump @babel/core from 7.18.9 to 7.18.10
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.9 to 7.18.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.18.10/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 10:07:21 +00:00
dependabot[bot]
035f80021b Bump @babel/preset-env from 7.18.9 to 7.18.10
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.18.9 to 7.18.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.18.10/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 10:06:44 +00:00
mike-000
94caeeab12 Set background after applying transform
Reset transform in addition to globalAlpha
2022-08-08 10:23:01 +01:00
mike-000
e6b8fed64a Reset transform in addition to globalAlpha 2022-08-08 10:05:36 +01:00
mike-000
589d9fab78 Fix typo and formatting 2022-08-08 09:07:46 +01:00
Olivier Guyot
14d1ac0c7a Merge pull request #13944 from jahow/fix-webgl-points-flaky-test
Fix WebGL points layer flaky test
2022-08-08 09:33:25 +02:00
MoonE
ef09482505 Merge pull request #13943 from MoonE/scaleline
Scaleline
2022-08-07 23:52:26 +02:00
MoonE
2c1c76c24e Merge pull request #13942 from MoonE/kmz
Improve loading of kmz file in example
2022-08-07 23:51:52 +02:00
Olivier Guyot
5e88b55d5a Webgl points test / unregister listener to avoid failures 2022-08-07 21:20:44 +02:00
Maximilian Krög
03a16e3444 Use a range input to select the number of steps (1 to 8) 2022-08-07 00:45:14 +02:00
Maximilian Krög
436a4ca597 Add color invert option to scale-line example 2022-08-07 00:44:31 +02:00
Maximilian Krög
e10432260f Cleanup scale-line example 2022-08-07 00:43:06 +02:00
Maximilian Krög
f7cb9b9fdf Invert displayed scale for very high zoom levels
This prevents a scale of '1 : 0' being displayed and instead displays
'scale : 1'
2022-08-06 23:16:25 +02:00
Maximilian Krög
564d9d7685 Set pointer-event: none for ScaleLine
There is no reason to interact with this control and for the
`bar` option the blocked rect may be unexpectedly large
2022-08-06 23:16:25 +02:00
Maximilian Krög
ff79897f06 Fix default value docs for ScaleLine class option 2022-08-06 23:16:25 +02:00
Maximilian Krög
97f0e70447 Remove unnecessary code
Remove unnecessary nested div element
Don't number to string to number
2022-08-06 23:16:25 +02:00
Maximilian Krög
e0cbb6daa8 Cleanup ScaleLine code 2022-08-06 23:16:15 +02:00
Maximilian Krög
4504f139af Improve loading of kmz file example
- The href will always start with path as it is sliced starting from 0
  Not sure if it is possible that window locatin does not have a slash
  unless its some about:-page.
- Should be possible to query for the file name directly without regex,
  if the filename contains special regex characters it may behave
  unexpectedly
2022-08-06 21:59:08 +02:00
MoonE
b0306828a7 Merge pull request #13941 from MoonE/kml-default-icon-anchor
Fix KML default icon anchor with https icon url
2022-08-06 21:09:01 +02:00
Maximilian Krög
f2e82ba1e4 Fix default icon anchor with https icon url 2022-08-06 11:11:24 +02:00
MoonE
854300181a Merge pull request #13937 from MoonE/use-nicer-functions
Use nicer functions, remove old code
2022-08-05 21:19:38 +02:00
Andreas Hocevar
a3bbd60b81 Merge pull request #13939 from ahocevar/vectortile-postrender
Render vector tile vectors in correct sequence for the postrender event
2022-08-05 17:13:49 +02:00
Andreas Hocevar
b96a69e11d Test for correct sequence of context calls and render events 2022-08-05 16:38:59 +02:00
Andreas Hocevar
b81dd0b3bc Render vector tile vectors in correct sequence for the postrender event 2022-08-05 15:06:38 +02:00
Maximilian Krög
403b06b438 Use RegExp#test intead of String#match 2022-08-05 01:49:16 +02:00
Maximilian Krög
81c10fa609 Remove accessing legacy RegExp.$ instead of match return value 2022-08-05 01:49:16 +02:00
Maximilian Krög
bb3c5bf144 Use String#startsWith instead of String#indexOf 2022-08-05 01:49:16 +02:00
Maximilian Krög
0b945f2321 Use includes instead of indexOf 2022-08-05 01:49:01 +02:00
Maximilian Krög
5e34b9aa20 Fix print-to-scale ignore collapsible attribution 2022-08-05 01:32:50 +02:00
Maximilian Krög
31ed30923d Remove array.includes 2022-08-05 01:26:25 +02:00
MoonE
f2c4e26468 Merge pull request #13936 from MoonE/array-from
Remove workaround for missing TypedArray.from function
2022-08-05 01:10:37 +02:00
Maximilian Krög
e1e19cbd03 Remove workaround for missing TypedArray.from function 2022-08-04 23:36:00 +02:00
MoonE
c6d0d803f9 Merge pull request #13933 from MoonE/set-line-dash
Remove check for context.setLineDash
2022-08-04 08:59:24 +02:00
Maximilian Krög
ef82bbd83a Remove check for context.setLineDash 2022-08-03 22:25:19 +02:00
Tim Schaub
58ca0d8098 Merge pull request #13930 from mike-000/remove-deprecated-tilePixelRatio
Remove deprecated DataTile source `tilePixelRatio`
2022-08-03 11:11:12 -06:00
mike-000
02807c8f95 Remove deprecated tilePixelRatio 2022-08-03 17:48:24 +01:00
Andreas Hocevar
59a8612fcb Merge pull request #13932 from mike-000/remove-range-change
Remove input type="range" `change` event listeners where `input` events are also used
2022-08-03 18:35:35 +02:00
mike-000
4eacc92f7f remove range change event 2022-08-03 17:14:43 +01:00
Tim Schaub
dc9718e389 Merge pull request #13931 from mike-000/remove-deprecated-imageSmoothing
Remove deprecated `imageSmoothing` source options
2022-08-03 06:55:59 -06:00
mike-000
27a9f056e0 remove deprecated imageSmoothing 2022-08-03 13:25:43 +01:00
Tim Schaub
aee389e2b7 Merge pull request #13926 from tschaub/map-background
Updated map background
2022-08-02 08:24:50 -06:00
Tim Schaub
21223d7096 Updated map background 2022-08-01 17:16:29 -06:00
Tim Schaub
47d90a3f9b Merge pull request #13923 from tschaub/code-sandbox
Include babel for CodeSandbox
2022-08-01 12:54:02 -06:00
Tim Schaub
6bd68241e3 Include babel for codesandbox 2022-08-01 12:04:39 -06:00
Tim Schaub
46cceb22a7 Merge pull request #13922 from mike-000/es-version
Remove reference to ES6 as ES2017 already listed
2022-08-01 10:45:07 -06:00
mike-000
f94ee61314 Remove reference to ES6 as ES2017 already listed 2022-08-01 17:24:26 +01:00
Tim Schaub
dc2414fe37 Merge pull request #13919 from openlayers/dependabot/npm_and_yarn/rollup-2.77.2
Bump rollup from 2.77.0 to 2.77.2
2022-08-01 06:00:58 -06:00
Tim Schaub
336934ec43 Merge pull request #13920 from openlayers/dependabot/npm_and_yarn/eslint-8.21.0
Bump eslint from 8.20.0 to 8.21.0
2022-08-01 06:00:07 -06:00
Tim Schaub
973c411082 Merge pull request #13917 from tschaub/doc-style
Style updates for examples and API docs
2022-08-01 05:44:13 -06:00
Tim Schaub
57be514c32 Merge pull request #13916 from tschaub/cookieless
Remove Google Analytics and cookie consent
2022-08-01 05:41:50 -06:00
dependabot[bot]
874ebd385e Bump eslint from 8.20.0 to 8.21.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.20.0 to 8.21.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.20.0...v8.21.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 10:01:31 +00:00
dependabot[bot]
0fe07e1caf Bump rollup from 2.77.0 to 2.77.2
Bumps [rollup](https://github.com/rollup/rollup) from 2.77.0 to 2.77.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.77.0...v2.77.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 10:01:17 +00:00
Tim Schaub
1bd9201fed Style updates for examples and API docs 2022-07-31 19:07:46 -06:00
Tim Schaub
8cb423d1d1 Avoid uncaught type error 2022-07-31 14:01:31 -06:00
Tim Schaub
644337184c Remove Google Analytics and cookie consent 2022-07-31 13:47:03 -06:00
MoonE
15329aad00 Merge pull request #13915 from MoonE/fix-map-render-test
Fix map render test
2022-07-31 21:17:42 +02:00
Tim Schaub
59fa54cd5a Merge pull request #13908 from tschaub/style
Uniformly grayscale controls
2022-07-31 13:14:59 -06:00
Tim Schaub
9696795dd2 Merge pull request #13914 from tschaub/unplugged
Remove PluggableMap
2022-07-31 13:04:24 -06:00
Maximilian Krög
e3987dfdbf Fix Map render test
The value set to id2 was never read, postrender fires in renderSync
2022-07-31 20:04:59 +02:00
Maximilian Krög
b2d2f44f43 No need to wait for postrender in Map test 2022-07-31 20:04:55 +02:00
Tim Schaub
85ef563ba8 Remove PluggableMap 2022-07-31 10:08:13 -06:00
MoonE
b534368394 Merge pull request #13911 from MoonE/remove-mouse-position-undefined-html
Remove MousePosition's deprecated undefinedHTML option
2022-07-31 10:09:31 +02:00
MoonE
0992787d7a Merge pull request #13912 from MoonE/always-use-global-composite-opertion-for-icon-image-color
Remove IconImage color fallback for IE
2022-07-31 09:59:43 +02:00
Tim Schaub
6491b161a9 Uniformly uncolored 2022-07-30 19:29:29 -06:00
Maximilian Krög
7c81cb41a8 Remove IconImage color fallback for IE 2022-07-31 02:29:20 +02:00
Maximilian Krög
417753422e Remove unused 2nd parameter for querySelector call
I guess the intention was to only serch for nodes contained in the
2nd parameter. That should have been `node.querySelector('...')`
but it doesn't matter in the test environment.
2022-07-31 02:23:35 +02:00
Maximilian Krög
c90c4c84c5 Remove MousePosition's deprecated undefinedHTML option
Simplify the placeholder option to only accept strings or undefined.
2022-07-31 02:23:35 +02:00
MoonE
f276f3f47f Merge pull request #13907 from MoonE/remove-ms-image-smoothing-enabled
Remove IE fallbacks
2022-07-30 23:58:55 +02:00
MoonE
a575631f88 Merge pull request #13910 from MoonE/export-map-codesandbox
Fix editing of export-map example on codesandbox
2022-07-30 23:57:22 +02:00
Maximilian Krög
d747216180 Fix editing of export-map example on codesandbox 2022-07-30 23:27:21 +02:00
Maximilian Krög
4c13ef13c9 Remove textContent fallback for IE 2022-07-30 23:06:59 +02:00
Maximilian Krög
5f8a83b6d8 Remove fullscreen handling fallback for IE 2022-07-30 22:59:26 +02:00
Maximilian Krög
e0fd784c16 Remove msSaveBlob fallback for IE 2022-07-30 22:58:47 +02:00
Maximilian Krög
e56bda5848 Remove IE css fallback 2022-07-30 22:57:51 +02:00
Maximilian Krög
6a6d2cd612 Remove IE image smoothing fallback 2022-07-30 22:36:32 +02:00
MoonE
37aaf8ed4b Merge pull request #13902 from MoonE/type-safe-collection
Improve Collection type-safety
2022-07-30 21:38:48 +02:00
Maximilian Krög
75c17e55b1 Improve Collection type-safety 2022-07-30 21:30:35 +02:00
Maximilian Krög
6e4e49644d Prevent inserting undefined into Collection 2022-07-30 20:27:36 +02:00
Tim Schaub
d45de03e91 Merge pull request #13906 from tschaub/export-link
Re-export the link interaction from the interactions module
2022-07-30 12:23:41 -06:00
Tim Schaub
0c0e92fcbd Re-export the link interaction from the interactions module 2022-07-30 10:59:45 -06:00
MoonE
e17640c95a Merge pull request #13905 from MoonE/replace-enums
Replace enums with typedefs
2022-07-30 18:12:34 +02:00
Tim Schaub
b10dc3bf83 Merge pull request #13900 from tschaub/flat-style
Accept an object literal for static layer styling
2022-07-30 10:05:21 -06:00
Tim Schaub
ab48290bd7 Accept an object literal for static layer styling 2022-07-30 09:48:10 -06:00
Maximilian Krög
14c2c31d4c Replace RasterOperationType enum with typedef 2022-07-30 15:06:13 +02:00
Maximilian Krög
2caa071a08 Replace MouseWheelZoom Mode enum with typedef 2022-07-30 15:06:12 +02:00
Maximilian Krög
7ac61fdc70 Replace proj/Units enum with typedef 2022-07-30 15:06:12 +02:00
Maximilian Krög
361f1ab837 Replace VectorTileRenderType enum with typedef 2022-07-30 15:06:12 +02:00
Maximilian Krög
7f2f789d7f Remove deprecated 'image' render mode option 2022-07-30 15:06:12 +02:00
Andreas Hocevar
d5086a7ab5 Merge pull request #13903 from ahocevar/fix-jsdoc
Update jsdoc-plugin-typescript to fix markdown in type annotations
2022-07-30 10:36:00 +02:00
Andreas Hocevar
551d438345 Update jsdoc-plugin-typescript to fix markdown in type annotations 2022-07-30 10:07:23 +02:00
Maximilian Krög
806843f449 Don't fire remove event when Collection remains unchanged 2022-07-30 03:17:48 +02:00
Maximilian Krög
6f539c9ca4 Test removeAt does not fire event for invalid index 2022-07-30 03:13:37 +02:00
Maximilian Krög
217230172b Make VectorSource Options generic 2022-07-30 03:13:37 +02:00
Tim Schaub
1c1270cba4 Merge pull request #13899 from tschaub/lazy-image
Wait until first load to create icon image
2022-07-29 18:27:46 -06:00
MoonE
dce24cfe40 Merge pull request #13901 from MoonE/text-types
Make Text options typesafe
2022-07-30 01:34:28 +02:00
Maximilian Krög
a076899470 Make Text options typesafe 2022-07-29 21:24:46 +02:00
Tim Schaub
d31f40d6ce Wait until first load to create icon image 2022-07-29 13:24:17 -06:00
Tim Schaub
4ad18ea67b Merge pull request #13897 from mike-000/intervals
Align graticule default intervals to minutes and seconds
2022-07-29 09:18:22 -06:00
mike-000
aaed855740 Align default intervals to minutes and seconds 2022-07-29 11:26:54 +01:00
Tim Schaub
0b08f3811a Merge pull request #13891 from tschaub/untranspile
Publish untranspiled sources
2022-07-28 14:10:34 -06:00
Tim Schaub
0f5b273246 Update doc to remove part about extra src folder in the package 2022-07-28 13:56:34 -06:00
Tim Schaub
c71d200cbf Publish untranspiled sources 2022-07-28 13:56:34 -06:00
Andreas Hocevar
3c5403259a Merge pull request #13880 from ahocevar/reproj-tiles
Improve reprojection WMS config for better performance
2022-07-28 21:54:22 +02:00
Tim Schaub
55e3ed6f74 Merge pull request #13893 from tschaub/grat
Omit minutes and seconds from HDMS formatting if zero
2022-07-28 13:47:29 -06:00
Tim Schaub
368bbc75cb Merge pull request #13888 from tschaub/object-assign
Use Object.assign
2022-07-28 13:29:12 -06:00
Tim Schaub
25d47ed752 Use Object.assign 2022-07-28 13:23:16 -06:00
Tim Schaub
82dfba2520 Omit minutes and seconds if zero 2022-07-28 08:13:05 -06:00
Andreas Hocevar
9f6ccdfb2d Merge pull request #13875 from openlayers/dependabot/npm_and_yarn/jsdoc-plugin-typescript-2.1.0
Bump jsdoc-plugin-typescript from 2.0.7 to 2.1.0
2022-07-28 10:14:29 +02:00
Tim Schaub
70acfc99e5 Merge pull request #13892 from tschaub/unused-worker
Remove unused worker
2022-07-27 18:10:04 -06:00
Tim Schaub
1dc4f85ed1 Merge pull request #13887 from tschaub/array-find
Remove find and findIndex from array module
2022-07-27 18:09:42 -06:00
Tim Schaub
2da8f62da1 Merge pull request #13890 from tschaub/math
Use Math.cosh and Math.log2
2022-07-27 18:09:15 -06:00
Tim Schaub
40d3fb6041 Merge pull request #13889 from tschaub/object-values
Use Object.values
2022-07-27 18:08:43 -06:00
MoonE
59d3206173 Merge pull request #13871 from openlayers/dependabot/npm_and_yarn/puppeteer-15.5.0
Bump puppeteer from 15.4.0 to 15.5.0
2022-07-28 01:45:33 +02:00
MoonE
6682f45015 Merge pull request #13870 from openlayers/dependabot/npm_and_yarn/webpack-5.74.0
Bump webpack from 5.73.0 to 5.74.0
2022-07-28 01:43:38 +02:00
dependabot[bot]
5bb187d12a Bump jsdoc-plugin-typescript from 2.0.7 to 2.1.0
Bumps [jsdoc-plugin-typescript](https://github.com/openlayers/jsdoc-plugin-typescript) from 2.0.7 to 2.1.0.
- [Release notes](https://github.com/openlayers/jsdoc-plugin-typescript/releases)
- [Commits](https://github.com/openlayers/jsdoc-plugin-typescript/commits)

---
updated-dependencies:
- dependency-name: jsdoc-plugin-typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-27 22:00:43 +00:00
Tim Schaub
a1a0ff0799 Merge pull request #13873 from openlayers/dependabot/npm_and_yarn/jsdoc-3.6.11
Bump jsdoc from 3.6.10 to 3.6.11
2022-07-27 15:53:58 -06:00
Tim Schaub
c9b2b3d76a Remove unused worker 2022-07-27 15:51:34 -06:00
Tim Schaub
fab4e83745 Use Math.log2 2022-07-27 15:11:14 -06:00
Tim Schaub
f32517a77f Use Math.cosh 2022-07-27 15:09:43 -06:00
Tim Schaub
641bd7af33 Use Object.values 2022-07-27 15:03:47 -06:00
Tim Schaub
82ceaea4ab Use Array.prototype.findIndex 2022-07-27 14:00:06 -06:00
Tim Schaub
157bdc5208 Use Array.prototype.find 2022-07-27 13:57:35 -06:00
Tim Schaub
f2d989b299 Merge pull request #13884 from tschaub/use-includes
Remove workaround for Array.prototype.includes
2022-07-27 13:49:09 -06:00
dependabot[bot]
2cd1aff23b Bump puppeteer from 15.4.0 to 15.5.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 15.4.0 to 15.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/v15.4.0...v15.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-27 18:54:12 +00:00
Andreas Hocevar
6385a47446 Merge pull request #13879 from ahocevar/examples
Codesandbox and bundler improvements for examples
2022-07-27 20:53:10 +02:00
Tim Schaub
44289a3a31 Remove workaround for Array.prototype.includes 2022-07-27 11:17:49 -06:00
Andreas Hocevar
8acc4aa20e Improve reprojection WMS config for better performance 2022-07-27 14:47:24 +02:00
Andreas Hocevar
1e15daa354 Use vite instead of parcel 2022-07-26 22:00:09 +02:00
Andreas Hocevar
b5afd06edf Also look for example dependencies in dependencies 2022-07-26 18:29:16 +02:00
Andreas Hocevar
db77f7d4a2 Use explicit versions for example dependencies 2022-07-26 18:28:44 +02:00
Andreas Hocevar
392ca5706d More forgiving import regex 2022-07-26 18:28:06 +02:00
MoonE
14133a05a8 Merge pull request #13868 from MoonE/remove-for-each-layer-at-pixel
Remove deprecated method PluggableMap#forEachLayerAtPixel ...
2022-07-26 01:01:42 +02:00
Maximilian Krög
2897f03ea5 Remove deprecated method PluggableMap#forEachLayerAtPixel 2022-07-26 00:57:21 +02:00
dependabot[bot]
5828d4cd4d Bump jsdoc from 3.6.10 to 3.6.11
Bumps [jsdoc](https://github.com/jsdoc/jsdoc) from 3.6.10 to 3.6.11.
- [Release notes](https://github.com/jsdoc/jsdoc/releases)
- [Changelog](https://github.com/jsdoc/jsdoc/blob/3.6.11/CHANGES.md)
- [Commits](https://github.com/jsdoc/jsdoc/compare/3.6.10...3.6.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 10:01:59 +00:00
dependabot[bot]
3abcb034ee Bump webpack from 5.73.0 to 5.74.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.73.0 to 5.74.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.73.0...v5.74.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 10:01:31 +00:00
MoonE
4b6c3d408a Merge pull request #13869 from MoonE/remove-unused-assertion-numbers
Remove unused assertion numbers
2022-07-25 09:16:52 +02:00
Maximilian Krög
0d178d7baa Remove unused assertion numbers 2022-07-24 23:34:04 +02:00
MoonE
0f8de89318 Merge pull request #13838 from MoonE/remove-deprecated-overlay-options
Remove deprecated Overlay options
2022-07-22 21:43:48 +02:00
Olivier Guyot
7d56c56210 Merge pull request #13461 from jahow/webgl-shape-renderer
WebGL vector renderer for polygons, lines and points
2022-07-22 10:05:31 +02:00
Andreas Hocevar
e83ecdeb96 Merge pull request #13863 from ahocevar/tile-error-handling
Fix reloading tiles in case of an error with tile.load()
2022-07-22 00:43:37 +02:00
Andreas Hocevar
02c73e3e69 Merge pull request #13860 from ahocevar/geojson-empty-coordinate-arrays
Handle multipolygons with empty polygons
2022-07-22 00:25:40 +02:00
Tim Schaub
8aa8684d81 Unused element and class name 2022-07-21 14:30:32 -07:00
Andreas Hocevar
a1d68b4f66 Fix reloading tiles in case of an error with tile.load() 2022-07-21 23:23:40 +02:00
Tim Schaub
01f3536d29 Using a union type instead of a string enum 2022-07-21 14:08:16 -07:00
Tim Schaub
7e424be66b Only pass the feature to the attribute getter 2022-07-21 13:49:06 -07:00
Tim Schaub
bd9e73a534 Renaming fill and stroke attributes and shaders 2022-07-21 13:30:22 -07:00
Tim Schaub
f21dd84c91 Remove api annotation for experimental features 2022-07-21 13:08:18 -07:00
Tim Schaub
5182b16452 Private if not used elsewhere; underscore suffix only if private 2022-07-21 13:03:10 -07:00
Maximilian Krög
e3766222f3 Remove deprecated Overlay options 2022-07-20 21:40:48 +02:00
MoonE
1c68d5093d Merge pull request #13858 from MoonE/replace-enums-with-typedef
Replace enums with typedef
2022-07-20 21:05:02 +02:00
Andreas Hocevar
c8508bcf97 Handle multipolygons with empty polygons 2022-07-20 13:18:41 +02:00
Andreas Hocevar
14041e490f Merge pull request #13859 from openlayers/dependabot/npm_and_yarn/terser-5.14.2
Bump terser from 5.7.2 to 5.14.2
2022-07-20 09:19:22 +02:00
dependabot[bot]
5b5ce3f9ee Bump terser from 5.7.2 to 5.14.2
Bumps [terser](https://github.com/terser/terser) from 5.7.2 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20 01:31:04 +00:00
Maximilian Krög
62e335ceda Replace IconOrigin enum with typedef 2022-07-19 23:24:25 +02:00
Maximilian Krög
7ec2725c1e Replace IconAnchorUnits enum with typedef 2022-07-19 23:24:25 +02:00
Maximilian Krög
48e57f4d8c Replace Zoomify TierSizeCalculation enum with typedef 2022-07-19 23:24:25 +02:00
Maximilian Krög
7004d18519 Replace Draw Mode enum with typedef 2022-07-19 23:24:25 +02:00
Maximilian Krög
185485b0f7 Replace GeometryLayout enum with typedef 2022-07-19 23:24:22 +02:00
Maximilian Krög
ac6edc704a Replace ScaleLine Units with typedef 2022-07-19 22:56:46 +02:00
Maximilian Krög
69caa06783 Replace TextPlacement enum with typedef 2022-07-19 22:56:45 +02:00
Maximilian Krög
4d2156ff3a Replace IGCZ enum with typedef 2022-07-19 22:56:45 +02:00
MoonE
d20690394c Merge pull request #13837 from MoonE/remove-label-cache
Remove deprecated label cache
2022-07-19 20:58:17 +02:00
MoonE
ea67c20e1b Merge pull request #13850 from MoonE/update-dev-version-to-7
Update dev version to 7.0.0
2022-07-19 20:57:51 +02:00
Maximilian Krög
2679b51c7a Update dev version to 7.0.0 2022-07-18 23:42:29 +02:00
Andreas Hocevar
b15e41d588 Merge pull request #13852 from openlayers/release-v6.15.1
Release v6.15.1
2022-07-18 23:37:27 +02:00
Andreas Hocevar
87cc257daf Merge branch 'main' into release-v6.15.1 2022-07-18 23:09:09 +02:00
Andreas Hocevar
e8ff6656d3 Develop on 6.15.2-dev 2022-07-18 23:04:35 +02:00
Andreas Hocevar
9613cb9761 Updates for the 6.15.1 release 2022-07-18 22:55:49 +02:00
Andreas Hocevar
ac5b80a0df Merge pull request #13835 from ahocevar/source-state
Recover from incorrect rebase after removal of string enums
2022-07-18 22:50:37 +02:00
Andreas Hocevar
69ae6c85cf Merge pull request #13835 from ahocevar/source-state
Recover from incorrect rebase after removal of string enums
2022-07-18 22:42:58 +02:00
Andreas Hocevar
22b3aabbf2 Merge pull request #13851 from openlayers/release-v6.15.0
Updates for the 6.15.0 release
2022-07-18 22:20:52 +02:00
Andreas Hocevar
c6cc734dca Develop on 6.15.1-dev 2022-07-18 22:13:07 +02:00
Andreas Hocevar
3b991343b5 Updates for the 6.15.0 release 2022-07-18 22:05:21 +02:00
Andreas Hocevar
61da235e40 Merge pull request #13841 from openlayers/dependabot/npm_and_yarn/rollup-2.77.0
Bump rollup from 2.76.0 to 2.77.0
2022-07-18 14:02:20 +02:00
Andreas Hocevar
5cc9fcc1d4 Merge pull request #13842 from openlayers/dependabot/npm_and_yarn/types/geojson-7946.0.10
Bump @types/geojson from 7946.0.8 to 7946.0.10
2022-07-18 13:54:45 +02:00
dependabot[bot]
788fbed7cb Bump rollup from 2.76.0 to 2.77.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.76.0 to 2.77.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.76.0...v2.77.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 11:54:30 +00:00
Andreas Hocevar
9b14b1d626 Merge pull request #13843 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.18.9
Bump @babel/preset-env from 7.18.6 to 7.18.9
2022-07-18 13:54:22 +02:00
Andreas Hocevar
c9703cfacc Merge pull request #13844 from openlayers/dependabot/npm_and_yarn/clean-css-cli-5.6.1
Bump clean-css-cli from 5.6.0 to 5.6.1
2022-07-18 13:54:02 +02:00
Andreas Hocevar
dfc5aee096 Merge pull request #13845 from openlayers/dependabot/npm_and_yarn/marked-4.0.18
Bump marked from 4.0.17 to 4.0.18
2022-07-18 13:53:42 +02:00
Andreas Hocevar
423ed7742c Merge pull request #13846 from openlayers/dependabot/npm_and_yarn/babel/core-7.18.9
Bump @babel/core from 7.18.6 to 7.18.9
2022-07-18 13:53:21 +02:00
Andreas Hocevar
93663309b0 Merge pull request #13847 from openlayers/dependabot/npm_and_yarn/puppeteer-15.4.0
Bump puppeteer from 15.3.2 to 15.4.0
2022-07-18 13:53:00 +02:00
Andreas Hocevar
cc2caf63eb Merge pull request #13848 from openlayers/dependabot/npm_and_yarn/eslint-8.20.0
Bump eslint from 8.19.0 to 8.20.0
2022-07-18 13:52:36 +02:00
dependabot[bot]
97ee2d1b55 Bump eslint from 8.19.0 to 8.20.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.19.0 to 8.20.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.19.0...v8.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 10:03:20 +00:00
dependabot[bot]
c64dc124dc Bump puppeteer from 15.3.2 to 15.4.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 15.3.2 to 15.4.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/v15.3.2...v15.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 10:03:00 +00:00
dependabot[bot]
82c59631c2 Bump @babel/core from 7.18.6 to 7.18.9
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.6 to 7.18.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.18.9/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 10:02:09 +00:00
dependabot[bot]
493bfa12dc Bump marked from 4.0.17 to 4.0.18
Bumps [marked](https://github.com/markedjs/marked) from 4.0.17 to 4.0.18.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.17...v4.0.18)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 10:02:05 +00:00
dependabot[bot]
41f08d81ce Bump clean-css-cli from 5.6.0 to 5.6.1
Bumps [clean-css-cli](https://github.com/clean-css/clean-css-cli) from 5.6.0 to 5.6.1.
- [Release notes](https://github.com/clean-css/clean-css-cli/releases)
- [Changelog](https://github.com/clean-css/clean-css-cli/blob/master/History.md)
- [Commits](https://github.com/clean-css/clean-css-cli/compare/v5.6.0...v5.6.1)

---
updated-dependencies:
- dependency-name: clean-css-cli
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 10:01:51 +00:00
dependabot[bot]
ba6400bccf Bump @babel/preset-env from 7.18.6 to 7.18.9
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.18.6 to 7.18.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.18.9/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 10:01:46 +00:00
dependabot[bot]
eb00f654c0 Bump @types/geojson from 7946.0.8 to 7946.0.10
Bumps [@types/geojson](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/geojson) from 7946.0.8 to 7946.0.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/geojson)

---
updated-dependencies:
- dependency-name: "@types/geojson"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 10:01:30 +00:00
Andreas Hocevar
085fca6a9f Merge pull request #13832 from mike-000/vector-tile-grids
Base vector tile render tile grid on the source grid
2022-07-18 10:07:52 +02:00
Andreas Hocevar
4fec8d4615 Recover from incorrect rebase after removal of string enums 2022-07-18 09:42:52 +02:00
Maximilian Krög
1df5afcdbf Remove deprecated label cache 2022-07-17 04:15:24 +02:00
MoonE
0c2ba05195 Merge pull request #13834 from jipexu/scalebarcolors
ability to change the color of the scalebar
2022-07-16 19:01:59 +02:00
Maximilian Krög
d957bdeb86 Fix ScaleLine markup 2022-07-16 18:56:59 +02:00
jeanpierre
c8a28848dd change class names 2022-07-16 16:57:14 +02:00
jeanpierre
4d2b2c9650 style for scalebar
with new class in css and remove the hardcoded background

Co-Authored-By: Andreas Hocevar <211514+ahocevar@users.noreply.github.com>
2022-07-16 15:53:27 +02:00
jipexu
cb5417e0b6 Merge branch 'openlayers:main' into scalebarcolors 2022-07-16 11:22:01 +02:00
mike-000
13f0eeb795 Fix tileSizes typedef 2022-07-16 10:07:54 +01:00
mike-000
8dcb78bcd9 Base render tile grid on the source grid
Use source zDirection for both grids
2022-07-16 10:06:42 +01:00
Olivier Guyot
998dc82592 fixes after rebase 2022-07-15 22:53:48 +02:00
Olivier Guyot
5d21e548ae Webgl / add rendering tests for the vector layer renderer 2022-07-15 22:33:52 +02:00
Olivier Guyot
cd83424867 WebGL / improve doc for Helper and VectorLayerRenderer
Also created enums for attributes (like uniforms), in an attempt to clarify
what is accessible to the vertex shaders.
2022-07-15 22:33:52 +02:00
Olivier Guyot
52279967c4 WebGL / Reorganize VectorLayerRenderer options, update example
Now different attributes can be provided for each type of geometry.

Also updated the example to accomodate for this and use the default shaders.
2022-07-15 22:33:52 +02:00
Olivier Guyot
79c974d63d WebGL / Add new module with default shaders for VectorLayer 2022-07-15 22:33:52 +02:00
Olivier Guyot
6848df97f8 WebGL / Address review comments 2022-07-15 22:33:52 +02:00
Olivier Guyot
f603ce7456 WebGL / Support DPR > 1 in linestring shader
A u_pixelRatio uniform was added to be used in the shaders. this is necessary
since we're relying on the builtin gl_FragCoord vector, which will be scaled
relative to the u_sizePx uniform in case of a device pixel ratio != 1.

Also added tests for computed uniform values, instead of just testing
that they were indeed set.
2022-07-15 22:33:52 +02:00
Olivier Guyot
9e35acaa0a Adapt the batch renderers to trigger a repaint after buffer rebuild 2022-07-15 22:33:52 +02:00
burleight
8769ea519e WebGL / render multiple worlds to wrap X in vector renderer
From https://github.com/jahow/openlayers/pull/1

Adds logic in WebGLVectorLayerRenderer to handle multiple worlds visible at once.

Co-authored-by: Tomas Burleigh <t.burleigh@gmail.com>
Co-authored-by: Olivier Guyot <olivier.guyot@camptocamp.com>
2022-07-15 22:33:52 +02:00
Olivier Guyot
7d2b1a9f48 Make the newWebGL vector example experimental
And do not mention hit detection for now
2022-07-15 22:33:52 +02:00
Olivier Guyot
c9f3665237 Remove @api on webgl vector layer renderer as well as utilities
This removes the WebGL vector layer renderer as well as the WebGL helper class
from the API.
2022-07-15 22:33:52 +02:00
Olivier Guyot
7e9c620914 Fix linting and typechecking errors 2022-07-15 22:33:52 +02:00
Olivier Guyot
a2ba7ecaa7 Make some adaptations to the PointsLayer renderer to make it work 2022-07-15 22:33:52 +02:00
Olivier Guyot
979dfd3a55 Add an example for the new webgl vector layer
This example accomodates for hit detection whih is not functional yet.
2022-07-15 22:33:52 +02:00
Olivier Guyot
c555315014 Add a new WebGLVectorLayer renderer
This relies on a mixed geometry batch and separate batch renderers (lines,
points and polygons). A different shader program is used for each of these
geometries, and three rendering passes are made.
2022-07-15 22:33:52 +02:00
Olivier Guyot
cfaf9a14e5 Rework a bit the webgl helper to allow having several programs
Without this, doing render passes with different programs using one
helper instance was not really doable
2022-07-15 22:33:52 +02:00
Olivier Guyot
7892c31715 Adapt the WebGL worker to use the new buffer generation utils 2022-07-15 22:33:52 +02:00
Olivier Guyot
143c19ca03 Add utils for generating webgl buffers from lines and polygons
Uses @mapbox/earcut for polygon (what else), and a home made logic for lines
2022-07-15 22:33:52 +02:00
Olivier Guyot
a18ffaed54 Move webgl utils out of ol/renderer/webgl/Layer module into their own module 2022-07-15 22:33:52 +02:00
Olivier Guyot
eb0db9e3df Introduce batch renderers for each type of geometry
Batch renderers are responsible for generating render instructions and
interacting with the worker to obtain the final webgl buffers
2022-07-15 22:33:52 +02:00
Olivier Guyot
b5fbed5437 Introduce MixedGeometryBatch for webgl rendering
This class keeps an up-to-date list of line, polygon and point geometries
to render as well as vertices counts, geometries count, rings count etc.
2022-07-15 22:33:52 +02:00
Andreas Hocevar
aff4451fb1 Merge pull request #13823 from ahocevar/reduce-canvas-footprint
Reduce canvas memory footprint for better iOS stability
2022-07-15 20:35:09 +02:00
Andreas Hocevar
a02d6786cc Merge pull request #12696 from ahocevar/source-state-union-type
Use union types instead of enums
2022-07-15 20:32:54 +02:00
Andreas Hocevar
96e2400c46 Fix alignment of rotated image layers 2022-07-15 20:30:38 +02:00
jeanpierre
d3861b0922 scaleBarColors a new option for scalebar colors 2022-07-15 19:14:46 +02:00
Andreas Hocevar
f720404559 Updates after rebase 2022-07-15 11:01:30 +02:00
Andreas Hocevar
884c0c6129 Resolve conflicts 2022-07-15 10:51:08 +02:00
Frederic Junod
252671108f Use union type instead of WMTS request encoding 2022-07-15 10:51:08 +02:00
Frederic Junod
9c1b55e09c Use union type instead of enum for extent corner 2022-07-15 10:51:08 +02:00
Tim Schaub
3a061ed576 Use union type instead of enum for canvas builder type 2022-07-15 10:51:07 +02:00
Tim Schaub
05f9b35eeb Use union type instead of enum for WMS server type 2022-07-15 10:48:38 +02:00
Tim Schaub
d05204f50b Use union type instead of enum for feature format 2022-07-15 10:48:37 +02:00
Tim Schaub
03dbe1f9a1 Use union type instead of enum for overlay positioning 2022-07-15 10:48:37 +02:00
Tim Schaub
9a6f8493fb Use union instead of enum for geometry type 2022-07-15 10:48:37 +02:00
Tim Schaub
04ad0e0c5a Additional uses of new source state type 2022-07-15 10:46:44 +02:00
Andreas Hocevar
57f147988d Use union type for source state 2022-07-15 10:46:44 +02:00
Andreas Hocevar
492458a141 Merge pull request #13824 from openlayers/dependabot/npm_and_yarn/puppeteer-15.3.2
Bump puppeteer from 15.3.0 to 15.3.2
2022-07-11 15:03:28 +02:00
Andreas Hocevar
8b978ef4fe Merge pull request #13825 from openlayers/dependabot/npm_and_yarn/rollup-2.76.0
Bump rollup from 2.75.7 to 2.76.0
2022-07-11 15:02:35 +02:00
dependabot[bot]
bc5ba9c252 Bump rollup from 2.75.7 to 2.76.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.75.7 to 2.76.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.75.7...v2.76.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 10:01:35 +00:00
dependabot[bot]
f2bf5ad5fa Bump puppeteer from 15.3.0 to 15.3.2
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 15.3.0 to 15.3.2.
- [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/v15.3.0...v15.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 10:01:20 +00:00
Andreas Hocevar
720ccbcd42 Use canvas pool for reprojection tiles 2022-07-10 23:06:41 +02:00
Andreas Hocevar
f3a05ba82d Use device instead of data pixel ratio to determine canvas size 2022-07-10 23:06:41 +02:00
Andreas Hocevar
6086459cba Handle opacity on canvas instead of dom 2022-07-10 23:06:40 +02:00
Andreas Hocevar
239487e9f0 Only create and load tiles within the viewport 2022-07-10 23:06:40 +02:00
Andreas Hocevar
6ffbfa1a4a Minimize canvas size for rotated views 2022-07-10 19:17:51 +02:00
Andreas Hocevar
22dba410ad Release canvas memory when no longer needed 2022-07-10 19:17:50 +02:00
Andreas Hocevar
60f09fcc45 Merge pull request #13817 from jipexu/main
remove XYZ-ESRI -4326-512 example
2022-07-07 18:23:10 +02:00
Andreas Hocevar
e65d09b15b Merge pull request #13819 from mike-000/HERE
Remove HERE Maps example
2022-07-07 18:21:34 +02:00
mike-000
4b54efdd4c Remove example 2022-07-07 15:51:34 +01:00
jipexu
b5bdacaa6a Delete xyz-esri-4326-512.js
#13782
2022-07-07 13:28:43 +02:00
jipexu
a2722ce663 Delete xyz-esri-4326-512.html
#13782
2022-07-07 13:27:52 +02:00
MoonE
65704f0443 Merge pull request #13787 from jipexu/checkcontenteditable
Checkcontenteditable
2022-07-07 01:44:37 +02:00
Maximilian Krög
c2d609c60a Improve targetNotEditable documentation 2022-07-07 01:32:22 +02:00
MoonE
cbd138f967 Merge pull request #13674 from EvertEt/tilegridnull
Add null return type for TileGrid functions
2022-07-07 00:40:45 +02:00
Tim Schaub
1cbee8b6c9 Merge pull request #13806 from openlayers/dependabot/npm_and_yarn/babel/core-7.18.6
Bump @babel/core from 7.18.5 to 7.18.6
2022-07-06 00:07:13 -06:00
Tim Schaub
71e8870109 Merge pull request #13810 from openlayers/dependabot/npm_and_yarn/webpack-dev-server-4.9.3
Bump webpack-dev-server from 4.9.2 to 4.9.3
2022-07-06 00:06:35 -06:00
Tim Schaub
49c38dbcd7 Merge pull request #13808 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.18.6
Bump @babel/preset-env from 7.18.2 to 7.18.6
2022-07-06 00:06:03 -06:00
Tim Schaub
3ccc825d34 Merge pull request #13807 from openlayers/dependabot/npm_and_yarn/puppeteer-15.3.0
Bump puppeteer from 15.1.1 to 15.3.0
2022-07-06 00:05:11 -06:00
Tim Schaub
2c5bd87d96 Merge pull request #13809 from openlayers/dependabot/npm_and_yarn/es-main-1.2.0
Bump es-main from 1.0.2 to 1.2.0
2022-07-06 00:04:10 -06:00
Tim Schaub
029f43dce9 Merge pull request #13811 from openlayers/dependabot/npm_and_yarn/eslint-8.19.0
Bump eslint from 8.18.0 to 8.19.0
2022-07-06 00:03:05 -06:00
dependabot[bot]
62ab36db66 Bump eslint from 8.18.0 to 8.19.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.18.0 to 8.19.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.18.0...v8.19.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 10:02:56 +00:00
dependabot[bot]
b5b59584f0 Bump webpack-dev-server from 4.9.2 to 4.9.3
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.9.2 to 4.9.3.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.9.2...v4.9.3)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 10:02:40 +00:00
dependabot[bot]
c9709b7709 Bump es-main from 1.0.2 to 1.2.0
Bumps [es-main](https://github.com/tschaub/es-main) from 1.0.2 to 1.2.0.
- [Release notes](https://github.com/tschaub/es-main/releases)
- [Commits](https://github.com/tschaub/es-main/compare/v1.0.2...v1.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 10:02:23 +00:00
dependabot[bot]
d3c643d80d Bump @babel/preset-env from 7.18.2 to 7.18.6
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.18.2 to 7.18.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.18.6/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 10:02:03 +00:00
dependabot[bot]
105b6b0284 Bump puppeteer from 15.1.1 to 15.3.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 15.1.1 to 15.3.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/v15.1.1...v15.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 10:01:41 +00:00
dependabot[bot]
01e142c2b8 Bump @babel/core from 7.18.5 to 7.18.6
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.5 to 7.18.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.18.6/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 10:01:25 +00:00
Tim Schaub
ebeef238e3 Merge pull request #13747 from theduckylittle/feature/add-setters-to-shape-styles
Add setFill and setStroke to Shapes
2022-07-02 16:16:03 -06:00
Andreas Hocevar
a6a192699f Merge pull request #13803 from mike-000/icon-clone
Include displacement and declutterMode in Icon style clone
2022-07-01 18:12:50 +02:00
mike-000
4271dcc5b5 Include displacement and declutterMode in clone 2022-06-30 23:08:37 +01:00
Andreas Hocevar
3ae9e9afd5 Merge pull request #13799 from M393/dont-touch-tiles-used-time-when-expiring
Do not refresh use time for tiles when collecting used source tiles
2022-06-30 22:14:06 +02:00
MoonE
5baa86c2fa Merge pull request #13800 from mike-000/WKB
Change WKB readFeature(s) return type to Feature
2022-06-29 21:10:05 +02:00
mike-000
4f0845b03a Change return type to Feature 2022-06-29 10:39:38 +01:00
Maximilian Krög
7b9fc4c995 Do not refresh use time for tiles when collecting used source tiles 2022-06-28 17:20:42 +02:00
Tim Schaub
e0d6ee3308 Merge pull request #13793 from openlayers/dependabot/npm_and_yarn/rollup/plugin-commonjs-22.0.1
Bump @rollup/plugin-commonjs from 22.0.0 to 22.0.1
2022-06-27 06:29:58 -06:00
Tim Schaub
fa7f52ffa2 Merge pull request #13794 from openlayers/dependabot/npm_and_yarn/puppeteer-15.1.1
Bump puppeteer from 14.4.1 to 15.1.1
2022-06-27 06:29:12 -06:00
dependabot[bot]
4e0508274f Bump puppeteer from 14.4.1 to 15.1.1
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 14.4.1 to 15.1.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/v14.4.1...v15.1.1)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 10:03:26 +00:00
dependabot[bot]
589bbda1ab Bump @rollup/plugin-commonjs from 22.0.0 to 22.0.1
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 22.0.0 to 22.0.1.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/commonjs-v22.0.1/packages/commonjs)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 10:03:04 +00:00
jipexu
e7a545233b Update condition.js 2022-06-24 09:42:31 +02:00
jipexu
361ad43ab5 Merge branch 'openlayers:main' into checkcontenteditable 2022-06-24 09:34:17 +02:00
Tim Schaub
7fbf19edd9 Merge pull request #13776 from openlayers/dependabot/npm_and_yarn/eslint-8.18.0
Bump eslint from 8.17.0 to 8.18.0
2022-06-24 09:20:09 +02:00
Tim Schaub
fd8c0c8d36 Merge pull request #13777 from openlayers/dependabot/npm_and_yarn/typescript-4.7.4
Bump typescript from 4.7.3 to 4.7.4
2022-06-24 09:19:36 +02:00
Tim Schaub
8745409f40 Merge pull request #13775 from openlayers/dependabot/npm_and_yarn/karma-6.4.0
Bump karma from 6.3.20 to 6.4.0
2022-06-24 09:19:07 +02:00
Tim Schaub
1a66e057db Merge pull request #13778 from openlayers/dependabot/npm_and_yarn/puppeteer-14.4.1
Bump puppeteer from 14.3.0 to 14.4.1
2022-06-24 09:18:10 +02:00
Tim Schaub
6d83b2794b Merge pull request #13779 from openlayers/dependabot/npm_and_yarn/rollup-2.75.7
Bump rollup from 2.75.6 to 2.75.7
2022-06-24 09:17:15 +02:00
Duck
bd620bdf93 Add rendering test for the setFill/setStroke 2022-06-23 06:39:05 -07:00
Duck
c182bbf66b Show an example of changing the color with setfill 2022-06-23 06:01:11 -07:00
Duck
4ef584b410 Add setFill and setStroke to Shapes
This rounds out the shape style sto be more
consistent and make the `setFill` and `setStroke`
methods available.
2022-06-23 06:01:11 -07:00
jipexu
ab92c0d603 Update src/ol/events/condition.js
writing for ts

Co-authored-by: M393 <56256405+M393@users.noreply.github.com>
2022-06-22 18:34:22 +02:00
jipexu
c7a2f06acc Update src/ol/events/condition.js
Co-authored-by: M393 <56256405+M393@users.noreply.github.com>
2022-06-22 17:12:02 +02:00
jipexu
b8dfde2f12 checkcontentEditable
#13785
2022-06-22 16:28:44 +02:00
jipexu
390c81413d add check for contentEditable attribut
see #13785
2022-06-22 13:31:22 +02:00
MoonE
5dc07bd5b7 Merge pull request #13784 from jipexu/main
d3 version update
2022-06-21 23:39:23 +02:00
jipexu
ea1da4e680 d3 update version 2022-06-21 22:53:03 +02:00
jipexu
68940036b7 d3 version update 2022-06-21 17:43:47 +02:00
dependabot[bot]
d1baf55c98 Bump rollup from 2.75.6 to 2.75.7
Bumps [rollup](https://github.com/rollup/rollup) from 2.75.6 to 2.75.7.
- [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.75.6...v2.75.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 10:02:17 +00:00
dependabot[bot]
9e3ae6f25e Bump puppeteer from 14.3.0 to 14.4.1
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 14.3.0 to 14.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/v14.3.0...v14.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 10:01:59 +00:00
dependabot[bot]
a8e9c8ef4c Bump typescript from 4.7.3 to 4.7.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.3 to 4.7.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.3...v4.7.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 10:01:40 +00:00
dependabot[bot]
4547d8d637 Bump eslint from 8.17.0 to 8.18.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.17.0 to 8.18.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.17.0...v8.18.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 10:01:20 +00:00
dependabot[bot]
0f2cfb8888 Bump karma from 6.3.20 to 6.4.0
Bumps [karma](https://github.com/karma-runner/karma) from 6.3.20 to 6.4.0.
- [Release notes](https://github.com/karma-runner/karma/releases)
- [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma/compare/v6.3.20...v6.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 10:01:04 +00:00
Andreas Hocevar
d4bda2704a Merge pull request #13771 from ahocevar/better-target-change-fix
Better fix for changing pointer ids on event target change
2022-06-17 22:07:17 +02:00
Andreas Hocevar
6dcc583e06 Add tests to ensure correct pointer tracking 2022-06-16 14:36:17 +02:00
Andreas Hocevar
134ec9c8d0 Remove duplicated logic from PointerInteraction 2022-06-16 14:36:17 +02:00
Andreas Hocevar
f99dc1e9ec Better fix for changing pointer ids on event target change 2022-06-15 16:29:07 +02:00
Andreas Hocevar
307e9892fc Merge pull request #13762 from ahocevar/webgltile-sources-bands
Fix source band calculation when configured with multiple sources
2022-06-15 16:08:01 +02:00
Andreas Hocevar
20ba9862cd Merge pull request #13770 from ahocevar/tracked-pointers
Clean up tracked pointers when the event target has changed
2022-06-15 16:07:34 +02:00
Andreas Hocevar
1852ad78a2 Clean up tracked pointers when the event target has changed 2022-06-15 12:56:52 +02:00
Andreas Hocevar
04ffcbfd08 Fix source band calculation when configured with multiple sources 2022-06-13 14:35:16 +02:00
Andreas Hocevar
70313f17ad Merge pull request #13754 from openlayers/dependabot/npm_and_yarn/source-map-loader-4.0.0
Bump source-map-loader from 3.0.1 to 4.0.0
2022-06-13 14:28:12 +02:00
Andreas Hocevar
2a1bea64cc Merge pull request #13755 from openlayers/dependabot/npm_and_yarn/babel/core-7.18.5
Bump @babel/core from 7.18.2 to 7.18.5
2022-06-13 14:27:44 +02:00
Andreas Hocevar
b87d53bfa3 Merge pull request #13756 from openlayers/dependabot/npm_and_yarn/marked-4.0.17
Bump marked from 4.0.16 to 4.0.17
2022-06-13 14:27:23 +02:00
Andreas Hocevar
6f84ce34ff Merge pull request #13757 from openlayers/dependabot/npm_and_yarn/puppeteer-14.3.0
Bump puppeteer from 14.2.1 to 14.3.0
2022-06-13 14:27:01 +02:00
Andreas Hocevar
2d8f1cd8a7 Merge pull request #13758 from openlayers/dependabot/npm_and_yarn/rollup-2.75.6
Bump rollup from 2.75.5 to 2.75.6
2022-06-13 14:26:23 +02:00
Andreas Hocevar
acf08209f0 Merge pull request #13759 from openlayers/dependabot/npm_and_yarn/webpack-cli-4.10.0
Bump webpack-cli from 4.9.2 to 4.10.0
2022-06-13 14:25:59 +02:00
Andreas Hocevar
245f9f029a Merge pull request #13760 from openlayers/dependabot/npm_and_yarn/webpack-dev-server-4.9.2
Bump webpack-dev-server from 4.9.1 to 4.9.2
2022-06-13 14:25:30 +02:00
Andreas Hocevar
fcf3f118c1 Merge pull request #13761 from openlayers/dependabot/npm_and_yarn/globby-13.1.2
Bump globby from 13.1.1 to 13.1.2
2022-06-13 14:25:06 +02:00
dependabot[bot]
23636f636d Bump globby from 13.1.1 to 13.1.2
Bumps [globby](https://github.com/sindresorhus/globby) from 13.1.1 to 13.1.2.
- [Release notes](https://github.com/sindresorhus/globby/releases)
- [Commits](https://github.com/sindresorhus/globby/compare/v13.1.1...v13.1.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 10:03:25 +00:00
dependabot[bot]
7605770e04 Bump webpack-dev-server from 4.9.1 to 4.9.2
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.9.1 to 4.9.2.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.9.1...v4.9.2)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 10:03:11 +00:00
dependabot[bot]
17cc43b492 Bump webpack-cli from 4.9.2 to 4.10.0
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.9.2 to 4.10.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.9.2...webpack-cli@4.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 10:02:54 +00:00
dependabot[bot]
1b4d42e92f Bump rollup from 2.75.5 to 2.75.6
Bumps [rollup](https://github.com/rollup/rollup) from 2.75.5 to 2.75.6.
- [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.75.5...v2.75.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 10:02:40 +00:00
dependabot[bot]
624d642ca5 Bump puppeteer from 14.2.1 to 14.3.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 14.2.1 to 14.3.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/v14.2.1...v14.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 10:02:23 +00:00
dependabot[bot]
5b52c8a120 Bump marked from 4.0.16 to 4.0.17
Bumps [marked](https://github.com/markedjs/marked) from 4.0.16 to 4.0.17.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.16...v4.0.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 10:02:04 +00:00
dependabot[bot]
444d2b8d9e Bump @babel/core from 7.18.2 to 7.18.5
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.2 to 7.18.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.18.5/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 10:01:51 +00:00
dependabot[bot]
d11b1b16a5 Bump source-map-loader from 3.0.1 to 4.0.0
Bumps [source-map-loader](https://github.com/webpack-contrib/source-map-loader) from 3.0.1 to 4.0.0.
- [Release notes](https://github.com/webpack-contrib/source-map-loader/releases)
- [Changelog](https://github.com/webpack-contrib/source-map-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/source-map-loader/compare/v3.0.1...v4.0.0)

---
updated-dependencies:
- dependency-name: source-map-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 10:01:33 +00:00
Andreas Hocevar
9b6f94e194 Merge pull request #13745 from hargasinski/fix-modifying-polygons
Fix modifying polygons with overlapping vertices
2022-06-12 13:44:15 +02:00
Andreas Hocevar
0f1f3e70a7 Merge pull request #13749 from ahocevar/gml-polygon-ring-curve
Support GML polygons with ring curves instead of linear rings
2022-06-12 13:35:41 +02:00
MoonE
1f6d13836b Merge pull request #13750 from MoonE/gemetry
Fix typo in method names
2022-06-11 18:28:40 +02:00
Maximilian Krög
758048f5d8 Fix typo in method names 2022-06-11 17:56:42 +02:00
Andreas Hocevar
e863960599 Support reading polygons with curve rings 2022-06-10 18:17:26 +02:00
Andreas Hocevar
2a8cc3d2f5 Map multiple LineStringSegments to a one LineString 2022-06-10 18:17:02 +02:00
Hubert Argasinski
5bcbd23cca Fix modifying polygons with overlapping vertices
When a polygonal geometry, where one of the vertices overlaps the first
vertex in the same ring, is modified, ensure the correct vertices are
updated.
2022-06-08 18:36:49 -04:00
Andreas Hocevar
d530435e2e Merge pull request #13724 from m-mohr/geotiff-from-blob
Load GeoTiff from Blob #13189 #13703
2022-06-08 16:03:13 +02:00
Andreas Hocevar
78e7f378fe Merge pull request #12106 from IQGeo/issue-12101
improve text width calculation
2022-06-08 15:39:29 +02:00
Tim Schaub
7a7621c36f Merge pull request #13732 from openlayers/dependabot/npm_and_yarn/eslint-8.17.0
Bump eslint from 8.16.0 to 8.17.0
2022-06-06 08:16:34 -06:00
dependabot[bot]
fbbf2f3961 Bump eslint from 8.16.0 to 8.17.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.16.0 to 8.17.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.16.0...v8.17.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 13:53:02 +00:00
Andreas Hocevar
f52af4a9af Merge pull request #13730 from openlayers/dependabot/npm_and_yarn/typescript-4.7.3
Bump typescript from 4.7.2 to 4.7.3
2022-06-06 14:10:31 +02:00
Andreas Hocevar
c46a368f2f Merge pull request #13731 from openlayers/dependabot/npm_and_yarn/webpack-5.73.0
Bump webpack from 5.72.1 to 5.73.0
2022-06-06 14:10:06 +02:00
Andreas Hocevar
ff955f76db Merge pull request #13733 from openlayers/dependabot/npm_and_yarn/rollup-2.75.5
Bump rollup from 2.75.3 to 2.75.5
2022-06-06 14:09:40 +02:00
Andreas Hocevar
0f2a435297 Merge pull request #13734 from openlayers/dependabot/npm_and_yarn/puppeteer-14.2.1
Bump puppeteer from 14.1.1 to 14.2.1
2022-06-06 14:09:14 +02:00
Andreas Hocevar
38b189ecf9 Merge pull request #13735 from openlayers/dependabot/npm_and_yarn/webpack-dev-server-4.9.1
Bump webpack-dev-server from 4.9.0 to 4.9.1
2022-06-06 14:08:45 +02:00
dependabot[bot]
3ad81f277c Bump webpack-dev-server from 4.9.0 to 4.9.1
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.9.0 to 4.9.1.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.9.0...v4.9.1)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 10:02:37 +00:00
dependabot[bot]
b567b6bd6c Bump puppeteer from 14.1.1 to 14.2.1
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 14.1.1 to 14.2.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/v14.1.1...v14.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 10:02:13 +00:00
dependabot[bot]
824fcd2823 Bump rollup from 2.75.3 to 2.75.5
Bumps [rollup](https://github.com/rollup/rollup) from 2.75.3 to 2.75.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.75.3...v2.75.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 10:01:48 +00:00
dependabot[bot]
02f0ae0ff1 Bump webpack from 5.72.1 to 5.73.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.72.1 to 5.73.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.72.1...v5.73.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 10:01:11 +00:00
dependabot[bot]
8df798fc2c Bump typescript from 4.7.2 to 4.7.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.2 to 4.7.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.2...v4.7.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 10:00:56 +00:00
Matthias Mohr
c2fc1f85bf Load GeoTiff from Blob #13189 #13703 2022-06-01 23:49:01 +02:00
Andreas Hocevar
28b99b30a8 Merge pull request #13712 from mike-000/tile-pyramid-getData()
Fix tile pyramid getData()
2022-05-31 22:32:36 +02:00
Tim Schaub
bcc39b06b7 Merge pull request #13717 from openlayers/dependabot/npm_and_yarn/babel/core-7.18.2
Bump @babel/core from 7.18.0 to 7.18.2
2022-05-30 08:37:17 -07:00
Tim Schaub
b71750200d Merge pull request #13718 from openlayers/dependabot/npm_and_yarn/rollup-2.75.3
Bump rollup from 2.74.1 to 2.75.3
2022-05-30 08:36:29 -07:00
Tim Schaub
cc2e8a8ad1 Merge pull request #13716 from openlayers/dependabot/npm_and_yarn/types/offscreencanvas-2019.7.0
Bump @types/offscreencanvas from 2019.6.4 to 2019.7.0
2022-05-30 08:35:08 -07:00
Tim Schaub
90400aad29 Merge pull request #13719 from openlayers/dependabot/npm_and_yarn/typescript-4.7.2
Bump typescript from 4.6.4 to 4.7.2
2022-05-30 08:34:17 -07:00
Tim Schaub
a00e748ebf Merge pull request #13720 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.18.2
Bump @babel/preset-env from 7.18.0 to 7.18.2
2022-05-30 08:33:26 -07:00
Tim Schaub
99cf989b45 Merge pull request #13715 from openlayers/dependabot/npm_and_yarn/ol-mapbox-style-8.1.2
Bump ol-mapbox-style from 8.0.8 to 8.1.2
2022-05-30 08:32:07 -07:00
dependabot[bot]
e35412a14b Bump @babel/preset-env from 7.18.0 to 7.18.2
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.18.0 to 7.18.2.
- [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.18.2/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 10:03:10 +00:00
dependabot[bot]
b41ddfce82 Bump typescript from 4.6.4 to 4.7.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.4 to 4.7.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.4...v4.7.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 10:02:48 +00:00
dependabot[bot]
8903f2cec8 Bump rollup from 2.74.1 to 2.75.3
Bumps [rollup](https://github.com/rollup/rollup) from 2.74.1 to 2.75.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.74.1...v2.75.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 10:02:30 +00:00
dependabot[bot]
5eaa073269 Bump @babel/core from 7.18.0 to 7.18.2
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.0 to 7.18.2.
- [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.18.2/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 10:02:10 +00:00
dependabot[bot]
531eeebd01 Bump @types/offscreencanvas from 2019.6.4 to 2019.7.0
Bumps [@types/offscreencanvas](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/offscreencanvas) from 2019.6.4 to 2019.7.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/offscreencanvas)

---
updated-dependencies:
- dependency-name: "@types/offscreencanvas"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 10:01:49 +00:00
dependabot[bot]
cefff95bb3 Bump ol-mapbox-style from 8.0.8 to 8.1.2
Bumps [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) from 8.0.8 to 8.1.2.
- [Release notes](https://github.com/openlayers/ol-mapbox-style/releases)
- [Changelog](https://github.com/openlayers/ol-mapbox-style/blob/main/CHANGELOG.md)
- [Commits](https://github.com/openlayers/ol-mapbox-style/compare/v8.0.8...v8.1.2)

---
updated-dependencies:
- dependency-name: ol-mapbox-style
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 10:01:33 +00:00
mike-000
0affb38890 Correct name in docs 2022-05-29 14:08:44 +01:00
mike-000
bbfcf42daf Test tile pyramid getData() 2022-05-28 11:56:26 +01:00
mike-000
214a384adf Fix tile pyramid getData() 2022-05-28 11:56:24 +01:00
MoonE
ca48e15d73 Merge pull request #13709 from MoonE/ufo
Improve icon-sprite-webgl example
2022-05-27 08:25:51 +02:00
Maximilian Krög
8d8f4fd961 Improve icon-sprite-webgl example code
Should load slightly faster now by adding the source only after all
features are available, this avoids dispatching the addfeature event
for each of the 80000 features.
Use webgl tile layer for the background so the canvas can be shared
between both layers.
2022-05-26 20:30:24 +02:00
Maximilian Krög
03f3e619f2 Update ufo example data
Downloaded a newer version of the data from
https://www.kaggle.com/datasets/NUFORC/ufo-sightings?select=scrubbed.csv
and fixed the remaining errors in it.
2022-05-26 20:11:40 +02:00
MoonE
599257a144 Merge pull request #13627 from MoonE/hitdetect-origin-pixel-ratio
Fix hitdetection for icon with offset and pixelratio != 1
2022-05-25 22:45:03 +02:00
Maximilian Krög
d45e08d197 Fix icon offset for hitdetect image
It only worked correctly with pixel ratio of 1
2022-05-25 22:33:57 +02:00
Maximilian Krög
6b3c9cc196 Test hitdetect icon with offset 2022-05-25 22:33:57 +02:00
Maximilian Krög
f5bdc982b5 Improve test coverage for icon clone method 2022-05-25 22:33:54 +02:00
MoonE
bed1e514f9 Merge pull request #13626 from MoonE/rendercomplete-wait-for-icons
Wait for icons to be loaded before firing rendercomplete event
2022-05-25 22:32:43 +02:00
Luis Camacho
4773595748 added tests for drawTextOnPath multi-line text handling 2022-05-25 14:34:32 +01:00
Maximilian Krög
e8925a90e5 Test VectorTile layer not ready while loading needed icons 2022-05-24 22:26:17 +02:00
Maximilian Krög
11589f3317 Test rendercomplete with icon for VectorTile 2022-05-24 22:18:36 +02:00
Maximilian Krög
2473e5bd32 Fix vector tile renderer ready 2022-05-24 21:47:09 +02:00
Maximilian Krög
de392a9846 Don't fire rendercomplete event while icons are loading 2022-05-24 21:47:09 +02:00
Maximilian Krög
dc128820c1 Test rendercomplete waits for icon load 2022-05-24 21:47:08 +02:00
Maximilian Krög
5345b80aa1 Remove unused getImageState call 2022-05-24 21:47:08 +02:00
Maximilian Krög
d7ebcf0ef8 Fix error when image state changes on disposed renderer 2022-05-24 21:47:04 +02:00
Andreas Hocevar
0e2399d8f4 Merge pull request #13702 from mike-000/interpolate-typedef
Change typedef to boolean
2022-05-24 11:16:24 +02:00
mike-000
4fb856af3b change typedef to boolean 2022-05-24 09:04:58 +01:00
Andreas Hocevar
a16aef042d Merge pull request #13691 from burleight/vectorSource-getFeaturesInExtent-wrapX
#13690 VectorSource#getFeaturesInExtent add projection parameter
2022-05-24 09:37:10 +02:00
Tim Schaub
d0965835f6 Merge pull request #13693 from openlayers/dependabot/npm_and_yarn/eslint-8.16.0
Bump eslint from 8.9.0 to 8.16.0
2022-05-23 17:43:20 -06:00
dependabot[bot]
ac8367f536 Bump eslint from 8.9.0 to 8.16.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.9.0 to 8.16.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.9.0...v8.16.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 23:37:47 +00:00
Tim Schaub
0b780b1c0f Merge pull request #13701 from tschaub/update-eslint-config
Update ESLint config and plugins
2022-05-23 17:33:49 -06:00
Tomas Burleigh
68e604e3be VectorSource#getFeaturesInExtent projection renamed to opt_projection and amended jsdoc #13690 2022-05-24 09:46:18 +12:00
Tim Schaub
bbbca0ab78 Update ESLint config and plugins 2022-05-23 15:01:07 -06:00
Luis Camacho
94c8900883 ensure single-line label when rendering across segments 2022-05-23 14:52:47 +01:00
Tim Schaub
f1fc38ce33 Merge pull request #13694 from openlayers/dependabot/npm_and_yarn/babel/core-7.18.0
Bump @babel/core from 7.17.10 to 7.18.0
2022-05-23 07:40:04 -06:00
Tim Schaub
139a12b448 Merge pull request #13699 from openlayers/dependabot/npm_and_yarn/rollup-2.74.1
Bump rollup from 2.73.0 to 2.74.1
2022-05-23 07:36:01 -06:00
Tim Schaub
af898fb18d Merge pull request #13695 from openlayers/dependabot/npm_and_yarn/copy-webpack-plugin-11.0.0
Bump copy-webpack-plugin from 10.2.4 to 11.0.0
2022-05-23 07:33:11 -06:00
dependabot[bot]
c02b2f19a0 Bump @babel/core from 7.17.10 to 7.18.0
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.17.10 to 7.18.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.18.0/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 13:32:05 +00:00
Tim Schaub
86538724ba Merge pull request #13696 from openlayers/dependabot/npm_and_yarn/webpack-dev-middleware-5.3.3
Bump webpack-dev-middleware from 5.3.1 to 5.3.3
2022-05-23 07:31:55 -06:00
Tim Schaub
47bf71a36f Merge pull request #13697 from openlayers/dependabot/npm_and_yarn/marked-4.0.16
Bump marked from 4.0.15 to 4.0.16
2022-05-23 07:31:28 -06:00
dependabot[bot]
e5299bfe32 Bump rollup from 2.73.0 to 2.74.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.73.0 to 2.74.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.73.0...v2.74.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 13:31:22 +00:00
Tim Schaub
6a4ba5ab07 Merge pull request #13698 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.18.0
Bump @babel/preset-env from 7.17.10 to 7.18.0
2022-05-23 07:30:54 -06:00
Tim Schaub
a37d85bd04 Merge pull request #13700 from openlayers/dependabot/npm_and_yarn/puppeteer-14.1.1
Bump puppeteer from 14.1.0 to 14.1.1
2022-05-23 07:29:47 -06:00
dependabot[bot]
22f002a72c Bump puppeteer from 14.1.0 to 14.1.1
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 14.1.0 to 14.1.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/v14.1.0...v14.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 10:03:29 +00:00
dependabot[bot]
5b775ec562 Bump @babel/preset-env from 7.17.10 to 7.18.0
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.17.10 to 7.18.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.18.0/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 10:02:57 +00:00
dependabot[bot]
2c78d6a7d4 Bump marked from 4.0.15 to 4.0.16
Bumps [marked](https://github.com/markedjs/marked) from 4.0.15 to 4.0.16.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.15...v4.0.16)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 10:02:33 +00:00
dependabot[bot]
27f14ee2ce Bump webpack-dev-middleware from 5.3.1 to 5.3.3
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.1 to 5.3.3.
- [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/v5.3.1...v5.3.3)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 10:02:12 +00:00
dependabot[bot]
37bae59236 Bump copy-webpack-plugin from 10.2.4 to 11.0.0
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 10.2.4 to 11.0.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/v10.2.4...v11.0.0)

---
updated-dependencies:
- dependency-name: copy-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 10:01:54 +00:00
Andreas Hocevar
d9fdc4f0bf Merge pull request #13688 from ahocevar/wmts-flip-x
Flip extent coordinates for projections with ne* axis order
2022-05-22 15:52:19 +02:00
Tim Schaub
6b55481a0c Merge pull request #13689 from tschaub/map-link
Link interaction
2022-05-22 07:02:52 -06:00
Luis Camacho
5e2b9fb629 fix to text width calculation
now considers new lines to match rendering
2022-05-22 12:29:19 +01:00
Tim Schaub
cf7daf36d6 Include layer visibility in the URL 2022-05-21 10:50:45 -06:00
Tim Schaub
6690dc99dd Link interaction 2022-05-21 10:50:38 -06:00
Tomas Burleigh
78274befb8 #13690 VectorSource#getFeaturesInExtent add projection parameter 2022-05-21 14:28:19 +12:00
Andreas Hocevar
aa190a629a Flip extent coordinates for projections with ne* axis order 2022-05-20 19:38:55 +02:00
MoonE
3857e2051c Merge pull request #13676 from MoonE/test-improvements
Test improvements
2022-05-16 23:06:26 +02:00
Tim Schaub
5ebfeba945 Merge pull request #13680 from openlayers/dependabot/npm_and_yarn/rollup-2.73.0
Bump rollup from 2.72.1 to 2.73.0
2022-05-16 07:37:31 -06:00
dependabot[bot]
09cf297136 Bump rollup from 2.72.1 to 2.73.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.72.1 to 2.73.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.72.1...v2.73.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 13:31:26 +00:00
Tim Schaub
b657f7dc37 Merge pull request #13681 from openlayers/dependabot/npm_and_yarn/webpack-5.72.1
Bump webpack from 5.72.0 to 5.72.1
2022-05-16 07:30:57 -06:00
Tim Schaub
45c4fffbd5 Merge pull request #13679 from openlayers/dependabot/npm_and_yarn/karma-6.3.20
Bump karma from 6.3.19 to 6.3.20
2022-05-16 07:30:09 -06:00
Tim Schaub
9c4164db28 Merge pull request #13678 from openlayers/dependabot/npm_and_yarn/puppeteer-14.1.0
Bump puppeteer from 13.7.0 to 14.1.0
2022-05-16 07:29:28 -06:00
Tim Schaub
2f802bdd9d Merge pull request #13682 from openlayers/dependabot/npm_and_yarn/ol-mapbox-style-8.0.8
Bump ol-mapbox-style from 8.0.7 to 8.0.8
2022-05-16 07:28:18 -06:00
Tim Schaub
b5a24db3da Merge pull request #13683 from openlayers/dependabot/npm_and_yarn/yargs-17.5.1
Bump yargs from 17.4.1 to 17.5.1
2022-05-16 07:27:28 -06:00
dependabot[bot]
020248b880 Bump yargs from 17.4.1 to 17.5.1
Bumps [yargs](https://github.com/yargs/yargs) from 17.4.1 to 17.5.1.
- [Release notes](https://github.com/yargs/yargs/releases)
- [Changelog](https://github.com/yargs/yargs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs/compare/v17.4.1...v17.5.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 10:02:37 +00:00
dependabot[bot]
6afc720b50 Bump ol-mapbox-style from 8.0.7 to 8.0.8
Bumps [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) from 8.0.7 to 8.0.8.
- [Release notes](https://github.com/openlayers/ol-mapbox-style/releases)
- [Changelog](https://github.com/openlayers/ol-mapbox-style/blob/main/CHANGELOG.md)
- [Commits](https://github.com/openlayers/ol-mapbox-style/compare/v8.0.7...v8.0.8)

---
updated-dependencies:
- dependency-name: ol-mapbox-style
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 10:02:19 +00:00
dependabot[bot]
8c0ae135ec Bump webpack from 5.72.0 to 5.72.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.72.0 to 5.72.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.72.0...v5.72.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 10:02:00 +00:00
dependabot[bot]
1923a7b829 Bump karma from 6.3.19 to 6.3.20
Bumps [karma](https://github.com/karma-runner/karma) from 6.3.19 to 6.3.20.
- [Release notes](https://github.com/karma-runner/karma/releases)
- [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma/compare/v6.3.19...v6.3.20)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 10:01:24 +00:00
dependabot[bot]
bc1d161276 Bump puppeteer from 13.7.0 to 14.1.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 13.7.0 to 14.1.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/v13.7.0...v14.1.0)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 10:01:07 +00:00
Maximilian Krög
ecf90a49c8 Improve browser tests
- Listen for image change event instead of waiting 200 ms
- Properly fake fetch response, can never be undefined on resolve
2022-05-15 22:30:40 +02:00
Maximilian Krög
302a9d51e1 Fix WebGLTile browser tests
The loader has to return a TypedArray, not ImageData
2022-05-15 22:30:40 +02:00
Maximilian Krög
744324859e Fix font rerender test when font is a system font 2022-05-15 22:30:40 +02:00
Maximilian Krög
72d61f887d Use document.head instead of getElementByTagName 2022-05-15 21:34:26 +02:00
EvertEt
f30e388db0 Add null return type for TileGrid functions 2022-05-13 20:09:20 +02:00
Andreas Hocevar
30358b61a9 Merge pull request #13673 from ahocevar/getclipcoords-null
Add  null return type
2022-05-13 19:56:14 +02:00
Andreas Hocevar
fc5f85dbcf Add null return type 2022-05-13 19:39:47 +02:00
Andreas Hocevar
ce21007f45 Merge pull request #13672 from CNS-Solutions/currentclip_is_null
fix currentClip == null
2022-05-13 19:28:01 +02:00
VLCEK Martin
bd223b4447 fix currentClip == null 2022-05-13 16:03:14 +02:00
Tim Schaub
c6de7701bb Merge pull request #13669 from tschaub/nan-nodata
Handle NaN nodata
2022-05-12 14:58:50 -06:00
Tim Schaub
25b2007636 Handle NaN nodata 2022-05-12 11:31:08 -06:00
Andreas Hocevar
6341ed3a64 Merge pull request #13656 from arekgotfryd/draw-shapes-example-fix
Fix for parcel error while building examples
2022-05-10 16:09:51 +02:00
arkadiusz.gotfryd
6bbd9a1dd4 Fix for codesandbox.io env (code review change) 2022-05-09 21:16:46 +02:00
Tim Schaub
09229b5f70 Merge pull request #13661 from openlayers/dependabot/npm_and_yarn/rollup-2.72.1
Bump rollup from 2.71.1 to 2.72.1
2022-05-09 09:04:29 -06:00
dependabot[bot]
66fc5a21d8 Bump rollup from 2.71.1 to 2.72.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.71.1 to 2.72.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.71.1...v2.72.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 14:57:41 +00:00
Tim Schaub
55a1a15481 Merge pull request #13659 from openlayers/dependabot/npm_and_yarn/sinon-14.0.0
Bump sinon from 13.0.2 to 14.0.0
2022-05-09 08:57:08 -06:00
Tim Schaub
9d1de162c8 Merge pull request #13662 from openlayers/dependabot/npm_and_yarn/webpack-dev-server-4.9.0
Bump webpack-dev-server from 4.8.1 to 4.9.0
2022-05-09 08:56:28 -06:00
Tim Schaub
4224f84280 Merge pull request #13663 from openlayers/dependabot/npm_and_yarn/rollup/plugin-node-resolve-13.3.0
Bump @rollup/plugin-node-resolve from 13.2.1 to 13.3.0
2022-05-09 08:55:57 -06:00
dependabot[bot]
35499de4d4 Bump @rollup/plugin-node-resolve from 13.2.1 to 13.3.0
Bumps [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/HEAD/packages/node-resolve) from 13.2.1 to 13.3.0.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/node-resolve/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/node-resolve-v13.3.0/packages/node-resolve)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 10:02:47 +00:00
dependabot[bot]
94c3d74fc2 Bump webpack-dev-server from 4.8.1 to 4.9.0
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.8.1 to 4.9.0.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.8.1...v4.9.0)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 10:02:32 +00:00
dependabot[bot]
fff0313950 Bump sinon from 13.0.2 to 14.0.0
Bumps [sinon](https://github.com/sinonjs/sinon) from 13.0.2 to 14.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v13.0.2...v14.0.0)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 10:01:30 +00:00
arkadiusz.gotfryd
77cd464a7b Add module type to main.js script tag 2022-05-08 23:25:51 +02:00
arkadiusz.gotfryd
864e9e5c5f Fix for parcel error while building examples 2022-05-08 22:54:22 +02:00
Tim Schaub
a5c2c8d3d4 Merge pull request #13648 from tschaub/data-tile-size
Explicit data tile size
2022-05-07 10:16:40 -06:00
Andreas Hocevar
b490b2e01a Use a compatible version of geotiff.js 2022-05-07 11:27:07 +02:00
Andreas Hocevar
4efef182bb Common tile size check with tolerance 2022-05-07 09:50:21 +02:00
Tim Schaub
38b48bd341 Explicit data tile size 2022-05-06 14:47:10 -06:00
Andreas Hocevar
71f37802ae Merge pull request #13566 from CNS-Solutions/decluttering
Decluttering mode by style
2022-05-06 22:23:59 +02:00
VLCEK Martin
6ab4d452a4 reference image from CI 2022-05-06 16:52:56 +02:00
Andreas Hocevar
b29ad01c7a Merge pull request #13645 from mike-000/tile-load-errors
Output GeoTIFF tile load errors to console
2022-05-06 12:23:46 +02:00
VLCEK Martin
bce37b5650 Zoom out a bit for rendering test 2022-05-06 06:56:13 +02:00
VLCEK Martin
9adfe7aca6 improve test with overlapping circles. 2022-05-05 13:47:46 +02:00
VLCEK Martin
9338286661 improve test with overlapping circles. 2022-05-05 13:26:12 +02:00
VLCEK Martin
e1593ce59d Support declutter mode for image styles
Allows to specify for each image style, whether the image
should be decluttered, always drawn but still serving as
obstacle, or drawn without being an obstacle for other
images/texts.

The layer must still have declutter = true set for this
property to have any effect.
2022-05-05 12:34:00 +02:00
mike-000
cf95f6313b fix lint 2022-05-04 20:18:17 +01:00
mike-000
8ef8cbf4e2 output tile load errors to console 2022-05-04 19:54:07 +01:00
Andreas Hocevar
c2639f89f2 Merge pull request #13602 from openlayers/dependabot/npm_and_yarn/ol-mapbox-style-8.0.7
Bump ol-mapbox-style from 8.0.5 to 8.0.7
2022-05-04 00:53:17 +02:00
Andreas Hocevar
27830562fd Update test image 2022-05-04 00:39:30 +02:00
Marc Jansen
7aa36c65d4 Merge pull request #13641 from openlayers/typo
Fix typos in upgrade notes
2022-05-03 23:15:36 +02:00
Marc Jansen
5f130fb261 Properly close quotes 2022-05-03 23:10:20 +02:00
Marc Jansen
be41da34ef Fix a typo in upgrade notes
Introduced in https://github.com/openlayers/openlayers/pull/13637
2022-05-03 22:15:52 +02:00
Andreas Hocevar
9a6ff5a321 Merge pull request #13637 from ahocevar/dimensions-transform
Let transform function transform all dimensions it is capable of
2022-05-03 15:19:20 +02:00
Andreas Hocevar
6614cf6051 Merge pull request #13628 from openlayers/dependabot/npm_and_yarn/marked-4.0.15
Bump marked from 4.0.14 to 4.0.15
2022-05-03 15:07:36 +02:00
Andreas Hocevar
50c96831d9 Merge pull request #13629 from openlayers/dependabot/npm_and_yarn/express-4.18.1
Bump express from 4.18.0 to 4.18.1
2022-05-03 13:43:08 +02:00
dependabot[bot]
32cb86f63d Bump marked from 4.0.14 to 4.0.15
Bumps [marked](https://github.com/markedjs/marked) from 4.0.14 to 4.0.15.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.14...v4.0.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-03 11:42:58 +00:00
Andreas Hocevar
92b5c7a4f9 Merge pull request #13630 from openlayers/dependabot/npm_and_yarn/rollup-2.71.1
Bump rollup from 2.70.2 to 2.71.1
2022-05-03 13:42:44 +02:00
Andreas Hocevar
ef39e55a92 Merge pull request #13631 from openlayers/dependabot/npm_and_yarn/typescript-4.6.4
Bump typescript from 4.6.3 to 4.6.4
2022-05-03 13:42:11 +02:00
Andreas Hocevar
4e21e1e24e Merge pull request #13632 from openlayers/dependabot/npm_and_yarn/mocha-10.0.0
Bump mocha from 9.2.2 to 10.0.0
2022-05-03 13:41:38 +02:00
dependabot[bot]
0b4059ae9f Bump express from 4.18.0 to 4.18.1
Bumps [express](https://github.com/expressjs/express) from 4.18.0 to 4.18.1.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.0...4.18.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-03 11:35:22 +00:00
Andreas Hocevar
959fffaa70 Merge pull request #13633 from openlayers/dependabot/npm_and_yarn/babel/core-7.17.10
Bump @babel/core from 7.17.9 to 7.17.10
2022-05-03 13:34:26 +02:00
Andreas Hocevar
d445d0d9c4 Merge pull request #13634 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.17.10
Bump @babel/preset-env from 7.16.11 to 7.17.10
2022-05-03 13:34:01 +02:00
Andreas Hocevar
6ace5e7530 Let transform function transform all dimensions it is capable of 2022-05-02 22:25:11 +02:00
dependabot[bot]
989a87ee29 Bump @babel/preset-env from 7.16.11 to 7.17.10
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.16.11 to 7.17.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.17.10/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 10:02:43 +00:00
dependabot[bot]
69d2d8f3f1 Bump @babel/core from 7.17.9 to 7.17.10
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.17.9 to 7.17.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.17.10/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 10:02:25 +00:00
dependabot[bot]
4f843d4d48 Bump mocha from 9.2.2 to 10.0.0
Bumps [mocha](https://github.com/mochajs/mocha) from 9.2.2 to 10.0.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/v9.2.2...v10.0.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 10:01:59 +00:00
dependabot[bot]
cd933dd68e Bump typescript from 4.6.3 to 4.6.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.3 to 4.6.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.3...v4.6.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 10:01:48 +00:00
dependabot[bot]
122052e7e1 Bump rollup from 2.70.2 to 2.71.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.70.2 to 2.71.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.70.2...v2.71.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 10:01:33 +00:00
Tim Schaub
626baaafa2 Merge pull request #13616 from openlayers/dependabot/github_actions/github/codeql-action-2
Bump github/codeql-action from 1 to 2
2022-04-28 21:02:07 -06:00
Tim Schaub
765e3d798f Merge pull request #13617 from openlayers/dependabot/github_actions/actions/setup-node-3
Bump actions/setup-node from 2 to 3
2022-04-28 21:01:19 -06:00
dependabot[bot]
9cc09d7215 Bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 02:57:38 +00:00
Tim Schaub
2068dde85d Merge pull request #13615 from openlayers/dependabot/github_actions/actions/upload-artifact-3
Bump actions/upload-artifact from 2 to 3
2022-04-28 20:57:17 -06:00
dependabot[bot]
330260ea69 Bump actions/setup-node from 2 to 3
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2 to 3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 02:56:36 +00:00
Tim Schaub
874be4760f Merge pull request #13618 from openlayers/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-04-28 20:55:35 -06:00
Tim Schaub
81926d99e7 Merge pull request #13619 from openlayers/dependabot/github_actions/actions/github-script-6
Bump actions/github-script from 5 to 6
2022-04-28 20:54:39 -06:00
Tim Schaub
4722d3e42e Merge pull request #13620 from openlayers/dependabot/npm_and_yarn/puppeteer-13.7.0
Bump puppeteer from 13.6.0 to 13.7.0
2022-04-28 20:53:27 -06:00
Tim Schaub
a46d01fbc1 Merge pull request #13621 from openlayers/dependabot/npm_and_yarn/express-4.18.0
Bump express from 4.17.3 to 4.18.0
2022-04-28 20:52:46 -06:00
dependabot[bot]
b5925185ee Bump express from 4.17.3 to 4.18.0
Bumps [express](https://github.com/expressjs/express) from 4.17.3 to 4.18.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.3...4.18.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-28 14:45:53 +00:00
dependabot[bot]
8d81601dba Bump puppeteer from 13.6.0 to 13.7.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 13.6.0 to 13.7.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/v13.6.0...v13.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-28 14:45:21 +00:00
dependabot[bot]
45354b61b1 Bump actions/github-script from 5 to 6
Bumps [actions/github-script](https://github.com/actions/github-script) from 5 to 6.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-28 14:45:18 +00:00
dependabot[bot]
e403502fc9 Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-28 14:45:15 +00:00
dependabot[bot]
caaa6993e9 Bump actions/upload-artifact from 2 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-28 14:45:07 +00:00
Tim Schaub
b902398a77 Merge pull request #13614 from tschaub/dependabot-fix
Fix dependabot config
2022-04-28 08:44:46 -06:00
Tim Schaub
9a3fd74470 Fix dependabot config 2022-04-28 08:31:26 -06:00
Tim Schaub
4f6a3149c8 Merge pull request #13611 from turrisxyz/naveen/feat/dependabot
Include GitHub actions in the dependabot config
2022-04-27 19:48:32 -06:00
Tim Schaub
a086b419e6 Merge pull request #13594 from mike-000/load
Do not reload data tiles if already loaded or loading
2022-04-27 14:57:08 -06:00
Tim Schaub
5084d5566a Test that data tiles can be loaded after error 2022-04-27 14:50:33 -06:00
naveensrinivasan
f396a0efa5 chore: Included githubactions in the dependabot config
This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure.

Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot

GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
2022-04-27 15:38:37 -05:00
mike-000
0ef7c40b8e do not reload if already loaded or loading 2022-04-27 14:35:11 -06:00
Tim Schaub
36ec95677d Merge pull request #13607 from turrisxyz/setup-permissions
Limit permissions for GitHub actions
2022-04-27 14:33:05 -06:00
naveen
c6a7aa08c7 chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-04-27 01:37:20 +00:00
Tim Schaub
fc743b1b52 Merge pull request #13603 from tschaub/rectangles
Handle rotation with non-square tiles
2022-04-25 19:13:11 -06:00
Tim Schaub
de9f6e2dc5 Handle rotation with non-square tiles 2022-04-25 10:40:37 -06:00
Tim Schaub
8038a9fd12 Merge pull request #13596 from openlayers/dependabot/npm_and_yarn/rollup/plugin-commonjs-22.0.0
Bump @rollup/plugin-commonjs from 21.1.0 to 22.0.0
2022-04-25 08:07:15 -06:00
Tim Schaub
ab06aa8ae9 Merge pull request #13600 from openlayers/dependabot/npm_and_yarn/puppeteer-13.6.0
Bump puppeteer from 13.5.2 to 13.6.0
2022-04-25 07:11:13 -06:00
Tim Schaub
7c16efbe8a Merge pull request #13598 from openlayers/dependabot/npm_and_yarn/pixelmatch-5.3.0
Bump pixelmatch from 5.2.1 to 5.3.0
2022-04-25 07:10:11 -06:00
Tim Schaub
59b84b2a23 Merge pull request #13601 from openlayers/dependabot/npm_and_yarn/babel-loader-8.2.5
Bump babel-loader from 8.2.4 to 8.2.5
2022-04-25 07:09:26 -06:00
Tim Schaub
8063e2e344 Merge pull request #13599 from openlayers/dependabot/npm_and_yarn/karma-6.3.19
Bump karma from 6.3.18 to 6.3.19
2022-04-25 07:08:48 -06:00
dependabot[bot]
b9e1bf45dc Bump ol-mapbox-style from 8.0.5 to 8.0.7
Bumps [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) from 8.0.5 to 8.0.7.
- [Release notes](https://github.com/openlayers/ol-mapbox-style/releases)
- [Changelog](https://github.com/openlayers/ol-mapbox-style/blob/main/CHANGELOG.md)
- [Commits](https://github.com/openlayers/ol-mapbox-style/compare/v8.0.5...v8.0.7)

---
updated-dependencies:
- dependency-name: ol-mapbox-style
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 10:02:58 +00:00
dependabot[bot]
a9db8498e6 Bump babel-loader from 8.2.4 to 8.2.5
Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.2.4 to 8.2.5.
- [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.4...v8.2.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 10:02:36 +00:00
dependabot[bot]
5d5c914dbd Bump puppeteer from 13.5.2 to 13.6.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 13.5.2 to 13.6.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/v13.5.2...v13.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 10:02:26 +00:00
dependabot[bot]
bdbe1af3ce Bump karma from 6.3.18 to 6.3.19
Bumps [karma](https://github.com/karma-runner/karma) from 6.3.18 to 6.3.19.
- [Release notes](https://github.com/karma-runner/karma/releases)
- [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma/compare/v6.3.18...v6.3.19)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 10:02:13 +00:00
dependabot[bot]
bc3cac09d6 Bump pixelmatch from 5.2.1 to 5.3.0
Bumps [pixelmatch](https://github.com/mapbox/pixelmatch) from 5.2.1 to 5.3.0.
- [Release notes](https://github.com/mapbox/pixelmatch/releases)
- [Commits](https://github.com/mapbox/pixelmatch/compare/v5.2.1...v5.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 10:02:01 +00:00
dependabot[bot]
1317f1663b Bump @rollup/plugin-commonjs from 21.1.0 to 22.0.0
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 21.1.0 to 22.0.0.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/commonjs-v22.0.0/packages/commonjs)

---
updated-dependencies:
- dependency-name: "@rollup/plugin-commonjs"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 10:01:18 +00:00
Andreas Hocevar
7ca0aee843 Merge pull request #13595 from ahocevar/loadstart-loadend-docs
Properly document loadstart and loadend events
2022-04-23 21:36:53 +02:00
Andreas Hocevar
c080a0d2bf Properly document loadstart and loadend events 2022-04-23 21:27:27 +02:00
Andreas Hocevar
16325f069c Merge pull request #13568 from mike-000/osmdata-attribution
Update OSM Vector Tiles attribution
2022-04-22 08:38:31 +02:00
Tim Schaub
b6acf39ae9 Merge pull request #13582 from openlayers/dependabot/npm_and_yarn/sinon-13.0.2
Bump sinon from 13.0.1 to 13.0.2
2022-04-18 07:09:21 -06:00
Tim Schaub
ffeda8d20c Merge pull request #13583 from openlayers/dependabot/npm_and_yarn/async-2.6.4
Bump async from 2.6.3 to 2.6.4
2022-04-18 06:44:55 -06:00
Tim Schaub
03f09370ba Merge pull request #13578 from openlayers/dependabot/npm_and_yarn/rollup/plugin-commonjs-21.1.0
Bump @rollup/plugin-commonjs from 21.0.3 to 21.1.0
2022-04-18 06:42:53 -06:00
Tim Schaub
ada63b4989 Merge pull request #13579 from openlayers/dependabot/npm_and_yarn/fs-extra-10.1.0
Bump fs-extra from 10.0.1 to 10.1.0
2022-04-18 06:42:14 -06:00
Tim Schaub
f8a3092182 Merge pull request #13580 from openlayers/dependabot/npm_and_yarn/karma-6.3.18
Bump karma from 6.3.17 to 6.3.18
2022-04-18 06:41:30 -06:00
dependabot[bot]
52daaf6414 Bump async from 2.6.3 to 2.6.4
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 12:40:42 +00:00
Tim Schaub
4c70a07d02 Merge pull request #13581 from openlayers/dependabot/npm_and_yarn/rollup-2.70.2
Bump rollup from 2.70.1 to 2.70.2
2022-04-18 06:40:42 -06:00
Tim Schaub
af190db93c Merge pull request #13577 from openlayers/dependabot/npm_and_yarn/rollup/plugin-node-resolve-13.2.1
Bump @rollup/plugin-node-resolve from 13.1.3 to 13.2.1
2022-04-18 06:40:05 -06:00
dependabot[bot]
9c0b3264eb Bump sinon from 13.0.1 to 13.0.2
Bumps [sinon](https://github.com/sinonjs/sinon) from 13.0.1 to 13.0.2.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v13.0.1...v13.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 10:02:08 +00:00
dependabot[bot]
becacd4bd0 Bump rollup from 2.70.1 to 2.70.2
Bumps [rollup](https://github.com/rollup/rollup) from 2.70.1 to 2.70.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.70.1...v2.70.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 10:01:54 +00:00
dependabot[bot]
f45908d097 Bump karma from 6.3.17 to 6.3.18
Bumps [karma](https://github.com/karma-runner/karma) from 6.3.17 to 6.3.18.
- [Release notes](https://github.com/karma-runner/karma/releases)
- [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma/compare/v6.3.17...v6.3.18)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 10:01:42 +00:00
dependabot[bot]
1f3e60f2be Bump fs-extra from 10.0.1 to 10.1.0
Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 10.0.1 to 10.1.0.
- [Release notes](https://github.com/jprichardson/node-fs-extra/releases)
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/10.0.1...10.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 10:01:30 +00:00
dependabot[bot]
3d9dd18e4b Bump @rollup/plugin-commonjs from 21.0.3 to 21.1.0
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 21.0.3 to 21.1.0.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/commonjs-v21.1.0/packages/commonjs)

---
updated-dependencies:
- dependency-name: "@rollup/plugin-commonjs"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 10:01:03 +00:00
Andreas Hocevar
d315675ecc Merge pull request #13528 from burleight/webglpointslayer-wrap-x
WebGLPointsLayer wrapX support - partially addressing #11131
2022-04-17 17:34:01 +02:00
Andreas Hocevar
d404371417 Merge pull request #13571 from rycgar/justify-text
Add `justify` option for text style
2022-04-15 13:25:22 +02:00
Andreas Hocevar
e8f151543d Simplify/beautify example 2022-04-15 13:13:39 +02:00
Denis
585ae66961 Fix review for text justify 2022-04-14 13:06:49 +02:00
Andreas Hocevar
041b9a188a Use reference image from CI 2022-04-14 08:14:47 +02:00
Andreas Hocevar
18080d6c4c Merge pull request #13565 from mike-000/null-projection
Do not assert null projection
2022-04-14 07:38:02 +02:00
Denis
359512c6b2 Add test for text justification within the text-box
See: https://github.com/openlayers/openlayers/issues/13481
2022-04-13 15:35:52 +02:00
Denis
1850e16bde Improve jsDoc and some naming 2022-04-13 14:11:28 +02:00
Denis
e00e3a7b8e Improve jsDoc for style/Text justify 2022-04-13 00:08:15 +02:00
Denis
4db25c86c8 Implement text justify within the label box
See: https://github.com/openlayers/openlayers/issues/13481
2022-04-13 00:08:15 +02:00
Denis
c45a443cf5 Add example for justify text 2022-04-13 00:08:15 +02:00
Denis
5a61bb51f5 Extend Text.js: add justification option 2022-04-13 00:08:15 +02:00
mike-000
439dc76065 update attribution 2022-04-12 17:52:09 +01:00
mike-000
e8257f1bb3 projection may be null 2022-04-12 16:22:25 +01:00
mike-000
eaa87e8d8f do not assert null projection 2022-04-12 09:31:55 +01:00
Andreas Hocevar
5651520dcd Merge pull request #13496 from mike-000/projection-scale
Improve Projection and Scale example calculations
2022-04-11 21:47:41 +02:00
Andreas Hocevar
353cb4e2fd Merge pull request #13557 from openlayers/dependabot/npm_and_yarn/webpack-5.72.0
Bump webpack from 5.71.0 to 5.72.0
2022-04-11 21:44:44 +02:00
Andreas Hocevar
de0f5be04c Merge pull request #13546 from drnextgis/draw_stride
Add geometryLayout property to Draw interaction
2022-04-11 21:43:54 +02:00
dependabot[bot]
83a84fa5ba Bump webpack from 5.71.0 to 5.72.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.71.0 to 5.72.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.71.0...v5.72.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 19:25:15 +00:00
Andreas Hocevar
c0b2b9526c Merge pull request #13560 from openlayers/dependabot/npm_and_yarn/babel/core-7.17.9
Bump @babel/core from 7.17.8 to 7.17.9
2022-04-11 21:25:07 +02:00
Andreas Hocevar
1dcc2950f7 Merge pull request #13559 from openlayers/dependabot/npm_and_yarn/webpack-dev-server-4.8.1
Bump webpack-dev-server from 4.7.4 to 4.8.1
2022-04-11 21:24:33 +02:00
Andreas Hocevar
4005dba025 Merge pull request #13558 from openlayers/dependabot/npm_and_yarn/marked-4.0.14
Bump marked from 4.0.12 to 4.0.14
2022-04-11 21:23:54 +02:00
Andreas Hocevar
2f8e4f3f9e Merge pull request #13556 from openlayers/dependabot/npm_and_yarn/yargs-17.4.1
Bump yargs from 17.4.0 to 17.4.1
2022-04-11 21:23:21 +02:00
Andreas Hocevar
bde8c94fdf Merge pull request #13552 from ahocevar/ol-mapbox-style-8
Updates for ol-mapbox-style v8
2022-04-11 21:20:45 +02:00
Andreas Hocevar
d93699b4f0 Update to ol-mapbox-style v8.0.5 2022-04-11 21:13:11 +02:00
Denis Rykov
026c88ca35 Add geometryLayout property to Draw interaction 2022-04-11 13:13:25 +02:00
dependabot[bot]
edd24bca98 Bump @babel/core from 7.17.8 to 7.17.9
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.17.8 to 7.17.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.17.9/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 10:02:12 +00:00
dependabot[bot]
f0b205aa59 Bump webpack-dev-server from 4.7.4 to 4.8.1
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.7.4 to 4.8.1.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.7.4...v4.8.1)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 10:01:56 +00:00
dependabot[bot]
bf7bd5c976 Bump marked from 4.0.12 to 4.0.14
Bumps [marked](https://github.com/markedjs/marked) from 4.0.12 to 4.0.14.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.12...v4.0.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 10:01:43 +00:00
dependabot[bot]
0b51ddb1f4 Bump yargs from 17.4.0 to 17.4.1
Bumps [yargs](https://github.com/yargs/yargs) from 17.4.0 to 17.4.1.
- [Release notes](https://github.com/yargs/yargs/releases)
- [Changelog](https://github.com/yargs/yargs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs/compare/v17.4.0...v17.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 10:01:10 +00:00
Andreas Hocevar
29dcdeee55 Merge pull request #13554 from jipexu/main
NM symbol unit
2022-04-10 21:41:57 +02:00
Andreas Hocevar
5722460250 Load source maps of dependencies for tests 2022-04-10 21:41:00 +02:00
Andreas Hocevar
ffee2f727e Updates and example improvements for ol-mapbox-style v8 2022-04-10 21:41:00 +02:00
jipexu
6a35a20ff1 Update scaleline.test.js 2022-04-10 21:01:42 +02:00
jipexu
96cebca3b7 Update scaleline.test.js 2022-04-10 20:37:18 +02:00
jipexu
2c24ceef86 NM symbol unit
https://github.com/openlayers/openlayers/issues/13497

please check if it is enough ...
2022-04-10 17:24:08 +02:00
Andreas Hocevar
ae00bf6c48 Merge pull request #13550 from ahocevar/background
Update backgrounds when function returns a different color
2022-04-10 01:25:49 +02:00
Tim Schaub
b2a7ab0e14 Merge pull request #13547 from mike-000/render-gutter
Handle gutter in WebGL tile renderer
2022-04-09 16:29:00 -06:00
Andreas Hocevar
76a36e4583 Merge pull request #13551 from mike-000/pinch-zoom
Do not add second interaction in Pinch Zoom example
2022-04-09 21:02:10 +02:00
mike-000
d2fc5caa21 do not add second interaction 2022-04-09 13:06:32 +01:00
Andreas Hocevar
cbb18ab805 Update backgrounds when function returns a different color 2022-04-09 10:53:20 +02:00
mike-000
6ca44f6ffa add gutter option 2022-04-08 14:17:54 +01:00
mike-000
36159287d5 handle gutter in renderer 2022-04-08 14:17:22 +01:00
Andreas Hocevar
c03f58fe5d Merge pull request #12936 from ejn/bugfix/gml-multiple-element-parsing
Bugfix for GML parsing with multiple property elements with XML attributes
2022-04-05 11:57:53 +02:00
Tim Schaub
853ffb54e1 Merge pull request #13538 from openlayers/dependabot/npm_and_yarn/webpack-5.71.0
Bump webpack from 5.70.0 to 5.71.0
2022-04-04 19:41:09 -06:00
Tim Schaub
b0f5d04cc6 Merge pull request #13537 from openlayers/dependabot/npm_and_yarn/jsdoc-plugin-typescript-2.0.7
Bump jsdoc-plugin-typescript from 2.0.6 to 2.0.7
2022-04-04 19:37:47 -06:00
dependabot[bot]
784e5336c9 Bump webpack from 5.70.0 to 5.71.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.70.0 to 5.71.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.70.0...v5.71.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 01:37:06 +00:00
Tim Schaub
25a1be5ff0 Merge pull request #13539 from openlayers/dependabot/npm_and_yarn/puppeteer-13.5.2
Bump puppeteer from 13.5.1 to 13.5.2
2022-04-04 19:36:41 -06:00
Tim Schaub
cbce310fb5 Merge pull request #13540 from openlayers/dependabot/npm_and_yarn/clean-css-cli-5.6.0
Bump clean-css-cli from 5.5.2 to 5.6.0
2022-04-04 19:36:09 -06:00
dependabot[bot]
ffda52d64e Bump clean-css-cli from 5.5.2 to 5.6.0
Bumps [clean-css-cli](https://github.com/clean-css/clean-css-cli) from 5.5.2 to 5.6.0.
- [Release notes](https://github.com/clean-css/clean-css-cli/releases)
- [Changelog](https://github.com/clean-css/clean-css-cli/blob/master/History.md)
- [Commits](https://github.com/clean-css/clean-css-cli/compare/v5.5.2...v5.6.0)

---
updated-dependencies:
- dependency-name: clean-css-cli
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 10:01:50 +00:00
dependabot[bot]
733aaf831c Bump puppeteer from 13.5.1 to 13.5.2
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 13.5.1 to 13.5.2.
- [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/v13.5.1...v13.5.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 10:01:38 +00:00
dependabot[bot]
b4907d0ef5 Bump jsdoc-plugin-typescript from 2.0.6 to 2.0.7
Bumps [jsdoc-plugin-typescript](https://github.com/openlayers/jsdoc-plugin-typescript) from 2.0.6 to 2.0.7.
- [Release notes](https://github.com/openlayers/jsdoc-plugin-typescript/releases)
- [Commits](https://github.com/openlayers/jsdoc-plugin-typescript/commits/v2.0.7)

---
updated-dependencies:
- dependency-name: jsdoc-plugin-typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 10:01:07 +00:00
Bart van den Eijnden
bc8442e184 Merge pull request #13536 from bartvde/fix-typo-docs
Fix small typo in docs
2022-04-04 12:00:57 +02:00
Bart van den Eijnden
7fe4d04a3a Fix small typo in docs 2022-04-04 10:57:46 +02:00
Andreas Hocevar
0c22cab001 Merge pull request #13533 from ahocevar/gml-typescript
Update type annotations for GMLBase
2022-04-01 19:05:07 +02:00
Andreas Hocevar
c6a2392a2e Update type annotations for GMLBase 2022-04-01 14:59:16 +02:00
Bart van den Eijnden
c062599ac5 Merge pull request #13531 from bartvde/scaleline_maxwidth
Add optional maxWidth for ScaleLine control
2022-04-01 14:40:39 +02:00
Bart van den Eijnden
5742f0c068 Add tests 2022-04-01 14:29:01 +02:00
Bart van den Eijnden
5d5deee517 Update src/ol/control/ScaleLine.js
Co-authored-by: Andreas Hocevar <andreas.hocevar@gmail.com>
2022-04-01 13:48:55 +02:00
Bart van den Eijnden
aff459bc02 Add optional maxWidth for ScaleLine control 2022-04-01 13:26:18 +02:00
Tomas Burleigh
d524d46969 WebGLPointsLayer wrapX support - partially addressing #11131
WebGLPointsLayer renderFrame and renderHitDetection will now draw
multiple worlds if the source and projection support wrapX.

Hit detection needs additional improvement. It stops working after
more than one wrap around the world. If 0 is the middle world, then
the hit detection works for worlds -1, 0, and -1, but not for worlds
> 2 or < -2.

The example has hit detection enabled, demonstrated with a colour
change on hover for the circle styles. When moving the mouse, the hit
detection is unreliable and flickers on/off. This needs improvement.

The webgl-points renderer test has been updated.
2022-04-01 13:35:13 +13:00
Tim Schaub
10fb55b9e6 Merge pull request #13521 from mike-000/gutter
Include tile gutter in offsets for getData() methods
2022-03-30 08:29:04 -06:00
mike-000
d2da88a3fd test gutter 2022-03-30 13:02:21 +01:00
mike-000
ea30a59bfe discard tainted pixelContext 2022-03-30 13:02:20 +01:00
Andreas Hocevar
432870362b Merge pull request #13514 from openlayers/dependabot/npm_and_yarn/typescript-4.6.3
Bump typescript from 4.6.2 to 4.6.3
2022-03-29 20:02:25 +02:00
Andreas Hocevar
c60ba105ed Merge pull request #13513 from openlayers/dependabot/npm_and_yarn/babel-loader-8.2.4
Bump babel-loader from 8.2.3 to 8.2.4
2022-03-29 20:01:56 +02:00
Andreas Hocevar
afeb6fecdf Merge pull request #13515 from openlayers/dependabot/npm_and_yarn/rollup/plugin-commonjs-21.0.3
Bump @rollup/plugin-commonjs from 21.0.2 to 21.0.3
2022-03-29 20:01:22 +02:00
Andreas Hocevar
9386fbb795 Merge pull request #13512 from openlayers/dependabot/npm_and_yarn/serve-static-1.15.0
Bump serve-static from 1.14.2 to 1.15.0
2022-03-29 20:00:09 +02:00
mike-000
243ba189b7 include gutter in offsets 2022-03-29 13:22:10 +01:00
Andreas Hocevar
14651563b4 Merge pull request #13517 from openlayers/dependabot/npm_and_yarn/geotiff-2.0.5
Bump geotiff from 2.0.4 to 2.0.5
2022-03-28 12:15:26 +02:00
dependabot[bot]
fe539bc700 Bump geotiff from 2.0.4 to 2.0.5
Bumps [geotiff](https://github.com/geotiffjs/geotiff.js) from 2.0.4 to 2.0.5.
- [Release notes](https://github.com/geotiffjs/geotiff.js/releases)
- [Commits](https://github.com/geotiffjs/geotiff.js/compare/v2.0.4...v2.0.5)

---
updated-dependencies:
- dependency-name: geotiff
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 10:02:21 +00:00
dependabot[bot]
99e251f6e2 Bump @rollup/plugin-commonjs from 21.0.2 to 21.0.3
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 21.0.2 to 21.0.3.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/commonjs-v21.0.3/packages/commonjs)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 10:01:34 +00:00
dependabot[bot]
c517c83514 Bump typescript from 4.6.2 to 4.6.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.2 to 4.6.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.2...v4.6.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 10:01:22 +00:00
dependabot[bot]
47fd75c4b9 Bump babel-loader from 8.2.3 to 8.2.4
Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.2.3 to 8.2.4.
- [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.3...v8.2.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 10:01:09 +00:00
dependabot[bot]
5eb4eb394b Bump serve-static from 1.14.2 to 1.15.0
Bumps [serve-static](https://github.com/expressjs/serve-static) from 1.14.2 to 1.15.0.
- [Release notes](https://github.com/expressjs/serve-static/releases)
- [Changelog](https://github.com/expressjs/serve-static/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/serve-static/compare/v1.14.2...v1.15.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 10:00:55 +00:00
Tim Schaub
a34e72e598 Merge pull request #13511 from openlayers/release-v6.14.1
Updates for the 6.14.1 release
2022-03-26 11:53:05 -06:00
Tim Schaub
421d486687 Develop on 6.14.2-dev 2022-03-26 11:47:39 -06:00
Tim Schaub
576ada8097 Updates for the 6.14.1 release 2022-03-26 11:44:23 -06:00
Tim Schaub
cc0cc9d679 Merge pull request #13510 from openlayers/release-v6.14.0
Updates for the 6.14.0 release
2022-03-26 11:25:12 -06:00
Tim Schaub
1a5b1c6d48 Develop on 6.14.1-dev 2022-03-26 11:24:15 -06:00
Tim Schaub
a715a71671 Updates for the 6.14.0 release 2022-03-26 11:00:18 -06:00
Tim Schaub
d552b05487 Merge pull request #13509 from tschaub/multi-source-fix
Store rendered source on the layer instead of the layer state
2022-03-26 10:48:44 -06:00
Tim Schaub
b8c04ee7c5 Store rendererd source on the layer instead of the layer state 2022-03-26 10:18:49 -06:00
Tim Schaub
f7605f538a Merge pull request #13506 from mike-000/rename
Change imageSmoothing to interpolate in tests
2022-03-25 08:58:21 -06:00
mike-000
c4bf3f1e1a Change imageSmoothing to interpolate 2022-03-25 08:53:59 -06:00
Tim Schaub
26b5a76ccd Merge pull request #13505 from mike-000/float_linear-fallback
Fallback if `OES_texture_float_linear` is not supported
2022-03-25 08:52:00 -06:00
mike-000
30ec260c4a Fallback if OES_texture_float_linear not supported 2022-03-25 11:10:11 +00:00
Tim Schaub
396f8b43c2 Merge pull request #13501 from openlayers/dependabot/npm_and_yarn/minimist-1.2.6
Bump minimist from 1.2.5 to 1.2.6
2022-03-24 07:15:20 -06:00
dependabot[bot]
f5c21d2aea Bump minimist from 1.2.5 to 1.2.6
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 04:39:22 +00:00
Tim Schaub
3600931f6e Merge pull request #13498 from openlayers/dependabot/npm_and_yarn/node-forge-1.3.0
Bump node-forge from 1.2.1 to 1.3.0
2022-03-23 22:14:17 -06:00
dependabot[bot]
ca24b893e5 Bump node-forge from 1.2.1 to 1.3.0
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/digitalbazaar/forge/releases)
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-23 06:38:35 +00:00
mike-000
c926980339 Include mpu in point resolution calculations 2022-03-22 15:26:44 +00:00
Tim Schaub
7f12698a91 Merge pull request #13493 from openlayers/dependabot/npm_and_yarn/yargs-17.4.0
Bump yargs from 17.3.1 to 17.4.0
2022-03-21 09:46:49 -06:00
Tim Schaub
2c0c217186 Merge pull request #13494 from openlayers/dependabot/npm_and_yarn/babel/core-7.17.8
Bump @babel/core from 7.17.5 to 7.17.8
2022-03-21 09:46:24 -06:00
dependabot[bot]
d7d9b9195c Bump @babel/core from 7.17.5 to 7.17.8
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.17.5 to 7.17.8.
- [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.17.8/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 10:01:31 +00:00
dependabot[bot]
5da681f019 Bump yargs from 17.3.1 to 17.4.0
Bumps [yargs](https://github.com/yargs/yargs) from 17.3.1 to 17.4.0.
- [Release notes](https://github.com/yargs/yargs/releases)
- [Changelog](https://github.com/yargs/yargs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs/compare/v17.3.1...v17.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 10:01:08 +00:00
Tim Schaub
2a6bbdb1ad Merge pull request #13492 from tschaub/bad-metal
Workaround for Safari WebGL issue
2022-03-20 15:48:20 -06:00
Tim Schaub
d7cb12a016 Workaround for https://bugs.webkit.org/show_bug.cgi?id=237906 2022-03-20 10:53:10 -06:00
Andreas Hocevar
e10b7470a6 Merge pull request #13490 from ahocevar/separate-geometry-and-extent
Separate geometry and extent parsing
2022-03-19 16:40:17 +01:00
Andreas Hocevar
c21f441fb3 Merge pull request #13491 from ahocevar/map-loadstart-loadend
Add loadstart and loadend map events
2022-03-19 16:39:32 +01:00
Andreas Hocevar
1de3ce7e19 Simplify tile and image load events examples 2022-03-19 10:50:04 +01:00
Andreas Hocevar
26e6bf505c Add loading spinner example 2022-03-19 10:50:04 +01:00
Andreas Hocevar
bf9472ac57 Add loadstart and loadend map events 2022-03-19 10:32:22 +01:00
Andreas Hocevar
e0b62016d2 Separate geometry and extent parsing 2022-03-18 19:37:01 +01:00
Andreas Hocevar
0ee9c8f4ab Merge pull request #13482 from ahocevar/webgl-compose-events
Add documentation for precompose and postcopose to ol/layer/WebGLTile
2022-03-18 08:53:41 +01:00
Andreas Hocevar
d815c93bcf Add documentation for precompose and postcopose to ol/layer/WebGLTile 2022-03-14 22:10:13 +01:00
Andreas Hocevar
2f21352f88 Merge pull request #13472 from openlayers/dependabot/npm_and_yarn/puppeteer-13.5.1
Bump puppeteer from 13.4.1 to 13.5.1
2022-03-14 12:21:17 +01:00
Andreas Hocevar
f20edf3b62 Merge pull request #13474 from openlayers/dependabot/npm_and_yarn/karma-chrome-launcher-3.1.1
Bump karma-chrome-launcher from 3.1.0 to 3.1.1
2022-03-14 12:20:53 +01:00
Andreas Hocevar
20875b9964 Merge pull request #13475 from openlayers/dependabot/npm_and_yarn/mocha-9.2.2
Bump mocha from 9.2.1 to 9.2.2
2022-03-14 12:18:32 +01:00
Andreas Hocevar
4f390f232c Merge pull request #13476 from openlayers/dependabot/npm_and_yarn/proj4-2.8.0
Bump proj4 from 2.7.5 to 2.8.0
2022-03-14 12:17:58 +01:00
Andreas Hocevar
e157d43921 Merge pull request #13477 from openlayers/dependabot/npm_and_yarn/rollup-2.70.1
Bump rollup from 2.70.0 to 2.70.1
2022-03-14 12:17:24 +01:00
Andreas Hocevar
610858df83 Merge pull request #13473 from openlayers/dependabot/npm_and_yarn/ol-mapbox-style-7.1.0
Bump ol-mapbox-style from 7.0.0 to 7.1.0
2022-03-14 12:08:35 +01:00
dependabot[bot]
39d167b0cf Bump ol-mapbox-style from 7.0.0 to 7.1.1
Bumps [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) from 7.0.0 to 7.1.0.
- [Release notes](https://github.com/openlayers/ol-mapbox-style/releases)
- [Changelog](https://github.com/openlayers/ol-mapbox-style/blob/main/CHANGELOG.md)
- [Commits](https://github.com/openlayers/ol-mapbox-style/compare/v7.0.0...v7.1.0)

---
updated-dependencies:
- dependency-name: ol-mapbox-style
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 12:03:39 +01:00
dependabot[bot]
7d9cf524f8 Bump rollup from 2.70.0 to 2.70.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.70.0 to 2.70.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.70.0...v2.70.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 10:02:12 +00:00
dependabot[bot]
9da16a2814 Bump proj4 from 2.7.5 to 2.8.0
Bumps [proj4](https://github.com/proj4js/proj4js) from 2.7.5 to 2.8.0.
- [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.7.5...2.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 10:01:47 +00:00
dependabot[bot]
a55492404e Bump mocha from 9.2.1 to 9.2.2
Bumps [mocha](https://github.com/mochajs/mocha) from 9.2.1 to 9.2.2.
- [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/v9.2.1...v9.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 10:01:34 +00:00
dependabot[bot]
3398ce194d Bump karma-chrome-launcher from 3.1.0 to 3.1.1
Bumps [karma-chrome-launcher](https://github.com/karma-runner/karma-chrome-launcher) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/karma-runner/karma-chrome-launcher/releases)
- [Changelog](https://github.com/karma-runner/karma-chrome-launcher/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma-chrome-launcher/compare/v3.1.0...v3.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 10:01:21 +00:00
dependabot[bot]
70733805a1 Bump puppeteer from 13.4.1 to 13.5.1
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 13.4.1 to 13.5.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/v13.4.1...v13.5.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 10:00:57 +00:00
Edward Nash
7b1c01c502 Add tests parsing multiple complex GML properties 2021-10-29 16:36:17 +02:00
Edward Nash
e1b4634fa4 Correct parsing multi-properties with attributes
When parsing GML then conversion of properties containing XML attributes
to objects with a _content_ property must occur before the handling of
multiple attributes (conversion/adding to an array), as otherwise the
_content_ property and attributes are set on the array and not on the
array element.

Prior to this change, only multiple properties without attributes could
be correctly parsed.

Example problemeatic GML section:
<Link xlink:href="http://example.com/a"/>
<Link xlink:href="http://example.com/b"/>

Resulting property as JSON extract after this change:
{
  "Link": [
    {
      "_content_": undefined,
      "xlink:href": "http://example.com/a",
    },
    {
      "_content_": undefined,
      "xlink:href": "http://example.com/b"
    }
  ]
}

Prior to this change, the _content_ property and the properties for the
XML attributes would be set on the resulting JS Array object, with
previous entries being represented as nested arrays.
2021-10-29 16:35:05 +02:00
663 changed files with 26686 additions and 16083 deletions

View File

@@ -6,3 +6,7 @@ updates:
interval: weekly interval: weekly
open-pull-requests-limit: 10 open-pull-requests-limit: 10
versioning-strategy: increase-if-necessary versioning-strategy: increase-if-necessary
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly

View File

@@ -5,17 +5,20 @@ on:
branches: branches:
- main - main
permissions:
contents: read
jobs: jobs:
build-preview: build-preview:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: '16' node-version: '16'
- run: npm ci - run: npm ci
- run: npm run build-site - run: ./tasks/build-website.sh -v dev -l dev
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: site name: site
path: build/site path: build/site
@@ -23,7 +26,7 @@ jobs:
run: | run: |
mkdir -p build/pr mkdir -p build/pr
echo ${{github.event.number}} > build/pr/number echo ${{github.event.number}} > build/pr/number
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: pr name: pr
path: build/pr path: build/pr

View File

@@ -1,4 +1,4 @@
name: Deploy Preview name: Deploy Website (Preview)
on: on:
workflow_run: workflow_run:
@@ -11,14 +11,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'}} if: ${{github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'}}
steps: steps:
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: '16' node-version: '16'
- run: npm install --global netlify-cli@6 - run: npm install --global netlify-cli@6
- run: npm install unzipper@0.10 - run: npm install unzipper@0.10
- name: Get pull request number - name: Get pull request number
uses: actions/github-script@v5 uses: actions/github-script@v6
id: pull-request-number id: pull-request-number
with: with:
result-encoding: string result-encoding: string
@@ -66,7 +66,7 @@ jobs:
run: netlify deploy --dir=build/site --alias=deploy-preview-${{steps.pull-request-number.outputs.result}} run: netlify deploy --dir=build/site --alias=deploy-preview-${{steps.pull-request-number.outputs.result}}
- name: Add comment to pull request - name: Add comment to pull request
uses: actions/github-script@v5 uses: actions/github-script@v6
with: with:
script: | script: |
const pullRequestNumber = parseInt(${{steps.pull-request-number.outputs.result}}, 10); const pullRequestNumber = parseInt(${{steps.pull-request-number.outputs.result}}, 10);
@@ -85,17 +85,11 @@ jobs:
); );
if (!commentExists) { if (!commentExists) {
const body = [
`${start} Preview the [examples](https://deploy-preview-${pullRequestNumber}--ol-site.netlify.app/examples/) and`,
`[docs](https://deploy-preview-${pullRequestNumber}--ol-site.netlify.app/apidoc/) from this branch`,
`here: https://deploy-preview-${pullRequestNumber}--ol-site.netlify.app/.`
].join(' ');
await github.rest.issues.createComment({ await github.rest.issues.createComment({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
issue_number: pullRequestNumber, issue_number: pullRequestNumber,
body: body body: `${start} Preview the website for this branch here: https://deploy-preview-${pullRequestNumber}--ol-site.netlify.app/.`
}); });
} else { } else {
console.log(`Preview URL comment already added to PR #${pullRequestNumber}`); console.log(`Preview URL comment already added to PR #${pullRequestNumber}`);

71
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
name: Deploy Website
on:
push:
branches:
- main
tags:
- 'v*.*.*'
concurrency:
group: "deploy"
jobs:
deploy-branch:
if: startsWith(github.ref, 'refs/heads/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Build Website
run: ./tasks/build-website.sh -l $(node tasks/get-latest-release.js)
- name: Check out openlayers.github.io
uses: actions/checkout@v3
with:
repository: openlayers/openlayers.github.io
ssh-key: ${{ secrets.OPENLAYERS_GITHUB_IO_KEY }}
path: openlayers.github.io
- run: |
cp -r build/site/* openlayers.github.io/dist/
cd openlayers.github.io
if [ -n "$(git status --porcelain)" ]; then
git config user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
git add .
git commit -m "Website updates"
git push origin main
fi
deploy-tag:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Assert Latest Release
run: node tasks/newest-tag.js --tag ${GITHUB_REF_NAME}
- name: Build Website
run: ./tasks/build-website.sh -l ${GITHUB_REF_NAME} -v ${GITHUB_REF_NAME}
- name: Check out openlayers.github.io
uses: actions/checkout@v3
with:
repository: openlayers/openlayers.github.io
ssh-key: ${{ secrets.OPENLAYERS_GITHUB_IO_KEY }}
path: openlayers.github.io
- run: |
cp -r build/site/* openlayers.github.io/dist/
cd openlayers.github.io
if [ -n "$(git status --porcelain)" ]; then
git config user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
git add .
git commit -m "Website updates"
git push origin main
fi

View File

@@ -1,18 +1,24 @@
name: Publish name: Publish Package
on: on:
push: push:
branches: branches:
- main - main
tags:
- 'v*.*.*'
permissions:
contents: read
jobs: jobs:
publish-npm: publish-branch:
if: startsWith(github.ref, 'refs/heads/')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: '16' node-version: '18'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@@ -25,3 +31,23 @@ jobs:
npm publish --tag dev npm publish --tag dev
env: env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
publish-tag:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Assert Latest Release
run: node tasks/newest-tag.js --tag ${GITHUB_REF_NAME}
- name: Publish
run: |
npm run build-package
cd build/ol
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

21
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: Create Release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Build Release Assets
run: ./tasks/build-website.sh -l ${GITHUB_REF_NAME} -v ${GITHUB_REF_NAME}
- name: Create Release
run: node tasks/create-release.js --token ${{secrets.GITHUB_TOKEN}} --tag ${GITHUB_REF_NAME} --legacy build/${GITHUB_REF_NAME}-legacy.zip --site build/${GITHUB_REF_NAME}-site.zip

View File

@@ -10,18 +10,25 @@ on:
schedule: schedule:
- cron: '0 0 * * 0' # At 00:00 on Sunday - cron: '0 0 * * 0' # At 00:00 on Sunday
permissions:
contents: read
jobs: jobs:
codeql: codeql:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/analyze to upload SARIF results
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v2
with: with:
languages: javascript languages: javascript
source-root: src source-root: src
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v2

View File

@@ -11,6 +11,9 @@ on:
env: env:
CI: true CI: true
permissions:
contents: read
jobs: jobs:
pretest: pretest:
name: Pre-Test name: Pre-Test
@@ -21,10 +24,10 @@ jobs:
steps: steps:
- name: Clone Repository - name: Clone Repository
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set Node.js Version - name: Set Node.js Version
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: '16' node-version: '16'
@@ -43,10 +46,10 @@ jobs:
steps: steps:
- name: Clone Repository - name: Clone Repository
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set Node.js Version - name: Set Node.js Version
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: '16' node-version: '16'
@@ -65,10 +68,10 @@ jobs:
steps: steps:
- name: Clone Repository - name: Clone Repository
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set Node.js Version - name: Set Node.js Version
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: '16' node-version: '16'
@@ -87,10 +90,10 @@ jobs:
steps: steps:
- name: Clone Repository - name: Clone Repository
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set Node.js Version - name: Set Node.js Version
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: '16' node-version: '16'
@@ -100,8 +103,8 @@ jobs:
- name: Build the Package - name: Build the Package
run: npm run build-package run: npm run build-package
- name: Generate the Legacy Build - name: Generate the Full Build
run: "npm run build-legacy && npx eslint --rule 'import/no-duplicates: off' --fix build/index.js" run: "npm run build-full"
rendering: rendering:
name: Rendering name: Rendering
@@ -112,10 +115,10 @@ jobs:
steps: steps:
- name: Clone Repository - name: Clone Repository
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set Node.js Version - name: Set Node.js Version
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: '16' node-version: '16'
@@ -127,7 +130,7 @@ jobs:
- name: Store Rendering Test Artifacts - name: Store Rendering Test Artifacts
if: ${{ always() }} if: ${{ always() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: rendering-tests name: rendering-tests
path: test/rendering/cases/**/actual.png path: test/rendering/cases/**/actual.png

View File

@@ -23,7 +23,7 @@ new Map({
layers: [ layers: [
new TileLayer({ new TileLayer({
source: new XYZ({ source: new XYZ({
url: 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png' url: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png'
}) })
}) })
], ],
@@ -41,6 +41,8 @@ See the following examples for more detail on bundling OpenLayers with your appl
* Using [webpack](https://github.com/openlayers/ol-webpack) * Using [webpack](https://github.com/openlayers/ol-webpack)
* Using [Parcel](https://github.com/openlayers/ol-parcel) * Using [Parcel](https://github.com/openlayers/ol-parcel)
For more detail on quick prototyping without the use of a Node.js based setup, see the [Skypack](https://github.com/openlayers/ol-skypack) example.
## Sponsors ## Sponsors
OpenLayers appreciates contributions of all kinds. We especially want to thank our fiscal sponsors who contribute to ongoing project maintenance. OpenLayers appreciates contributions of all kinds. We especially want to thank our fiscal sponsors who contribute to ongoing project maintenance.
@@ -80,30 +82,13 @@ OpenLayers appreciates contributions of all kinds. We especially want to thank
See our [GitHub sponsors page](https://github.com/sponsors/openlayers) or [Open Collective](https://opencollective.com/openlayers/contribute/sponsors-214/checkout) if you too are interested in becoming a regular sponsor. See our [GitHub sponsors page](https://github.com/sponsors/openlayers) or [Open Collective](https://opencollective.com/openlayers/contribute/sponsors-214/checkout) if you too are interested in becoming a regular sponsor.
## ES Modules
The `ol` package contains a `src/` folder with the sources, authored as [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules). To use these untranspiled sources, either import modules from `ol/src` instead of `ol`, or configure your bundler with an alias pointing to `ol/src` for the `ol` package.
## TypeScript support ## TypeScript support
The [ol package](https://npmjs.com/package/ol) includes auto-generated TypeScript declarations as `*.d.ts` files. The [ol package](https://npmjs.com/package/ol) includes auto-generated TypeScript declarations as `*.d.ts` files.
## Supported Browsers ## Supported Browsers
OpenLayers runs on all modern browsers that support [HTML5](https://html.spec.whatwg.org/multipage/) and [ECMAScript 5](https://262.ecma-international.org/5.1/). This includes Chrome, Firefox, Safari and Edge. OpenLayers runs on all modern browsers (with greater than 1% global usage). This includes Chrome, Firefox, Safari and Edge. For older browsers, [polyfills](https://polyfill.io/) will likely need to be added.
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/fetch): Available from [polyfill.io](https://polyfill.io/).
* [`requestAnimationFrame`](https://caniuse.com/requestanimationframe): Available from [polyfill.io](https://polyfill.io/).
* [`element.prototype.classList` (`add`/`remove`)](https://caniuse.com/classlist): Available from [polyfill.io](https://polyfill.io/).
* [`URL` API](https://caniuse.com/url): Available from [polyfill.io](https://polyfill.io/) or [core-js](https://cdnjs.com/libraries/core-js/).
* [`TextDecoder`](https://caniuse.com/textencoder): Available from [polyfill.io](https://polyfill.io/).
* [`Number.isInteger`](https://caniuse.com/isInteger): Available from [polyfill.io](https://polyfill.io/) or [core-js](https://cdnjs.com/libraries/core-js/).
* [`Reflect`](https://caniuse.com/mdn-javascript_builtins_reflect): Available from [core-js](https://cdnjs.com/libraries/core-js/).
* [Pointer events](https://caniuse.com/pointer): Use [elm-pep](https://npmjs.com/package/elm-pep) (lightweight) or [pepjs](https://npmjs.com/package/pepjs) (for really, really old browsers).
[`ol/source/GeoTIFF`](https://openlayers.org/en/latest/apidoc/module-ol_source_GeoTIFF-GeoTIFFSource.html) requires a browser that supports [ECMAScript 6](https://262.ecma-international.org/6.0/). Additionally a polyfill for [`Promise.allSettled`](https://caniuse.com/mdn-javascript_builtins_promise_allsettled) may be needed.
## Documentation ## Documentation

View File

@@ -1,6 +1,109 @@
## Upgrade notes ## Upgrade notes
### Next ### Next version
#### Notice to full build users
If you have been using the full (or legacy) build of the library, note that the location of these scripts is changing for this and future releases. The previous locations were not stable, and although we do not recommend linking to the full build for production applications, there are many instances of this that were breaking due to changing URLs. See the [download page](https://openlayers.org/download/) for details on the new versioned URLs for the full build.
#### Deprecation of `ol/AssertionError` and error codes
Future versions will no longer throw `ol/AssertionError` with an error `code`. Instead, they will throw `Error` with just the error message.
#### Updating parameters in `ol/source/ImageWMS` and `ol/source/TileWMS`
The `updateParams()` method will be the only way to update parameters. Changes made directly to the `params` object passed as a constructor option will have no effect.
### 7.0.0
#### Removal of deprecated properties and methods
* The `tilePixelRatio` has been removed from the `DataTile` source.
* The `imageSmoothing` option has been removed from sources.
* The `undefinedHTML` option has been removed from the `MousePosition` control.
* The `forEachLayerAtPixel` method has been removed from the `Map` class.
* Deprecated options have been removed from the `Overlay` component.
* The `labelCache` has been removed from the `ol/render/canvas.js` module.
#### Internet Explorer is no longer supported
Please see https://docs.microsoft.com/en-us/lifecycle/announcements/internet-explorer-11-end-of-support.
#### ol/coordinate.js
The `toStringHDMS` function from the `ol/coordinate.js` module now formats longitude, latitude pairs so that the minutes and seconds are omitted if they are zero. This changes the values displayed on graticules.
#### ol/layer/Graticule
The default `intervals` now align with integer minutes and seconds better suited to the default label formatter. If formatting in decimal degrees you may wish to specify custom `intervals` suited to that format.
#### ol/Collection
Inserting with `setAt` or `insertAt` beyond the current length used to create a sparse Collection with `undefined` inserted for any missing indexes. This will now throw an error instead.
#### ol/control/MousePosition
The control will now by default keep displaying the last mouse position when the mouse leaves the viewport. With `placeholder: '&#160;'` you can keep the old behaviour. The `placeholder` option no longer accepts `false` as a valid value, instead simply omit the option. The `undefinedHTML` option has been removed. You should use `placeholder` instead.
#### ol/PluggableMap
The `PluggableMap` class has been removed. If you want to create a custom map class, extend the `Map` class instead.
#### ol/style/Icon and ol/style/RegularShape
`ol/style/Image` and subclasses `displacement` is no longer scaled with the image. If you previously expected this unintended behavior you should now increase the displacement when setting the scale.
### 6.15.0
#### Deprecated `tilePixelRatio` option for data tile sources.
If you were previously trying to scale data tiles using the `tilePixelRatio` property for data tile sources (this is rare), you should now use the explicit `tileSize` and `tileGrid` properties. The source's `tileSize` represents the source tile dimensions and the tile grid's `tileSize` represents the desired rendered dimensions.
```js
const source = new DataTileSource({
tileSize: [512, 512], // source tile size
tileGrid: createXYZ({tileSize: [256, 256]}), // rendered tile size
});
```
#### Fixed coordinate dimension handling in `ol/proj`'s `addCoordinateTransforms`
The `forward` and `inverse` functions passed to `addCooordinateTransforms` now receive a coordinate with all dimensions of the original coordinate, not just two. If you previosly had coordinates with more than two dimensions and added a transform like
```js
addCoordinateTransforms(
'EPSG:4326',
new Projection({code: 'latlong', units: 'degrees'}),
function(coordinate) { return coordinate.reverse(); },
function(coordinate) { return coordinate.reverse(); }
);
```
you have to change that to
```js
addCoordinateTransforms(
'EPSG:4326',
new Projection({code: 'latlong', units: 'degrees'}),
function(coordinate) { return coordinate.slice(0, 2).reverse() },
function(coordinate) { return coordinate.slice(0, 2).reverse() }
);
```
#### Replacement of string enums with union types
This change only affects users that were using the non-API string enums
* ol/OverlayPositioning
* ol/extent/Corner
* ol/format/FormatType
* ol/geom/GeometryType
* ol/source/State
* ol/source/WMSServerType
* ol/source/WMTSRequestEncoding
Instead of these, use the respective `string`s, which are now typesafe by means of union types.
### v6.14.0
No special changes are required when upgrading to the 6.14.0 release.
### v6.13.0 ### v6.13.0

55
changelog/v6.14.0.md Normal file
View File

@@ -0,0 +1,55 @@
# 6.14.0
The 6.14 release includes a few new features and fixes. The new `loadstart` and `loadend` events make it easy to add loading indicators to your maps. Enhancements to the snap interaction add support for snapping to points coincident with lines and improve performance. A change to WebGL rendering works around [an issue](https://bugs.webkit.org/show_bug.cgi?id=238196) in Safari 15.4. Find detail on these improvements and more in the full list of changes below.
#### List of all changes
See below for a complete list of features and fixes.
* Store rendered source on the layer instead of the layer state (by @tschaub in https://github.com/openlayers/openlayers/pull/13509)
* Change imageSmoothing to interpolate in tests (by @mike-000 in https://github.com/openlayers/openlayers/pull/13506)
* Fallback if `OES_texture_float_linear` is not supported (by @mike-000 in https://github.com/openlayers/openlayers/pull/13505)
* Workaround for Safari WebGL issue (by @tschaub in https://github.com/openlayers/openlayers/pull/13492)
* Separate geometry and extent parsing (by @ahocevar in https://github.com/openlayers/openlayers/pull/13490)
* Add loadstart and loadend map events (by @ahocevar in https://github.com/openlayers/openlayers/pull/13491)
* Add documentation for precompose and postcopose to ol/layer/WebGLTile (by @ahocevar in https://github.com/openlayers/openlayers/pull/13482)
* Fix legacy build (by @ahocevar in https://github.com/openlayers/openlayers/pull/13469)
* Fix Text#setText jsDoc (by @rycgar in https://github.com/openlayers/openlayers/pull/13466)
* Do not warn about coordinates when view projection is configured (by @ahocevar in https://github.com/openlayers/openlayers/pull/13464)
* Reset image when empty (by @ahocevar in https://github.com/openlayers/openlayers/pull/13463)
* Revert image transition regression (by @ahocevar in https://github.com/openlayers/openlayers/pull/13460)
* Improve Snap interaction performance (by @MoonE in https://github.com/openlayers/openlayers/pull/13455)
* Snap Interaction can snap to Point on line segment (by @T-MAPY in https://github.com/openlayers/openlayers/pull/13446)
* Initialize variable before use in FullScreen control (by @MoonE in https://github.com/openlayers/openlayers/pull/13447)
* Ensure FullScreen button has classname set on render. (by @themoffster in https://github.com/openlayers/openlayers/pull/13444)
* Guard PluggableMap against null renderer (by @EvertEt in https://github.com/openlayers/openlayers/pull/13437)
* Fix rendercomplete with invisible WebGLPoints layer (by @M393 in https://github.com/openlayers/openlayers/pull/13434)
* Handle layers without renderer properly (by @ahocevar in https://github.com/openlayers/openlayers/pull/13424)
<details>
<summary>Dependency Updates</summary>
* Bump minimist from 1.2.5 to 1.2.6 (by @openlayers in https://github.com/openlayers/openlayers/pull/13501)
* Bump node-forge from 1.2.1 to 1.3.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13498)
* Bump yargs from 17.3.1 to 17.4.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13493)
* Bump @babel/core from 7.17.5 to 7.17.8 (by @openlayers in https://github.com/openlayers/openlayers/pull/13494)
* Bump puppeteer from 13.4.1 to 13.5.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13472)
* Bump karma-chrome-launcher from 3.1.0 to 3.1.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13474)
* Bump mocha from 9.2.1 to 9.2.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13475)
* Bump proj4 from 2.7.5 to 2.8.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13476)
* Bump rollup from 2.70.0 to 2.70.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13477)
* Bump ol-mapbox-style from 7.0.0 to 7.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13473)
* Bump rollup from 2.69.0 to 2.70.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13449)
* Bump webpack from 5.69.1 to 5.70.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13450)
* Bump puppeteer from 13.4.0 to 13.4.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13451)
* Bump karma from 6.3.16 to 6.3.17 (by @openlayers in https://github.com/openlayers/openlayers/pull/13452)
* Bump typescript from 4.6.0-beta to 4.6.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13453)
* Bump puppeteer from 13.3.2 to 13.4.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13427)
* Bump fs-extra from 10.0.0 to 10.0.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13429)
* Bump @rollup/plugin-commonjs from 21.0.1 to 21.0.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13430)
* Bump rollup from 2.67.3 to 2.69.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13442)
* Bump @rollup/plugin-babel from 5.3.0 to 5.3.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13426)
</details>

4
changelog/v6.14.1.md Normal file
View File

@@ -0,0 +1,4 @@
# 6.14.1
The 6.14.1 release is a patch to correct a version discrepancy in the `package-lock.json` file. See the [changelog for 6.14.0](https://github.com/openlayers/openlayers/releases/tag/v6.14.0) for new features and fixes since 6.13.

241
changelog/v6.15.0.md Normal file
View File

@@ -0,0 +1,241 @@
# 6.15.0
## Overview
The 6.15 release brings several fixes and improvements:
* Faster vector tile rendering for soures with non-standard tile grids
* Reduced canvas memory footprint for increased stability on iOS devices and better rendering performance
* Fixed a bug that prevented tiles from expiring from the tile cache in the correct order
* Better type safety with an increasing number of `null` checks and union types
* New `setFill` and `setStroke` methods for `RegularShape` symbols
* Vector symbol and text decluttering on the style level
* Fixed pointer event handling on touch devices when layer visibility changes
* New `justify` option for text styles
* New `Link` interation for adding center, zoom, rotation and active layers to the URL
* Easier css styling of the scale bar, and in addition to `minWidth`, the scale line can now also be configured with a `maxWidth`
## Details
### Deprecated `tilePixelRatio` option for data tile sources.
If you were previously trying to scale data tiles using the `tilePixelRatio` property for data tile sources (this is rare), you should now use the explicit `tileSize` and `tileGrid` properties. The source's `tileSize` represents the source tile dimensions and the tile grid's `tileSize` represents the desired rendered dimensions.
```js
const source = new DataTileSource({
tileSize: [512, 512], // source tile size
tileGrid: createXYZ({tileSize: [256, 256]}), // rendered tile size
});
```
### Fixed coordinate dimension handling in `ol/proj`'s `addCoordinateTransforms`
The `forward` and `inverse` functions passed to `addCooordinateTransforms` now receive a coordinate with all dimensions of the original coordinate, not just two. If you previosly had coordinates with more than two dimensions and added a transform like
```js
addCoordinateTransforms(
'EPSG:4326',
new Projection({code: 'latlong', units: 'degrees'}),
function(coordinate) { return coordinate.reverse(); },
function(coordinate) { return coordinate.reverse(); }
);
```
you have to change that to
```js
addCoordinateTransforms(
'EPSG:4326',
new Projection({code: 'latlong', units: 'degrees'}),
function(coordinate) { return coordinate.slice(0, 2).reverse() },
function(coordinate) { return coordinate.slice(0, 2).reverse() }
);
```
### Replacement of string enums with union types
This change only affects users that were using the non-API string enums
* ol/OverlayPositioning
* ol/extent/Corner
* ol/format/FormatType
* ol/geom/GeometryType
* ol/source/State
* ol/source/WMSServerType
* ol/source/WMTSRequestEncoding
Instead of these, use the respective `string`s, which are now typesafe by means of union types.
## List of all changes
See below for a complete list of features and fixes.
* Base vector tile render tile grid on the source grid (by @mike-000 in https://github.com/openlayers/openlayers/pull/13832)
* ability to change the color of the scalebar (by @jipexu in https://github.com/openlayers/openlayers/pull/13834)
* Reduce canvas memory footprint for better iOS stability (by @ahocevar in https://github.com/openlayers/openlayers/pull/13823)
* Use union types instead of enums (by @ahocevar in https://github.com/openlayers/openlayers/pull/12696)
* remove XYZ-ESRI -4326-512 example (by @jipexu in https://github.com/openlayers/openlayers/pull/13817)
* Remove HERE Maps example (by @mike-000 in https://github.com/openlayers/openlayers/pull/13819)
* Checkcontenteditable (by @jipexu in https://github.com/openlayers/openlayers/pull/13787)
* Add null return type for TileGrid functions (by @EvertEt in https://github.com/openlayers/openlayers/pull/13674)
* Add setFill and setStroke to Shapes (by @theduckylittle in https://github.com/openlayers/openlayers/pull/13747)
* Include displacement and declutterMode in Icon style clone (by @mike-000 in https://github.com/openlayers/openlayers/pull/13803)
* Do not refresh use time for tiles when collecting used source tiles (by @M393 in https://github.com/openlayers/openlayers/pull/13799)
* Change WKB readFeature(s) return type to Feature (by @mike-000 in https://github.com/openlayers/openlayers/pull/13800)
* d3 version update (by @jipexu in https://github.com/openlayers/openlayers/pull/13784)
* Better fix for changing pointer ids on event target change (by @ahocevar in https://github.com/openlayers/openlayers/pull/13771)
* Fix source band calculation when configured with multiple sources (by @ahocevar in https://github.com/openlayers/openlayers/pull/13762)
* Clean up tracked pointers when the event target has changed (by @ahocevar in https://github.com/openlayers/openlayers/pull/13770)
* Fix modifying polygons with overlapping vertices (by @hargasinski in https://github.com/openlayers/openlayers/pull/13745)
* Support GML polygons with ring curves instead of linear rings (by @ahocevar in https://github.com/openlayers/openlayers/pull/13749)
* Fix typo in method names (by @MoonE in https://github.com/openlayers/openlayers/pull/13750)
* Load GeoTiff from Blob #13189 #13703 (by @m-mohr in https://github.com/openlayers/openlayers/pull/13724)
* improve text width calculation (by @IQGeo in https://github.com/openlayers/openlayers/pull/12106)
* Fix tile pyramid getData() (by @mike-000 in https://github.com/openlayers/openlayers/pull/13712)
* Improve icon-sprite-webgl example (by @MoonE in https://github.com/openlayers/openlayers/pull/13709)
* Fix hitdetection for icon with offset and pixelratio != 1 (by @MoonE in https://github.com/openlayers/openlayers/pull/13627)
* Wait for icons to be loaded before firing rendercomplete event (by @MoonE in https://github.com/openlayers/openlayers/pull/13626)
* Change typedef to boolean (by @mike-000 in https://github.com/openlayers/openlayers/pull/13702)
* #13690 VectorSource#getFeaturesInExtent add projection parameter (by @burleight in https://github.com/openlayers/openlayers/pull/13691)
* Update ESLint config and plugins (by @tschaub in https://github.com/openlayers/openlayers/pull/13701)
* Flip extent coordinates for projections with ne* axis order (by @ahocevar in https://github.com/openlayers/openlayers/pull/13688)
* Link interaction (by @tschaub in https://github.com/openlayers/openlayers/pull/13689)
* Test improvements (by @MoonE in https://github.com/openlayers/openlayers/pull/13676)
* Add null return type (by @ahocevar in https://github.com/openlayers/openlayers/pull/13673)
* fix currentClip == null (by @CNS-Solutions in https://github.com/openlayers/openlayers/pull/13672)
* Handle NaN nodata (by @tschaub in https://github.com/openlayers/openlayers/pull/13669)
* Fix for parcel error while building examples (by @arekgotfryd in https://github.com/openlayers/openlayers/pull/13656)
* Explicit data tile size (by @tschaub in https://github.com/openlayers/openlayers/pull/13648)
* Decluttering mode by style (by @CNS-Solutions in https://github.com/openlayers/openlayers/pull/13566)
* Output GeoTIFF tile load errors to console (by @mike-000 in https://github.com/openlayers/openlayers/pull/13645)
* Fix typos in upgrade notes (by @openlayers in https://github.com/openlayers/openlayers/pull/13641)
* Let transform function transform all dimensions it is capable of (by @ahocevar in https://github.com/openlayers/openlayers/pull/13637)
* Fix dependabot config (by @tschaub in https://github.com/openlayers/openlayers/pull/13614)
* Include GitHub actions in the dependabot config (by @turrisxyz in https://github.com/openlayers/openlayers/pull/13611)
* Do not reload data tiles if already loaded or loading (by @mike-000 in https://github.com/openlayers/openlayers/pull/13594)
* Limit permissions for GitHub actions (by @turrisxyz in https://github.com/openlayers/openlayers/pull/13607)
* Handle rotation with non-square tiles (by @tschaub in https://github.com/openlayers/openlayers/pull/13603)
* Properly document loadstart and loadend events (by @ahocevar in https://github.com/openlayers/openlayers/pull/13595)
* Update OSM Vector Tiles attribution (by @mike-000 in https://github.com/openlayers/openlayers/pull/13568)
* WebGLPointsLayer wrapX support - partially addressing #11131 (by @burleight in https://github.com/openlayers/openlayers/pull/13528)
* Add `justify` option for text style (by @rycgar in https://github.com/openlayers/openlayers/pull/13571)
* Do not assert null projection (by @mike-000 in https://github.com/openlayers/openlayers/pull/13565)
* Improve Projection and Scale example calculations (by @mike-000 in https://github.com/openlayers/openlayers/pull/13496)
* Add geometryLayout property to Draw interaction (by @drnextgis in https://github.com/openlayers/openlayers/pull/13546)
* Updates for ol-mapbox-style v8 (by @ahocevar in https://github.com/openlayers/openlayers/pull/13552)
* NM symbol unit (by @jipexu in https://github.com/openlayers/openlayers/pull/13554)
* Update backgrounds when function returns a different color (by @ahocevar in https://github.com/openlayers/openlayers/pull/13550)
* Handle gutter in WebGL tile renderer (by @mike-000 in https://github.com/openlayers/openlayers/pull/13547)
* Do not add second interaction in Pinch Zoom example (by @mike-000 in https://github.com/openlayers/openlayers/pull/13551)
* Bugfix for GML parsing with multiple property elements with XML attributes (by @ejn in https://github.com/openlayers/openlayers/pull/12936)
* Fix small typo in docs (by @bartvde in https://github.com/openlayers/openlayers/pull/13536)
* Update type annotations for GMLBase (by @ahocevar in https://github.com/openlayers/openlayers/pull/13533)
* Add optional maxWidth for ScaleLine control (by @bartvde in https://github.com/openlayers/openlayers/pull/13531)
* Include tile gutter in offsets for getData() methods (by @mike-000 in https://github.com/openlayers/openlayers/pull/13521)
* Updates for the 6.14.1 release (by @openlayers in https://github.com/openlayers/openlayers/pull/13511)
<details>
<summary>Dependency Updates</summary>
* Bump rollup from 2.76.0 to 2.77.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13841)
* Bump @types/geojson from 7946.0.8 to 7946.0.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13842)
* Bump @babel/preset-env from 7.18.6 to 7.18.9 (by @openlayers in https://github.com/openlayers/openlayers/pull/13843)
* Bump clean-css-cli from 5.6.0 to 5.6.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13844)
* Bump marked from 4.0.17 to 4.0.18 (by @openlayers in https://github.com/openlayers/openlayers/pull/13845)
* Bump @babel/core from 7.18.6 to 7.18.9 (by @openlayers in https://github.com/openlayers/openlayers/pull/13846)
* Bump puppeteer from 15.3.2 to 15.4.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13847)
* Bump eslint from 8.19.0 to 8.20.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13848)
* Bump puppeteer from 15.3.0 to 15.3.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13824)
* Bump rollup from 2.75.7 to 2.76.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13825)
* Bump @babel/core from 7.18.5 to 7.18.6 (by @openlayers in https://github.com/openlayers/openlayers/pull/13806)
* Bump webpack-dev-server from 4.9.2 to 4.9.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13810)
* Bump @babel/preset-env from 7.18.2 to 7.18.6 (by @openlayers in https://github.com/openlayers/openlayers/pull/13808)
* Bump puppeteer from 15.1.1 to 15.3.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13807)
* Bump es-main from 1.0.2 to 1.2.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13809)
* Bump eslint from 8.18.0 to 8.19.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13811)
* Bump @rollup/plugin-commonjs from 22.0.0 to 22.0.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13793)
* Bump puppeteer from 14.4.1 to 15.1.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13794)
* Bump eslint from 8.17.0 to 8.18.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13776)
* Bump typescript from 4.7.3 to 4.7.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13777)
* Bump karma from 6.3.20 to 6.4.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13775)
* Bump puppeteer from 14.3.0 to 14.4.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13778)
* Bump rollup from 2.75.6 to 2.75.7 (by @openlayers in https://github.com/openlayers/openlayers/pull/13779)
* Bump source-map-loader from 3.0.1 to 4.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13754)
* Bump @babel/core from 7.18.2 to 7.18.5 (by @openlayers in https://github.com/openlayers/openlayers/pull/13755)
* Bump marked from 4.0.16 to 4.0.17 (by @openlayers in https://github.com/openlayers/openlayers/pull/13756)
* Bump puppeteer from 14.2.1 to 14.3.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13757)
* Bump rollup from 2.75.5 to 2.75.6 (by @openlayers in https://github.com/openlayers/openlayers/pull/13758)
* Bump webpack-cli from 4.9.2 to 4.10.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13759)
* Bump webpack-dev-server from 4.9.1 to 4.9.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13760)
* Bump globby from 13.1.1 to 13.1.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13761)
* Bump eslint from 8.16.0 to 8.17.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13732)
* Bump typescript from 4.7.2 to 4.7.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13730)
* Bump webpack from 5.72.1 to 5.73.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13731)
* Bump rollup from 2.75.3 to 2.75.5 (by @openlayers in https://github.com/openlayers/openlayers/pull/13733)
* Bump puppeteer from 14.1.1 to 14.2.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13734)
* Bump webpack-dev-server from 4.9.0 to 4.9.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13735)
* Bump @babel/core from 7.18.0 to 7.18.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13717)
* Bump rollup from 2.74.1 to 2.75.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13718)
* Bump @types/offscreencanvas from 2019.6.4 to 2019.7.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13716)
* Bump typescript from 4.6.4 to 4.7.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13719)
* Bump @babel/preset-env from 7.18.0 to 7.18.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13720)
* Bump ol-mapbox-style from 8.0.8 to 8.1.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13715)
* Bump eslint from 8.9.0 to 8.16.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13693)
* Bump @babel/core from 7.17.10 to 7.18.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13694)
* Bump rollup from 2.73.0 to 2.74.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13699)
* Bump copy-webpack-plugin from 10.2.4 to 11.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13695)
* Bump webpack-dev-middleware from 5.3.1 to 5.3.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13696)
* Bump marked from 4.0.15 to 4.0.16 (by @openlayers in https://github.com/openlayers/openlayers/pull/13697)
* Bump @babel/preset-env from 7.17.10 to 7.18.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13698)
* Bump puppeteer from 14.1.0 to 14.1.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13700)
* Bump rollup from 2.72.1 to 2.73.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13680)
* Bump webpack from 5.72.0 to 5.72.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13681)
* Bump karma from 6.3.19 to 6.3.20 (by @openlayers in https://github.com/openlayers/openlayers/pull/13679)
* Bump puppeteer from 13.7.0 to 14.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13678)
* Bump ol-mapbox-style from 8.0.7 to 8.0.8 (by @openlayers in https://github.com/openlayers/openlayers/pull/13682)
* Bump yargs from 17.4.1 to 17.5.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13683)
* Bump rollup from 2.71.1 to 2.72.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13661)
* Bump sinon from 13.0.2 to 14.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13659)
* Bump webpack-dev-server from 4.8.1 to 4.9.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13662)
* Bump @rollup/plugin-node-resolve from 13.2.1 to 13.3.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13663)
* Bump ol-mapbox-style from 8.0.5 to 8.0.7 (by @openlayers in https://github.com/openlayers/openlayers/pull/13602)
* Bump marked from 4.0.14 to 4.0.15 (by @openlayers in https://github.com/openlayers/openlayers/pull/13628)
* Bump express from 4.18.0 to 4.18.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13629)
* Bump rollup from 2.70.2 to 2.71.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13630)
* Bump typescript from 4.6.3 to 4.6.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13631)
* Bump mocha from 9.2.2 to 10.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13632)
* Bump @babel/core from 7.17.9 to 7.17.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13633)
* Bump @babel/preset-env from 7.16.11 to 7.17.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13634)
* Bump github/codeql-action from 1 to 2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13616)
* Bump actions/setup-node from 2 to 3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13617)
* Bump actions/upload-artifact from 2 to 3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13615)
* Bump actions/checkout from 2 to 3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13618)
* Bump actions/github-script from 5 to 6 (by @openlayers in https://github.com/openlayers/openlayers/pull/13619)
* Bump puppeteer from 13.6.0 to 13.7.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13620)
* Bump express from 4.17.3 to 4.18.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13621)
* Bump @rollup/plugin-commonjs from 21.1.0 to 22.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13596)
* Bump puppeteer from 13.5.2 to 13.6.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13600)
* Bump pixelmatch from 5.2.1 to 5.3.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13598)
* Bump babel-loader from 8.2.4 to 8.2.5 (by @openlayers in https://github.com/openlayers/openlayers/pull/13601)
* Bump karma from 6.3.18 to 6.3.19 (by @openlayers in https://github.com/openlayers/openlayers/pull/13599)
* Bump sinon from 13.0.1 to 13.0.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13582)
* Bump async from 2.6.3 to 2.6.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13583)
* Bump @rollup/plugin-commonjs from 21.0.3 to 21.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13578)
* Bump fs-extra from 10.0.1 to 10.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13579)
* Bump karma from 6.3.17 to 6.3.18 (by @openlayers in https://github.com/openlayers/openlayers/pull/13580)
* Bump rollup from 2.70.1 to 2.70.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13581)
* Bump @rollup/plugin-node-resolve from 13.1.3 to 13.2.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13577)
* Bump webpack from 5.71.0 to 5.72.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13557)
* Bump @babel/core from 7.17.8 to 7.17.9 (by @openlayers in https://github.com/openlayers/openlayers/pull/13560)
* Bump webpack-dev-server from 4.7.4 to 4.8.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13559)
* Bump marked from 4.0.12 to 4.0.14 (by @openlayers in https://github.com/openlayers/openlayers/pull/13558)
* Bump yargs from 17.4.0 to 17.4.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13556)
* Bump webpack from 5.70.0 to 5.71.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13538)
* Bump jsdoc-plugin-typescript from 2.0.6 to 2.0.7 (by @openlayers in https://github.com/openlayers/openlayers/pull/13537)
* Bump puppeteer from 13.5.1 to 13.5.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13539)
* Bump clean-css-cli from 5.5.2 to 5.6.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13540)
* Bump typescript from 4.6.2 to 4.6.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13514)
* Bump babel-loader from 8.2.3 to 8.2.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13513)
* Bump @rollup/plugin-commonjs from 21.0.2 to 21.0.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13515)
* Bump serve-static from 1.14.2 to 1.15.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13512)
* Bump geotiff from 2.0.4 to 2.0.5 (by @openlayers in https://github.com/openlayers/openlayers/pull/13517)
</details>

4
changelog/v6.15.1.md Normal file
View File

@@ -0,0 +1,4 @@
# 6.15.1
The 6.15.1 release is a patch to ensure that a layer gets rendered when its source has completed loading. See the [changelog for 6.15.0](https://github.com/openlayers/openlayers/releases/tag/v6.15.0) for new features and fixes since 6.14.

169
changelog/v7.0.0.md Normal file
View File

@@ -0,0 +1,169 @@
# 7.0.0
The 7.0 release includes an impressive batch of features and fixes from over 90 pull requests. We're excited about a new foundation for WebGL vector rendering. The previous point rendering functionality has been extended to include lines and polygons. The rendering API is still low level and experimental. Future releases will include a higher level styling API. In developing the new WebGL rendering functionality, we changed the signature for a number of methods on a helper class that had been marked as part of the API in 6.x releases. While this is technically a breaking change, it is unlikely that applications were using this helper class, so upgrades should be straightforward.
We took advantage of the breaking change in the WebGL helper class to remove a few other deprecated parts of the API. In addition, since Microsoft ended support for Internet Explorer a few months ago, we decided to do the same.
### Backwards incompatible changes
#### Removal of deprecated properties and methods
* The `tilePixelRatio` has been removed from the `DataTile` source.
* The `imageSmoothing` option has been removed from sources.
* The `undefinedHTML` option has been removed from the `MousePosition` control.
* The `forEachLayerAtPixel` method has been removed from the `Map` class.
* Deprecated options have been removed from the `Overlay` component.
* The `labelCache` has been removed from the `ol/render/canvas.js` module.
#### Internet Explorer is no longer supported
Please see https://docs.microsoft.com/en-us/lifecycle/announcements/internet-explorer-11-end-of-support.
#### ol/webgl/Helper.js
The `Helper` constructor from the `ol/webgl/Helper.js` module is no longer part of the public API.
#### ol/coordinate.js
The `toStringHDMS` function from the `ol/coordinate.js` module now formats longitude, latitude pairs so that the minutes and seconds are omitted if they are zero. This changes the values displayed on graticules.
#### ol/layer/Graticule
The default `intervals` now align with integer minutes and seconds better suited to the default label formatter. If formatting in decimal degrees you may wish to specify custom `intervals` suited to that format.
#### ol/Collection
Inserting with `setAt` or `insertAt` beyond the current length used to create a sparse Collection with `undefined` inserted for any missing indexes. This will now throw an error instead.
#### ol/control/MousePosition
The control will now by default keep displaying the last mouse position when the mouse leaves the viewport. With `placeholder: '&#160;'` you can keep the old behaviour. The `placeholder` option no longer accepts `false` as a valid value, instead simply omit the option. The `undefinedHTML` option has been removed. You should use `placeholder` instead.
#### ol/PluggableMap
The `PluggableMap` class has been removed. If you want to create a custom map class, extend the `Map` class instead.
#### ol/style/Icon and ol/style/RegularShape
`ol/style/Image` and subclasses `displacement` is no longer scaled with the image. If you previously expected this unintended behavior you should now increase the displacement when setting the scale.
### List of all changes
See below for a complete list of features and fixes.
* Make the website deploy job succeed even if there are no changes (by @tschaub in https://github.com/openlayers/openlayers/pull/14017)
* Release actions (by @tschaub in https://github.com/openlayers/openlayers/pull/14014)
* Properly clear and refresh reprojected sources (by @ahocevar in https://github.com/openlayers/openlayers/pull/14013)
* Remove ENABLE_RASTER_REPROJECTION flag (by @ahocevar in https://github.com/openlayers/openlayers/pull/14011)
* Force render after update in Icon Scale example (by @mike-000 in https://github.com/openlayers/openlayers/pull/14012)
* Update ol-mapbox-style to v9.0.0 (by @ahocevar in https://github.com/openlayers/openlayers/pull/14009)
* Replace the Icon Scale example (by @mike-000 in https://github.com/openlayers/openlayers/pull/14007)
* Improve description of displacement in docs (by @mike-000 in https://github.com/openlayers/openlayers/pull/14006)
* Remove IE workarounds for legacy build, examples, and workers (by @tschaub in https://github.com/openlayers/openlayers/pull/13995)
* Use the full table for constructor options (by @tschaub in https://github.com/openlayers/openlayers/pull/13998)
* Do not scale Icon and RegularShape displacement (by @mike-000 in https://github.com/openlayers/openlayers/pull/13975)
* Support user projections in Drag and Drop (by @mike-000 in https://github.com/openlayers/openlayers/pull/14003)
* Avoid append only cache in WebGL tile layers (by @tschaub in https://github.com/openlayers/openlayers/pull/13997)
* Fix immediate renderer text rotation with offset (by @mike-000 in https://github.com/openlayers/openlayers/pull/13981)
* Build and deploy the website (by @openlayers in https://github.com/openlayers/openlayers/pull/13984)
* Small example template fixes (by @openlayers in https://github.com/openlayers/openlayers/pull/13992)
* Fix wording in API docs (by @openlayers in https://github.com/openlayers/openlayers/pull/13991)
* Nicer links in the API docs (by @tschaub in https://github.com/openlayers/openlayers/pull/13970)
* Minor adjustments to the website style (by @tschaub in https://github.com/openlayers/openlayers/pull/13989)
* Fix copying of non-linked ol.css, clean example build (by @MoonE in https://github.com/openlayers/openlayers/pull/13988)
* Fix kml-timezone example calculations (by @MoonE in https://github.com/openlayers/openlayers/pull/13982)
* Fix some errors in examples (by @MoonE in https://github.com/openlayers/openlayers/pull/13977)
* Update FontAwesome to v6.1.2 (by @MoonE in https://github.com/openlayers/openlayers/pull/13978)
* Use correct bands with `LUMINANCE_ALPHA` (by @mike-000 in https://github.com/openlayers/openlayers/pull/13974)
* Remove opt_ prefix (by @tschaub in https://github.com/openlayers/openlayers/pull/13972)
* Fix bandcount per texture for 8, 12, 16, etc. bands (by @mike-000 in https://github.com/openlayers/openlayers/pull/13973)
* Do not apply #12467 change to Icons (by @mike-000 in https://github.com/openlayers/openlayers/pull/13955)
* Remove more IE compatibility (by @MoonE in https://github.com/openlayers/openlayers/pull/13971)
* Remove workaround and docs for IE 11 (by @tschaub in https://github.com/openlayers/openlayers/pull/13965)
* Remove circular dependency (by @tschaub in https://github.com/openlayers/openlayers/pull/13967)
* Update link to sponsors (by @tschaub in https://github.com/openlayers/openlayers/pull/13968)
* Bundle code for the map on the homepage (by @tschaub in https://github.com/openlayers/openlayers/pull/13966)
* Website build (by @tschaub in https://github.com/openlayers/openlayers/pull/13961)
* Remove polyfills for IE and Android 4 (by @tschaub in https://github.com/openlayers/openlayers/pull/13963)
* Replace VERSION in un-transpiled source (by @MoonE in https://github.com/openlayers/openlayers/pull/13957)
* Use const in docs and other places (by @MoonE in https://github.com/openlayers/openlayers/pull/13958)
* Add few missing new lines in example source listing (by @MoonE in https://github.com/openlayers/openlayers/pull/13959)
* Fix js error in api pages on load (by @MoonE in https://github.com/openlayers/openlayers/pull/13956)
* Minor simplification (by @JakobMiksch in https://github.com/openlayers/openlayers/pull/13953)
* Fix typo and formatting in upgrade notes (by @mike-000 in https://github.com/openlayers/openlayers/pull/13946)
* Fixes to export examples (by @mike-000 in https://github.com/openlayers/openlayers/pull/13947)
* Fix WebGL points layer flaky test (by @jahow in https://github.com/openlayers/openlayers/pull/13944)
* Scaleline (by @MoonE in https://github.com/openlayers/openlayers/pull/13943)
* Improve loading of kmz file in example (by @MoonE in https://github.com/openlayers/openlayers/pull/13942)
* Fix KML default icon anchor with https icon url (by @MoonE in https://github.com/openlayers/openlayers/pull/13941)
* Use nicer functions, remove old code (by @MoonE in https://github.com/openlayers/openlayers/pull/13937)
* Render vector tile vectors in correct sequence for the postrender event (by @ahocevar in https://github.com/openlayers/openlayers/pull/13939)
* Remove workaround for missing TypedArray.from function (by @MoonE in https://github.com/openlayers/openlayers/pull/13936)
* Remove check for context.setLineDash (by @MoonE in https://github.com/openlayers/openlayers/pull/13933)
* Remove deprecated DataTile source `tilePixelRatio` (by @mike-000 in https://github.com/openlayers/openlayers/pull/13930)
* Remove input type="range" `change` event listeners where `input` events are also used (by @mike-000 in https://github.com/openlayers/openlayers/pull/13932)
* Remove deprecated `imageSmoothing` source options (by @mike-000 in https://github.com/openlayers/openlayers/pull/13931)
* Updated map background (by @tschaub in https://github.com/openlayers/openlayers/pull/13926)
* Include babel for CodeSandbox (by @tschaub in https://github.com/openlayers/openlayers/pull/13923)
* Remove reference to ES6 as ES2017 already listed (by @mike-000 in https://github.com/openlayers/openlayers/pull/13922)
* Style updates for examples and API docs (by @tschaub in https://github.com/openlayers/openlayers/pull/13917)
* Remove Google Analytics and cookie consent (by @tschaub in https://github.com/openlayers/openlayers/pull/13916)
* Fix map render test (by @MoonE in https://github.com/openlayers/openlayers/pull/13915)
* Uniformly grayscale controls (by @tschaub in https://github.com/openlayers/openlayers/pull/13908)
* Remove PluggableMap (by @tschaub in https://github.com/openlayers/openlayers/pull/13914)
* Remove MousePosition's deprecated undefinedHTML option (by @MoonE in https://github.com/openlayers/openlayers/pull/13911)
* Remove IconImage color fallback for IE (by @MoonE in https://github.com/openlayers/openlayers/pull/13912)
* Remove IE fallbacks (by @MoonE in https://github.com/openlayers/openlayers/pull/13907)
* Fix editing of export-map example on codesandbox (by @MoonE in https://github.com/openlayers/openlayers/pull/13910)
* Improve Collection type-safety (by @MoonE in https://github.com/openlayers/openlayers/pull/13902)
* Re-export the link interaction from the interactions module (by @tschaub in https://github.com/openlayers/openlayers/pull/13906)
* Replace enums with typedefs (by @MoonE in https://github.com/openlayers/openlayers/pull/13905)
* Accept an object literal for static layer styling (by @tschaub in https://github.com/openlayers/openlayers/pull/13900)
* Update jsdoc-plugin-typescript to fix markdown in type annotations (by @ahocevar in https://github.com/openlayers/openlayers/pull/13903)
* Wait until first load to create icon image (by @tschaub in https://github.com/openlayers/openlayers/pull/13899)
* Make Text options typesafe (by @MoonE in https://github.com/openlayers/openlayers/pull/13901)
* Align graticule default intervals to minutes and seconds (by @mike-000 in https://github.com/openlayers/openlayers/pull/13897)
* Publish untranspiled sources (by @tschaub in https://github.com/openlayers/openlayers/pull/13891)
* Improve reprojection WMS config for better performance (by @ahocevar in https://github.com/openlayers/openlayers/pull/13880)
* Omit minutes and seconds from HDMS formatting if zero (by @tschaub in https://github.com/openlayers/openlayers/pull/13893)
* Use Object.assign (by @tschaub in https://github.com/openlayers/openlayers/pull/13888)
* Remove unused worker (by @tschaub in https://github.com/openlayers/openlayers/pull/13892)
* Remove find and findIndex from array module (by @tschaub in https://github.com/openlayers/openlayers/pull/13887)
* Use Math.cosh and Math.log2 (by @tschaub in https://github.com/openlayers/openlayers/pull/13890)
* Use Object.values (by @tschaub in https://github.com/openlayers/openlayers/pull/13889)
* Remove workaround for Array.prototype.includes (by @tschaub in https://github.com/openlayers/openlayers/pull/13884)
* Codesandbox and bundler improvements for examples (by @ahocevar in https://github.com/openlayers/openlayers/pull/13879)
* Remove deprecated method PluggableMap#forEachLayerAtPixel ... (by @MoonE in https://github.com/openlayers/openlayers/pull/13868)
* Remove unused assertion numbers (by @MoonE in https://github.com/openlayers/openlayers/pull/13869)
* Remove deprecated Overlay options (by @MoonE in https://github.com/openlayers/openlayers/pull/13838)
* WebGL vector renderer for polygons, lines and points (by @jahow in https://github.com/openlayers/openlayers/pull/13461)
* Fix reloading tiles in case of an error with tile.load() (by @ahocevar in https://github.com/openlayers/openlayers/pull/13863)
* Handle multipolygons with empty polygons (by @ahocevar in https://github.com/openlayers/openlayers/pull/13860)
* Replace enums with typedef (by @MoonE in https://github.com/openlayers/openlayers/pull/13858)
* Remove deprecated label cache (by @MoonE in https://github.com/openlayers/openlayers/pull/13837)
* Update dev version to 7.0.0 (by @MoonE in https://github.com/openlayers/openlayers/pull/13850)
* Release v6.15.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13852)
* Recover from incorrect rebase after removal of string enums (by @ahocevar in https://github.com/openlayers/openlayers/pull/13835)
* Updates for the 6.15.0 release (by @openlayers in https://github.com/openlayers/openlayers/pull/13851)
<details>
<summary>Dependency Updates</summary>
* Bump webpack-dev-server from 4.9.3 to 4.10.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13986)
* Bump rollup from 2.77.2 to 2.78.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13985)
* Bump eslint from 8.21.0 to 8.22.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13987)
* Bump @babel/preset-env from 7.18.9 to 7.18.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13948)
* Bump @babel/core from 7.18.9 to 7.18.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13949)
* Bump @rollup/plugin-commonjs from 22.0.1 to 22.0.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13951)
* Bump puppeteer from 15.5.0 to 16.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13950)
* Bump rollup from 2.77.0 to 2.77.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13919)
* Bump eslint from 8.20.0 to 8.21.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13920)
* Bump jsdoc-plugin-typescript from 2.0.7 to 2.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13875)
* Bump puppeteer from 15.4.0 to 15.5.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13871)
* Bump webpack from 5.73.0 to 5.74.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13870)
* Bump jsdoc from 3.6.10 to 3.6.11 (by @openlayers in https://github.com/openlayers/openlayers/pull/13873)
* Bump terser from 5.7.2 to 5.14.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13859)
</details>

View File

@@ -14,6 +14,7 @@
] ]
}, },
"plugins": [ "plugins": [
"jsdoc-plugin-intersection",
"config/jsdoc/plugins/markdown.cjs", "config/jsdoc/plugins/markdown.cjs",
"jsdoc-plugin-typescript", "jsdoc-plugin-typescript",
"config/jsdoc/plugins/inline-options.cjs", "config/jsdoc/plugins/inline-options.cjs",

View File

@@ -37,7 +37,7 @@
<div class="card h-100 bg-light"> <div class="card h-100 bg-light">
<div class="card-body"> <div class="card-body">
<h4 class="card-title">Controls</h4> <h4 class="card-title">Controls</h4>
<a href="module-ol_control.html#.defaults">Map default controls</a><br> <a href="module-ol_control_defaults#.defaults">Map default controls</a><br>
<a href="module-ol_control_Control-Control.html">All controls</a> <a href="module-ol_control_Control-Control.html">All controls</a>
</div> </div>
</div> </div>
@@ -46,7 +46,7 @@
<div class="card h-100 bg-light"> <div class="card h-100 bg-light">
<div class="card-body"> <div class="card-body">
<h4 class="card-title">Interactions</h4> <h4 class="card-title">Interactions</h4>
<a href="module-ol_interaction.html#~defaults">Map default interactions</a><br> <a href="module-ol_interaction_defaults#.defaults">Map default interactions</a><br>
Interactions for <a href="module-ol_Feature-Feature.html">vector features</a> Interactions for <a href="module-ol_Feature-Feature.html">vector features</a>
<ul><li><a href="module-ol_interaction_Select-Select.html">ol/interaction/Select</a></li> <ul><li><a href="module-ol_interaction_Select-Select.html">ol/interaction/Select</a></li>
<li><a href="module-ol_interaction_Draw-Draw.html">ol/interaction/Draw</a></li> <li><a href="module-ol_interaction_Draw-Draw.html">ol/interaction/Draw</a></li>
@@ -73,8 +73,8 @@
<div class="card h-100 bg-light"> <div class="card h-100 bg-light">
<div class="card-body"> <div class="card-body">
<h4 class="card-title">Projections</h4> <h4 class="card-title">Projections</h4>
<p>All coordinates and extents need to be provided in view projection (default: EPSG:3857). To transform coordinates from and to geographic, use <a href="module-ol_proj.html#.fromLonLat">ol/proj#fromLonLat()</a> and <a href="module-ol_proj.html#.toLonLat">ol/proj#toLonLat()</a>. For extents and other projections, use <a href="module-ol_proj.html#.transformExtent">ol/proj#transformExtent()</a> and <a href="module-ol_proj.html#.transform">ol/proj#transform()</a>.<p> <p>All coordinates and extents need to be provided in view projection (default: EPSG:3857). To transform coordinates from and to geographic, use <a href="module-ol_proj.html#.fromLonLat">fromLonLat()</a> and <a href="module-ol_proj.html#.toLonLat">toLonLat()</a>. For extents and other projections, use <a href="module-ol_proj.html#.transformExtent">transformExtent()</a> and <a href="module-ol_proj.html#.transform">transform()</a>.</p>
<a href="module-ol_proj.html">ol/proj</a> <p>Find these functions and more in the <a href="module-ol_proj.html">ol/proj</a> module.</p>
</div> </div>
</div> </div>
</div> </div>
@@ -82,7 +82,7 @@
<div class="card h-100 bg-light"> <div class="card h-100 bg-light">
<div class="card-body"> <div class="card-body">
<h4 class="card-title">Observable objects</h4> <h4 class="card-title">Observable objects</h4>
<p>Changes to all <a href="module-ol_Object-BaseObject.html">ol/Object</a>s can be observed by calling the <a href="module-ol_Object-BaseObject.html#on">object.on('propertychange')</a> method. Listeners receive an <a href="module-ol_Object.ObjectEvent.html">ol/Object.ObjectEvent</a> with information on the changed property and old value.</p> <p>Changes to all <a href="module-ol_Object-BaseObject.html">Object</a>s can be observed by calling the <a href="module-ol_Object-BaseObject.html#on">object.on('propertychange')</a> method. Listeners receive an <a href="module-ol_Object.ObjectEvent.html">ObjectEvent</a> with information on the changed property and old value.</p>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -17,7 +17,6 @@ const taffy = require('taffydb').taffy;
const handle = require('jsdoc/lib/jsdoc/util/error').handle; const handle = require('jsdoc/lib/jsdoc/util/error').handle;
const helper = require('jsdoc/lib/jsdoc/util/templateHelper'); const helper = require('jsdoc/lib/jsdoc/util/templateHelper');
const htmlsafe = helper.htmlsafe; const htmlsafe = helper.htmlsafe;
const linkto = helper.linkto;
const resolveAuthorLinks = helper.resolveAuthorLinks; const resolveAuthorLinks = helper.resolveAuthorLinks;
const outdir = env.opts.destination; const outdir = env.opts.destination;
@@ -32,6 +31,78 @@ function find(spec) {
return helper.find(data, spec); return helper.find(data, spec);
} }
function getShortName(longname) {
if (!longname.includes('module:ol/')) {
return longname;
}
if (longname.includes('|')) {
return longname;
}
if (longname.includes('<')) {
return longname;
}
return longname.split(/[\~\.#\:]/).pop();
}
function linkto(longname, linkText, cssClass, fragmentId) {
if (linkText) {
return helper.linkto(longname, linkText, cssClass, fragmentId);
}
if (!longname.includes('module:ol/')) {
return helper.linkto(longname, linkText, cssClass, fragmentId);
}
// check for `Array<foo|bar>` types (but allow `Array<foo>|Array<bar>` types)
let openBrackets = 0;
let parseTypes = false;
for (const c of longname) {
if (c === '<') {
openBrackets += 1;
continue;
}
if (c === '>') {
openBrackets -= 1;
continue;
}
if (openBrackets > 0 && c === '|') {
parseTypes = true;
break;
}
}
if (parseTypes) {
// collections or generics with unions get parsed by catharsis and
// will unfortunamely include long module:ol/foo names
return helper.linkto(longname, '', cssClass, fragmentId);
}
// handle union types
if (longname.includes('|')) {
return longname
.split('|')
.map((part) => linkto(part, '', cssClass, fragmentId))
.join(' | ');
}
const match = longname.match(/(.+?)\.?<(.+)>$/);
// handle generics and collections
if (match) {
return (
linkto(match[1], '', cssClass, fragmentId) +
'<' +
linkto(match[2], '', cssClass, fragmentId) +
'>'
);
}
return helper.linkto(
longname,
htmlsafe(getShortName(longname)),
cssClass,
fragmentId
);
}
function tutoriallink(tutorial) { function tutoriallink(tutorial) {
return helper.toTutorial(tutorial, null, { return helper.toTutorial(tutorial, null, {
tag: 'em', tag: 'em',
@@ -85,15 +156,44 @@ function addSignatureParams(f) {
f.signature = (f.signature || '') + '(' + params.join(', ') + ')'; f.signature = (f.signature || '') + '(' + params.join(', ') + ')';
} }
/**
* Copied from https://github.com/jsdoc/jsdoc/blob/main/packages/jsdoc/lib/jsdoc/util/templateHelper.js
* Modified to call our own `linkto` to shorten names.
* @param {Object} doclet The doclet.
* @param {Array} [doclet.yields] The returns.
* @param {Array} [doclet.returns] The returns.
* @param {string} cssClass The css class.
* @return {Array} The returns.
*/
function getSignatureReturns({yields, returns}, cssClass) {
let returnTypes = [];
if (yields || returns) {
(yields || returns).forEach((r) => {
if (r && r.type && r.type.names) {
if (!returnTypes.length) {
returnTypes = r.type.names;
}
}
});
}
if (returnTypes && returnTypes.length) {
returnTypes = returnTypes.map((r) => linkto(r, '', cssClass));
}
return returnTypes;
}
function addSignatureReturns(f) { function addSignatureReturns(f) {
const returnTypes = helper.getSignatureReturns(f); const returnTypes = getSignatureReturns(f);
f.signature = '<span class="signature">' + (f.signature || '') + '</span>'; f.signature = '<span class="signature">' + (f.signature || '') + '</span>';
if (returnTypes.length) { if (returnTypes.length) {
f.signature += f.signature +=
'<span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">' + '<span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">' +
(returnTypes.length ? '{' + returnTypes.join('|') + '}' : '') + (returnTypes.length ? '{' + returnTypes.join(' | ') + '}' : '') +
'</span>'; '</span>';
} }
} }
@@ -110,12 +210,10 @@ function addSignatureTypes(f) {
function shortenPaths(files, commonPrefix) { function shortenPaths(files, commonPrefix) {
// always use forward slashes // always use forward slashes
const regexp = new RegExp('\\\\', 'g');
Object.keys(files).forEach(function (file) { Object.keys(files).forEach(function (file) {
files[file].shortened = files[file].resolved files[file].shortened = files[file].resolved
.replace(commonPrefix, '') .replace(commonPrefix, '')
.replace(regexp, '/'); .replaceAll('\\', '/');
}); });
return files; return files;
@@ -138,6 +236,13 @@ function getPathFromDoclet(doclet) {
return filepath; return filepath;
} }
function preprocessLinks(text) {
return text.replaceAll(
/\{@link (module:ol\/\S+?)\}/g,
(match, longname) => `{@link ${longname} ${getShortName(longname)}}`
);
}
function generate(title, docs, filename, resolveLinks) { function generate(title, docs, filename, resolveLinks) {
resolveLinks = resolveLinks === false ? false : true; resolveLinks = resolveLinks === false ? false : true;
@@ -152,7 +257,7 @@ function generate(title, docs, filename, resolveLinks) {
let html = view.render('container.tmpl', docData); let html = view.render('container.tmpl', docData);
if (resolveLinks) { if (resolveLinks) {
html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a> html = helper.resolveLinks(preprocessLinks(html)); // turn {@link foo} into <a href="foodoc.html">foo</a>
} }
fs.writeFileSync(outpath, html, 'utf8'); fs.writeFileSync(outpath, html, 'utf8');
@@ -223,7 +328,7 @@ function getPrettyName(doclet) {
/** /**
* Create the navigation sidebar. * Create the navigation sidebar.
* @param {object} members The members that will be used to create the sidebar. * @param {Object} members The members that will be used to create the sidebar.
* @param {Array<Object>} members.classes Classes. * @param {Array<Object>} members.classes Classes.
* @param {Array<Object>} members.externals Externals. * @param {Array<Object>} members.externals Externals.
* @param {Array<Object>} members.globals Globals. * @param {Array<Object>} members.globals Globals.
@@ -364,13 +469,12 @@ exports.publish = function (taffyData, opts, tutorials) {
doclet.examples = doclet.examples.map(function (example) { doclet.examples = doclet.examples.map(function (example) {
let caption, code; let caption, code;
if ( const match = example.match(
example.match( /^\s*<caption>([\s\S]+?)<\/caption>(?:\s*[\n\r])([\s\S]+)$/i
/^\s*<caption>([\s\S]+?)<\/caption>(\s*[\n\r])([\s\S]+)$/i );
) if (match) {
) { caption = match[1];
caption = RegExp.$1; code = match[2];
code = RegExp.$3;
} }
return { return {
@@ -461,7 +565,7 @@ exports.publish = function (taffyData, opts, tutorials) {
data().each(function (doclet) { data().each(function (doclet) {
const url = helper.longnameToUrl[doclet.longname]; const url = helper.longnameToUrl[doclet.longname];
if (url.indexOf('#') > -1) { if (url.includes('#')) {
doclet.id = helper.longnameToUrl[doclet.longname].split(/#/).pop(); doclet.id = helper.longnameToUrl[doclet.longname].split(/#/).pop();
} else { } else {
doclet.id = doclet.name; doclet.id = doclet.name;
@@ -493,6 +597,7 @@ exports.publish = function (taffyData, opts, tutorials) {
// add template helpers // add template helpers
view.find = find; view.find = find;
view.linkto = linkto; view.linkto = linkto;
view.getShortName = getShortName;
view.resolveAuthorLinks = resolveAuthorLinks; view.resolveAuthorLinks = resolveAuthorLinks;
view.tutoriallink = tutoriallink; view.tutoriallink = tutoriallink;
view.htmlsafe = htmlsafe; view.htmlsafe = htmlsafe;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,17 +1,11 @@
(function() { (function() {
var counter = 0; const source = document.querySelector('.prettyprint.source > code');
var numbered; if (source) {
var source = document.getElementsByClassName('prettyprint source'); source.innerHTML = source.innerHTML
.split('\n')
if (source && source[0]) { .map(function (item, i) {
source = source[0].getElementsByTagName('code')[0]; return '<span id="line' + (i + 1) + '"></span>' + item;
})
numbered = source.innerHTML.split('\n'); .join('\n');
numbered = numbered.map(function(item) {
counter++;
return '<span id="line' + counter + '"></span>' + item;
});
source.innerHTML = numbered.join('\n');
} }
})(); })();

View File

@@ -87,17 +87,19 @@ $(function () {
manualToggles = {}; manualToggles = {};
const lastTerm = search.lastSearchTerm; const lastTerm = search.lastSearchTerm;
search.lastSearchTerm = undefined; search.lastSearchTerm = undefined;
const fa = currentItem.querySelector('.title > .fa'); if (currentItem) {
fa.classList.add('no-transition'); const fa = currentItem.querySelector('.title > .fa');
fa.classList.add('no-transition');
setTimeout(function () {
fa.classList.remove('no-transition');
}, 0);
}
doSearch(lastTerm || ''); doSearch(lastTerm || '');
// Transfer manual toggle state to newly loaded current node // Transfer manual toggle state to newly loaded current node
if (initialCurrent && initialCurrent.classList.contains('toggle-manual')) { if (initialCurrent && initialCurrent.classList.contains('toggle-manual')) {
search.manualToggle(search.$currentItem, initialCurrent.classList.contains('toggle-manual-show')); search.manualToggle(search.$currentItem, initialCurrent.classList.contains('toggle-manual-show'));
} }
setTimeout(function () {
fa.classList.remove('no-transition');
}, 0);
}); });
return { return {
@@ -275,28 +277,28 @@ $(function () {
}); });
// warn about outdated version // warn about outdated version
var currentVersion = document.getElementById('package-version').innerHTML; const currentVersion = document.getElementById('package-version').innerHTML;
var packageUrl = 'https://raw.githubusercontent.com/openlayers/openlayers.github.io/build/package.json'; const releaseUrl = 'https://cdn.jsdelivr.net/npm/ol/package.json';
fetch(packageUrl).then(function(response) { fetch(releaseUrl).then(function(response) {
return response.json(); return response.json();
}).then(function(json) { }).then(function(json) {
var latestVersion = json.version; const latestVersion = json.version;
document.getElementById('latest-version').innerHTML = latestVersion; document.getElementById('latest-version').innerHTML = latestVersion;
var url = window.location.href; const url = window.location.href;
var branchSearch = url.match(/\/([^\/]*)\/apidoc\//); const branchSearch = url.match(/\/([^\/]*)\/apidoc\//);
var cookieText = 'dismissed=-' + latestVersion + '-'; const storageKey = 'dismissed=-' + latestVersion;
var dismissed = document.cookie.indexOf(cookieText) != -1; const dismissed = localStorage.getItem(storageKey) === 'true';
if (branchSearch && !dismissed && /^v[0-9\.]*$/.test(branchSearch[1]) && currentVersion != latestVersion) { if (branchSearch && !dismissed && /^v[0-9\.]*$/.test(branchSearch[1]) && currentVersion != latestVersion) {
var link = url.replace(branchSearch[0], '/latest/apidoc/'); const link = url.replace(branchSearch[0], '/latest/apidoc/');
fetch(link, {method: 'head'}).then(function(response) { fetch(link, {method: 'head'}).then(function(response) {
var a = document.getElementById('latest-link'); const a = document.getElementById('latest-link');
a.href = response.status == 200 ? link : '../../latest/apidoc/'; a.href = response.status == 200 ? link : '../../latest/apidoc/';
}); });
var latestCheck = document.getElementById('latest-check'); const latestCheck = document.getElementById('latest-check');
latestCheck.style.display = ''; latestCheck.style.display = '';
document.getElementById('latest-dismiss').onclick = function() { document.getElementById('latest-dismiss').onclick = function() {
latestCheck.style.display = 'none'; latestCheck.style.display = 'none';
document.cookie = cookieText; localStorage.setItem(storageKey, 'true');
} }
} }
}); });

File diff suppressed because one or more lines are too long

View File

@@ -172,7 +172,6 @@ li {
} }
.navigation li.item .title { .navigation li.item .title {
cursor: pointer; cursor: pointer;
display: -ms-flexbox;
display: flex; display: flex;
font-size: 0.85em; font-size: 0.85em;
} }

View File

@@ -0,0 +1 @@
../../../../../site/src/theme

View File

@@ -46,7 +46,7 @@
<script async type="text/javascript" src="https://cdn.carbonads.com/carbon.js?serve=CE7DV53U&placement=openlayersorg" id="_carbonads_js"></script> <script async type="text/javascript" src="https://cdn.carbonads.com/carbon.js?serve=CE7DV53U&placement=openlayersorg" id="_carbonads_js"></script>
</div> </div>
<?js if (doc.classdesc) { ?> <?js if (doc.classdesc) { ?>
<div class="class-description col-lg-7 align-self-center pl-0"><?js= doc.classdesc ?></div> <div class="class-description col-lg-7 align-self-center ps-0"><?js= doc.classdesc ?></div>
<?js } ?> <?js } ?>
</div> </div>
</header> </header>
@@ -79,13 +79,13 @@
<?js if (doc.kind == 'class') { <?js if (doc.kind == 'class') {
var subclasses = self.find(function() { var subclasses = self.find(function() {
return this.augments && this.augments.indexOf(doc.longname) > -1; return this.augments && this.augments.includes(doc.longname);
}) })
if (subclasses.length) { if (subclasses.length) {
?> ?>
<h3 class="subsection-title">Subclasses</h3> <h3 class="subsection-title">Subclasses</h3>
<ul><?js subclasses.forEach(function(s) { ?> <ul><?js subclasses.forEach(function(s) { ?>
<li><?js= self.linkto(s.longname, s.longname) ?> <li><?js= self.linkto(s.longname) ?>
<?js= (s.interface ? '(Interface)' : '') ?> <?js= (s.interface ? '(Interface)' : '') ?>
</li> </li>
<?js }); ?></ul> <?js }); ?></ul>
@@ -95,7 +95,7 @@
<h3 class="subsection-title">Extends</h3> <h3 class="subsection-title">Extends</h3>
<ul><?js doc.augments.forEach(function(a) { ?> <ul><?js doc.augments.forEach(function(a) { ?>
<li><?js= self.linkto(a, a) ?></li> <li><?js= self.linkto(a) ?></li>
<?js }); ?></ul> <?js }); ?></ul>
<?js } ?> <?js } ?>
@@ -103,7 +103,7 @@
<h3 class="subsection-title">Mixes In</h3> <h3 class="subsection-title">Mixes In</h3>
<ul><?js doc.mixes.forEach(function(a) { ?> <ul><?js doc.mixes.forEach(function(a) { ?>
<li><?js= self.linkto(a, a) ?></li> <li><?js= self.linkto(a) ?></li>
<?js }); ?></ul> <?js }); ?></ul>
<?js } ?> <?js } ?>
@@ -111,7 +111,7 @@
<h3 class="subsection-title">Requires</h3> <h3 class="subsection-title">Requires</h3>
<ul><?js doc.requires.forEach(function(r) { ?> <ul><?js doc.requires.forEach(function(r) { ?>
<li><?js= self.linkto(r, r) ?></li> <li><?js= self.linkto(r) ?></li>
<?js }); ?></ul> <?js }); ?></ul>
<?js } ?> <?js } ?>
@@ -162,7 +162,7 @@
var methods = self.find({kind: 'function', memberof: title === 'Global' ? {isUndefined: true} : doc.longname}); var methods = self.find({kind: 'function', memberof: title === 'Global' ? {isUndefined: true} : doc.longname});
if (methods && methods.length && methods.forEach) { if (methods && methods.length && methods.forEach) {
?> ?>
<h3 class="subsection-title">Methods</h3> <h3 class="subsection-title"><?js= doc.kind === 'module' ? 'Functions' : 'Methods' ?></h3>
<dl><?js methods.forEach(function(m) { ?> <dl><?js methods.forEach(function(m) { ?>
<?js m.parent = doc ?> <?js m.parent = doc ?>

View File

@@ -6,7 +6,7 @@
<p class="code-caption"><?js= example.caption ?></p> <p class="code-caption"><?js= example.caption ?></p>
<?js } ?> <?js } ?>
<?js if (example.code.toString().indexOf('<pre>') === -1) { ?> <?js if (!example.code.toString().includes('<pre>')) { ?>
<pre class="prettyprint"><code><?js= example.code ?></code></pre> <pre class="prettyprint"><code><?js= example.code ?></code></pre>
<?js } else { ?> <?js } else { ?>
<?js= example.code.replace(/<pre>/g, '<pre class="prettyprint">') ?> <?js= example.code.replace(/<pre>/g, '<pre class="prettyprint">') ?>

View File

@@ -4,116 +4,59 @@ var version = obj.packageInfo.version;
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="UTF-8">
<script>
var gaProperty = 'UA-2577926-1';
// Disable tracking if the opt-out cookie exists.
var disableStr = 'ga-disable-' + gaProperty;
if (document.cookie.indexOf(disableStr + '=true') > -1) {
window[disableStr] = true;
}
function gaOptout() {
document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
window[disableStr] = true;
}
function gaOptoutRevoke() {
document.cookie = disableStr + '=false; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
window[disableStr] = false;
}
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-2577926-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-2577926-1', { 'anonymize_ip': true });
</script>
<link type="text/css" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function() {
window.cookieconsent.initialise({
'palette': {
'popup': {
'background': '#eaf7f7',
'text': '#5c7291'
},
'button': {
'background': '#56cbdb',
'text': '#ffffff'
}
},
'theme': 'edgeless',
'type': 'opt-out',
'onInitialise': function (status) {
if (!this.hasConsented()) {
gaOptout()
}
},
'onStatusChange': function(status, chosenBefore) {
if (!this.hasConsented()) {
gaOptout()
}
},
'onRevokeChoice': function() {
gaOptoutRevoke()
}
})
});
</script>
<title>OpenLayers v<?js= version ?> API - <?js= title ?></title> <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> <script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script> <script src="scripts/prettify/lang-css.js"></script>
<script src="scripts/jquery.min.js"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>
<script src="scripts/bootstrap.bundle.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<!--[if lt IE 9]> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" crossorigin="anonymous">
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/fontawesome.min.css" crossorigin="anonymous">
<![endif]--> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/solid.css" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/brands.css" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link rel="stylesheet" type="text/css" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="styles/jaguar.css">
<link type="text/css" rel="stylesheet" href="styles/jaguar.css"> <link rel="stylesheet" type="text/css" href="styles/carbon.css">
<link type="text/css" rel="stylesheet" href="styles/site.css"> <link rel="stylesheet" type="text/css" href="/theme/ol.css">
<link rel="stylesheet" type="text/css" href="/theme/site.css">
</head> </head>
<body> <body>
<div class="container-fluid"> <header class="navbar navbar-expand-sm navbar-dark mb-3 px-3 py-0 fixed-top" role="navigation">
<header class="navbar navbar-expand-sm navbar-dark mb-3 py-0 fixed-top" role="navigation"> <a class="navbar-brand" href="/"><img src="/theme/img/logo-dark.svg" width="70" height="70" alt="">&nbsp;OpenLayers</a>
<a class="navbar-brand" href="https://openlayers.org/"><img src="logo-70x70.png" alt="">&nbsp;OpenLayers</a> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#olmenu" aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#olmenu" aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation"> <!-- menu items that get hidden below 768px width -->
<span class="navbar-toggler-icon"></span> <nav class="collapse navbar-collapse" id="olmenu">
</button> <ul class="navbar-nav ms-auto">
<!-- menu items that get hidden below 768px width -->
<nav class="collapse navbar-collapse" id="olmenu">
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docs</a> <a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docs</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="docdropdown"> <div class="dropdown-menu dropdown-menu-end" aria-labelledby="docdropdown">
<a class="dropdown-item" href="/en/latest/doc/">Docs</a> <a class="dropdown-item" href="/doc/">Docs</a>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<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/quickstart.html"><i class="fa fa-check fa-fw me-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/faq.html"><i class="fa fa-question fa-fw me-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="/doc/tutorials/"><i class="fa fa-book fa-fw me-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 me-2 fa-lg"></i>Workshop</a>
<div class="dropdown-divider"></div> <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> <a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i class="fab fa-stack-overflow fa-fw me-2"></i>Ask a Question</a>
</div> </div>
</li> </li>
<li class="nav-item"><a class="nav-link" href="../examples/">Examples</a></li> <li class="nav-item"><a class="nav-link" href="../examples/">Examples</a></li>
<li class="nav-item active"><a class="nav-link" href="../apidoc/"><i class="fa fa-sitemap mr-1"></i>API</a></li> <li class="nav-item active"><a class="nav-link" href="../apidoc/"><i class="fa fa-sitemap me-1"></i>API</a></li>
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="codedropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Code</a> <a class="nav-link dropdown-toggle" href="#" id="codedropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Code</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="codedropdown"> <div class="dropdown-menu dropdown-menu-end" 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="https://github.com/openlayers/openlayers"><i class="fab fa-github fa-fw me-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 me-2 fa-lg"></i>Download</a>
</div> </div>
</li> </li>
</ul> </ul>
</nav> </nav>
</header> </header>
<div class="container-fluid">
<div id="wrap" class="row"> <div id="wrap" class="row">
<div class="navigation col-md-4 col-lg-3"> <div class="navigation col-md-4 col-lg-3">
<div class="search-wrapper"> <div class="search-wrapper">
@@ -137,17 +80,17 @@ var version = obj.packageInfo.version;
</div> </div>
<div class="main col-md-8 col-lg-9"> <div class="main col-md-8 col-lg-9">
<h1 class="page-title" data-filename="<?js= filename ?>"><?js= title ?></h1> <h1 class="page-title" data-filename="<?js= filename ?>"><?js= title ?></h1>
<div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none"> <div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
<button id="latest-dismiss" type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button> <button id="latest-dismiss" type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
This documentation is for OpenLayers v<span id="package-version"><?js= version ?></span>. The <a id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>. This documentation is for OpenLayers v<span id="package-version"><?js= version ?></span>. The <a id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
</div> </div>
<?js= content ?> <?js= content ?>
</div> </div>
</div> </div>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/main.js"></script>
</div> </div>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/main.js"></script>
</body> </body>
</html> </html>

View File

@@ -5,7 +5,7 @@ var typeSignature = '';
if (data.type && data.type.names) { if (data.type && data.type.names) {
data.type.names.forEach(function (name) { data.type.names.forEach(function (name) {
typeSignature += '<span class="type-signature type ' + name.toLowerCase() + '">{' + self.linkto(name, self.htmlsafe(name)) + '}</span> '; typeSignature += '<span class="type-signature type ' + name.toLowerCase() + '">{' + self.linkto(name) + '}</span> ';
}); });
} }
?> ?>
@@ -14,7 +14,7 @@ if (data.type && data.type.names) {
<div class="anchor" id="<?js= id ?>"> <div class="anchor" id="<?js= id ?>">
</div> </div>
<h4 class="name"> <h4 class="name">
<?js= data.attribs + (data.scope === 'static' ? longname : name.indexOf('module:') === 0 ? name.split('/').pop() : name) + typeSignature ?> <?js= data.attribs + (data.scope === 'static' ? longname : name.startsWith('module:') ? name.split('/').pop() : name) + typeSignature ?>
<?js= this.partial('stability.tmpl', data) ?> <?js= this.partial('stability.tmpl', data) ?>
</h4> </h4>
</div> </div>

View File

@@ -14,7 +14,7 @@ if (/-dev$/.test(version)) {
<div class="anchor" id="<?js= id ?>"> <div class="anchor" id="<?js= id ?>">
</div> </div>
<h4 class="name"> <h4 class="name">
<?js= data.attribs + (kind === 'class' ? 'new ' : '') + (data.scope === 'static' ? longname : name) + (kind !== 'event' ? data.signature : '') ?> <?js= data.attribs + (kind === 'class' ? 'new ' : '') + this.getShortName(longname) + (kind !== 'event' ? data.signature : '') ?>
<?js if (data.inherited || data.inherits) { ?> <?js if (data.inherited || data.inherits) { ?>
<span class="inherited"><?js= this.linkto(data.inherits, 'inherited') ?></span> <span class="inherited"><?js= this.linkto(data.inherits, 'inherited') ?></span>
<?js } ?> <?js } ?>
@@ -34,8 +34,9 @@ if (/-dev$/.test(version)) {
</dt> </dt>
<dd class="<?js= (data.stability && data.stability !== 'stable') ? 'unstable' : '' ?>"> <dd class="<?js= (data.stability && data.stability !== 'stable') ? 'unstable' : '' ?>">
<?js if (data.parent && data.parent.kind == 'module' && data.parent.name.split('ol/').length < 3) { ?> <?js if (data.parent && data.parent.kind == 'module') { ?>
<pre class="prettyprint source"><code>import {<?js= data.name ?>} from '<?js= data.parent.name ?>';</code></pre> <?js const importName = data.isDefaultExport ? data.name : `{${data.name}}`; ?>
<pre class="prettyprint source"><code>import <?js= importName ?> from '<?js= data.parent.name ?>';</code></pre>
<?js } ?> <?js } ?>
<?js if (data.description) { ?> <?js if (data.description) { ?>
@@ -55,7 +56,7 @@ if (/-dev$/.test(version)) {
<?js if (data['this']) { ?> <?js if (data['this']) { ?>
<h5>This:</h5> <h5>This:</h5>
<ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul> <ul><li><?js= this.linkto(data['this']) ?></li></ul>
<?js } ?> <?js } ?>
<?js if (data.stability || kind !== 'class') { ?> <?js if (data.stability || kind !== 'class') { ?>

View File

@@ -2,7 +2,7 @@
var self = this; var self = this;
function toShortName(name) { function toShortName(name) {
return name.indexOf('module:') === 0 ? name.split('/').pop() : name; return name.startsWith('module:') ? name.split('/').pop() : name;
} }
function getItemCssClass(type) { function getItemCssClass(type) {
@@ -49,7 +49,7 @@ function listContent(item, title, listItemPrinter) {
} ?> } ?>
<li class="item item-<?js= item.type ?><?js= obj.classes || '' ?>" data-longname="<?js= item.longname ?>" data-name="<?js= item.prettyname.toLowerCase() ?>"> <li class="item item-<?js= item.type ?><?js= obj.classes || '' ?>" data-longname="<?js= item.longname ?>" data-name="<?js= item.prettyname.toLowerCase() ?>">
<span class="title toggle"> <span class="title toggle">
<span class="fa <?js= getItemCssClass(item.type) ?> mr-2 mt-1"></span> <span class="fa <?js= getItemCssClass(item.type) ?> me-2 mt-1"></span>
<span><?js= self.linkto(item.longname, item.prettyname.replace(/[.~\/]/g, '\u200b$&')) ?></span> <span><?js= self.linkto(item.longname, item.prettyname.replace(/[.~\/]/g, '\u200b$&')) ?></span>
</span><?js </span><?js
listContent(item, 'Members', printListItem); listContent(item, 'Members', printListItem);

View File

@@ -8,7 +8,7 @@
<th>Name</th> <th>Name</th>
<th>Type</th> <th>Type</th>
<th>Settable</th> <th>Settable</th>
<th><a href="module-ol_Object.ObjectEvent.html">ol/Object.ObjectEvent</a> type</th> <th><a href="module-ol_Object.ObjectEvent.html">ObjectEvent</a> type</th>
<th class="last">Description</th> <th class="last">Description</th>
</tr> </tr>
</thead> </thead>

View File

@@ -1,11 +1,11 @@
<?js <?js
var params = obj; var params = obj;
/* sort subparams under their parent params (like opts.classname) */ /* sort subparams under their parent params (like opts.classname) */
var parentParam = null; var parentParam = null;
params.forEach(function(param, i) { params.forEach(function(param, i) {
if (!param) { return; } if (!param) { return; }
if ( parentParam && param.name && param.name.indexOf(parentParam.name + '.') === 0 ) { if (parentParam && param.name && param.name.startsWith(parentParam.name + '.')) {
param.name = param.name.substr(parentParam.name.length+1); param.name = param.name.substr(parentParam.name.length+1);
parentParam.subparams = parentParam.subparams || []; parentParam.subparams = parentParam.subparams || [];
parentParam.subparams.push(param); parentParam.subparams.push(param);
@@ -15,30 +15,30 @@
parentParam = param; parentParam = param;
} }
}); });
/* determine if we need extra "attributes" column */ /* determine if we need extra "attributes" column */
params.hasAttributes = false; params.hasAttributes = false;
params.hasName = false; params.hasName = false;
var colspan = 2; var colspan = 2;
params.forEach(function(param) { params.forEach(function(param) {
if (!param) { return; } if (!param) { return; }
if (param.type && param.type.names && param.type.names.indexOf('undefined') !== -1) { if (param.type && param.type.names && param.type.names.includes('undefined')) {
param.optional = true; param.optional = true;
} }
if (param.name.indexOf('var_') == 0) { if (param.name.startsWith('var_')) {
params.hasAttributes = true; params.hasAttributes = true;
param.variable = true; param.variable = true;
} }
if (param.optional || param.nullable) { if (param.optional || param.nullable) {
params.hasAttributes = true; params.hasAttributes = true;
} }
if (param.name) { if (param.name) {
params.hasName = true; params.hasName = true;
} }
}); });
?> ?>
@@ -48,29 +48,45 @@
<?js if (params.hasName) {?> <?js if (params.hasName) {?>
<th>Name</th> <th>Name</th>
<?js } ?> <?js } ?>
<th>Type</th> <th>Type</th>
<th class="last">Description</th> <th class="last">Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?js <?js
var self = this; var self = this;
if (params[0].name === 'options' && params[0].subparams) {
var onlyOptions = true;
for (var i = 1; i < params.length; ++i) {
if (params[i]) {
onlyOptions = false;
break;
}
}
if (onlyOptions) {
var hasName = params.hasName;
params = params[0].subparams;
params.hasName = hasName;
}
}
params.forEach(function(param) { params.forEach(function(param) {
if (!param) { return; } if (!param) { return; }
?> ?>
<tr class="<?js= (param.stability && param.stability !== 'stable') ? 'unstable' : '' ?>"> <tr class="<?js= (param.stability && param.stability !== 'stable') ? 'unstable' : '' ?>">
<?js if (params.hasName) {?> <?js if (params.hasName) {?>
<td class="name"><code><?js= param.name.replace(/^opt_/, "") ?></code></td> <td class="name"><code><?js= param.name ?></code></td>
<?js } ?> <?js } ?>
<?js if (!param.subparams) {?> <?js if (!param.subparams) {?>
<td class="type"> <td class="type">
<?js if (param.type && param.type.names) {?> <?js if (param.type && param.type.names) {?>
<?js= self.partial('type.tmpl', param.type.names) + (param.optional && typeof param.defaultvalue === 'undefined' && param.type.names.indexOf('undefined') === -1 ? ' | undefined' : '') ?> <?js= self.partial('type.tmpl', param.type.names) + (param.optional && typeof param.defaultvalue === 'undefined' && !param.type.names.includes('undefined') ? ' | undefined' : '') ?>
<?js if (typeof param.defaultvalue !== 'undefined') { ?> <?js if (typeof param.defaultvalue !== 'undefined') { ?>
(defaults to <?js= self.htmlsafe(param.defaultvalue) ?>) (defaults to <?js= self.htmlsafe(param.defaultvalue) ?>)
<?js } ?> <?js } ?>
@@ -87,7 +103,7 @@
<?js= self.partial('params.tmpl', param.subparams) ?> <?js= self.partial('params.tmpl', param.subparams) ?>
<?js } ?></td> <?js } ?></td>
</tr> </tr>
<?js }); ?> <?js }); ?>
</tbody> </tbody>
</table> </table>

View File

@@ -1,11 +1,11 @@
<?js <?js
var props = obj; var props = obj;
/* sort subprops under their parent props (like opts.classname) */ /* sort subprops under their parent props (like opts.classname) */
var parentProp = null; var parentProp = null;
props.forEach(function(prop, i) { props.forEach(function(prop, i) {
if (!prop) { return; } if (!prop) { return; }
if ( parentProp && prop.name && prop.name.indexOf(parentProp.name + '.') === 0 ) { if (parentProp && prop.name && prop.name.startsWith(parentProp.name + '.')) {
prop.name = prop.name.substr(parentProp.name.length+1); prop.name = prop.name.substr(parentProp.name.length+1);
parentProp.subprops = parentProp.subprops || []; parentProp.subprops = parentProp.subprops || [];
parentProp.subprops.push(prop); parentProp.subprops.push(prop);
@@ -15,23 +15,23 @@
parentProp = prop; parentProp = prop;
} }
}); });
/* determine if we need extra columns, "attributes" and "default" */ /* determine if we need extra columns, "attributes" and "default" */
props.hasAttributes = false; props.hasAttributes = false;
props.hasDefault = false; props.hasDefault = false;
props.hasName = false; props.hasName = false;
props.forEach(function(prop) { props.forEach(function(prop) {
if (!prop) { return; } if (!prop) { return; }
if (prop.optional || prop.nullable) { if (prop.optional || prop.nullable) {
props.hasAttributes = true; props.hasAttributes = true;
} }
if (prop.name) { if (prop.name) {
props.hasName = true; props.hasName = true;
} }
if (typeof prop.defaultvalue !== 'undefined') { if (typeof prop.defaultvalue !== 'undefined') {
props.hasDefault = true; props.hasDefault = true;
} }
@@ -44,51 +44,51 @@
<?js if (props.hasName) {?> <?js if (props.hasName) {?>
<th>Name</th> <th>Name</th>
<?js } ?> <?js } ?>
<th>Type</th> <th>Type</th>
<?js if (props.hasAttributes) {?> <?js if (props.hasAttributes) {?>
<th>Argument</th> <th>Argument</th>
<?js } ?> <?js } ?>
<?js if (props.hasDefault) {?> <?js if (props.hasDefault) {?>
<th>Default</th> <th>Default</th>
<?js } ?> <?js } ?>
<th class="last">Description</th> <th class="last">Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?js <?js
var self = this; var self = this;
props.forEach(function(prop) { props.forEach(function(prop) {
if (!prop) { return; } if (!prop) { return; }
?> ?>
<tr> <tr>
<?js if (props.hasName) {?> <?js if (props.hasName) {?>
<td class="name"><code><?js= prop.name ?></code></td> <td class="name"><code><?js= prop.name ?></code></td>
<?js } ?> <?js } ?>
<td class="type"> <td class="type">
<?js if (prop.type && prop.type.names) {?> <?js if (prop.type && prop.type.names) {?>
<?js= self.partial('type.tmpl', prop.type.names) ?> <?js= self.partial('type.tmpl', prop.type.names) ?>
<?js } ?> <?js } ?>
</td> </td>
<?js if (props.hasAttributes) {?> <?js if (props.hasAttributes) {?>
<td class="attributes"> <td class="attributes">
<?js if (prop.optional) { ?> <?js if (prop.optional) { ?>
&lt;optional><br> &lt;optional><br>
<?js } ?> <?js } ?>
<?js if (prop.nullable) { ?> <?js if (prop.nullable) { ?>
&lt;nullable><br> &lt;nullable><br>
<?js } ?> <?js } ?>
</td> </td>
<?js } ?> <?js } ?>
<?js if (props.hasDefault) {?> <?js if (props.hasDefault) {?>
<td class="default"> <td class="default">
<?js if (typeof prop.defaultvalue !== 'undefined') { ?> <?js if (typeof prop.defaultvalue !== 'undefined') { ?>
@@ -96,12 +96,12 @@
<?js } ?> <?js } ?>
</td> </td>
<?js } ?> <?js } ?>
<td class="description last"><?js= prop.description ?><?js if (prop.subprops) { ?> <td class="description last"><?js= prop.description ?><?js if (prop.subprops) { ?>
<h6>Properties</h6><?js= self.partial('properties.tmpl', prop.subprops) ?> <h6>Properties</h6><?js= self.partial('properties.tmpl', prop.subprops) ?>
<?js } ?></td> <?js } ?></td>
</tr> </tr>
<?js }); ?> <?js }); ?>
</tbody> </tbody>
</table> </table>

View File

@@ -10,9 +10,9 @@ returns.forEach(function (ret, i) {
var name = ret.name || ret.description; var name = ret.name || ret.description;
var startSpacePos = name.indexOf(" "); var startSpacePos = name.indexOf(" ");
if (parentReturn !== null && name.indexOf(parentReturn.name + '.') === 0) { if (parentReturn !== null && name.startsWith(parentReturn.name + '.')) {
ret.name = isNamed ? name.substr(parentReturn.name.length + 1) : name.substr(parentReturn.name.length + 1, startSpacePos - (parentReturn.name.length + 1)); ret.name = isNamed ? name.substr(parentReturn.name.length + 1) : name.substr(parentReturn.name.length + 1, startSpacePos - (parentReturn.name.length + 1));
parentReturn.subReturns = parentReturn.subReturns || []; parentReturn.subReturns = parentReturn.subReturns || [];
parentReturn.subReturns.push(ret); parentReturn.subReturns.push(ret);
returns[i] = null; returns[i] = null;
@@ -20,7 +20,7 @@ returns.forEach(function (ret, i) {
if (!isNamed) { if (!isNamed) {
ret.name = ret.description.substr(0, startSpacePos !== -1 ? startSpacePos : ret.description.length); ret.name = ret.description.substr(0, startSpacePos !== -1 ? startSpacePos : ret.description.length);
} }
parentReturn = ret; parentReturn = ret;
} }
} }
@@ -52,9 +52,9 @@ if (returns.length > 1) {
<?js <?js
if (ret.type && ret.type.names) { if (ret.type && ret.type.names) {
ret.type.names.forEach(function(name, i) { ?> ret.type.names.forEach(function(name, i) { ?>
<?js= self.linkto(name, self.htmlsafe(name)) ?> <?js= self.linkto(name) ?>
<?js if (i < ret.type.names.length-1) { ?> | <?js } ?> <?js if (i < ret.type.names.length-1) { ?> | <?js } ?>
<?js }); <?js });
} }
?> ?>
</td> </td>

View File

@@ -2,6 +2,6 @@
var data = obj; var data = obj;
var self = this; var self = this;
data.forEach(function(name, i) { ?> data.forEach(function(name, i) { ?>
<span class="param-type"><?js= self.linkto(name, self.htmlsafe(name)) ?></span> <span class="param-type"><?js= self.linkto(name) ?></span>
<?js if (i < data.length-1) { ?>|<?js } ?> <?js if (i < data.length-1) { ?>|<?js } ?>
<?js }); ?> <?js }); ?>

View File

@@ -14,11 +14,7 @@ const path = require('path');
*/ */
exports.publish = function (data, opts) { exports.publish = function (data, opts) {
function getTypes(data) { function getTypes(data) {
const types = []; return data.map((name) => name.replace(/^function$/, 'Function'));
data.forEach(function (name) {
types.push(name.replace(/^function$/, 'Function'));
});
return types;
} }
// get all doclets that have exports // get all doclets that have exports
@@ -34,7 +30,7 @@ exports.publish = function (data, opts) {
return ( return (
this.meta && this.meta &&
this.meta.path && this.meta.path &&
this.longname.indexOf('<anonymous>') !== 0 && !this.longname.startsWith('<anonymous>') &&
this.longname !== 'module:ol' this.longname !== 'module:ol'
); );
}, },
@@ -59,7 +55,7 @@ exports.publish = function (data, opts) {
if ( if (
constructor && constructor &&
constructor.substr(-1) === '_' && constructor.substr(-1) === '_' &&
constructor.indexOf('module:') === -1 !constructor.includes('module:')
) { ) {
assert.strictEqual( assert.strictEqual(
doc.inherited, doc.inherited,

View File

@@ -37,7 +37,7 @@ function includeAugments(doclet) {
if (doclet.fires && cls.fires) { if (doclet.fires && cls.fires) {
for (let i = 0, ii = cls.fires.length; i < ii; ++i) { for (let i = 0, ii = cls.fires.length; i < ii; ++i) {
const fires = cls.fires[i]; const fires = cls.fires[i];
if (doclet.fires.indexOf(fires) == -1) { if (!doclet.fires.includes(fires)) {
doclet.fires.push(fires); doclet.fires.push(fires);
} }
} }
@@ -58,7 +58,7 @@ function includeAugments(doclet) {
doclet.fires = []; doclet.fires = [];
} }
cls.fires.forEach(function (f) { cls.fires.forEach(function (f) {
if (doclet.fires.indexOf(f) == -1) { if (!doclet.fires.includes(f)) {
doclet.fires.push(f); doclet.fires.push(f);
} }
}); });
@@ -68,7 +68,7 @@ function includeAugments(doclet) {
doclet.observables = []; doclet.observables = [];
} }
cls.observables.forEach(function (f) { cls.observables.forEach(function (f) {
if (doclet.observables.indexOf(f) == -1) { if (!doclet.observables.includes(f)) {
doclet.observables.push(f); doclet.observables.push(f);
} }
}); });
@@ -81,10 +81,10 @@ function includeAugments(doclet) {
function extractTypes(item) { function extractTypes(item) {
item.type.names.forEach(function (type) { item.type.names.forEach(function (type) {
const match = type.match(/^(.*<)?([^>]*)>?$/); const match = type.match(/^(?:.*<)?([^>]*)>?$/);
if (match) { if (match) {
modules[match[2]] = true; modules[match[1]] = true;
types[match[2]] = true; types[match[1]] = true;
} }
}); });
} }

View File

@@ -76,7 +76,7 @@ function shouldProcessString(tagName, text) {
let shouldProcess = true; let shouldProcess = true;
// we only want to process `@author` and `@see` tags that contain Markdown links // we only want to process `@author` and `@see` tags that contain Markdown links
if ((tagName === 'author' || tagName === 'see') && text.indexOf('[') === -1) { if ((tagName === 'author' || tagName === 'see') && !text.includes('[')) {
shouldProcess = false; shouldProcess = false;
} }

View File

@@ -29,10 +29,10 @@ exports.handlers = {
observable.name = name; observable.name = name;
observable.readonly = observable.readonly =
typeof observable.readonly == 'boolean' ? observable.readonly : true; typeof observable.readonly == 'boolean' ? observable.readonly : true;
if (doclet.name.indexOf('get') === 0) { if (doclet.name.startsWith('get')) {
observable.type = doclet.returns[0].type; observable.type = doclet.returns[0].type;
observable.description = doclet.returns[0].description; observable.description = doclet.returns[0].description;
} else if (doclet.name.indexOf('set') === 0) { } else if (doclet.name.startsWith('set')) {
observable.readonly = false; observable.readonly = false;
} }
if (doclet.stability) { if (doclet.stability) {
@@ -42,14 +42,14 @@ exports.handlers = {
cls.observables = []; cls.observables = [];
} }
observable = observables[doclet.observable]; observable = observables[doclet.observable];
if (observable.type && cls.observables.indexOf(observable) == -1) { if (observable.type && !cls.observables.includes(observable)) {
cls.observables.push(observable); cls.observables.push(observable);
} }
if (!cls.fires) { if (!cls.fires) {
cls.fires = []; cls.fires = [];
} }
event = 'module:ol/Object.ObjectEvent#event:change:' + name; event = 'module:ol/Object.ObjectEvent#event:change:' + name;
if (cls.fires.indexOf(event) == -1) { if (!cls.fires.includes(event)) {
cls.fires.push(event); cls.fires.push(event);
} }
} }

View File

@@ -0,0 +1,24 @@
import commonjs from '@rollup/plugin-commonjs';
import externalGlobals from 'rollup-plugin-external-globals';
import resolve from '@rollup/plugin-node-resolve';
import {terser} from 'rollup-plugin-terser';
export default {
input: 'build/index.js',
output: {
name: 'ol',
format: 'iife',
exports: 'default',
file: 'build/full/ol.js',
sourcemap: true,
},
plugins: [
resolve({moduleDirectories: ['build', 'node_modules']}),
commonjs(),
externalGlobals({
geotiff: 'GeoTIFF',
'ol-mapbox-style': 'olms',
}),
terser(),
],
};

View File

@@ -1,8 +1,8 @@
{ {
"compilerOptions": { "compilerOptions": {
/* Basic Options */ /* Basic Options */
"target": "ES5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ "target": "es2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ "module": "es2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */ // "lib": [], /* Specify library files to be included in the compilation. */
"allowJs": true, /* Allow javascript files to be compiled. */ "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */ // "checkJs": true, /* Report errors in .js files. */
@@ -58,7 +58,7 @@
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
}, },
"include": [ "include": [
"../build/ol/src/**/*.js" "../build/ol/**/*.js"
], ],
"exclude": [] "exclude": []
} }

View File

@@ -1,57 +0,0 @@
import TerserPlugin from 'terser-webpack-plugin';
import path from 'path';
export default {
entry: ['regenerator-runtime/runtime', './build/index.js'],
devtool: 'source-map',
mode: 'production',
target: ['web', 'es5'],
module: {
rules: [
{
test: /\.m?js$/,
use: {
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
targets: 'last 2 versions, not dead',
},
],
],
},
},
},
],
},
resolve: {
fallback: {
fs: false,
http: false,
https: false,
},
alias: {
ol: path.resolve('./build/ol'),
},
},
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
// Mangle private members convention with underscore suffix
mangle: {properties: {regex: /_$/}},
},
}),
],
},
output: {
path: path.resolve('./build/legacy'),
publicPath: 'auto',
filename: 'ol.js',
library: 'ol',
libraryTarget: 'umd',
libraryExport: 'default',
},
};

View File

@@ -1,145 +0,0 @@
---
title: Quick Start
layout: doc.hbs
---
# Quick Start
This primer shows you how to put a simple map on a web page.
**For production, we strongly recommend bundling the application together with its dependencies, as explained in the [Building an OpenLayers Application](./tutorials/bundle.html) tutorial.**
## Put a map on a page
Below you'll find a complete working example. Create a new file, copy in the contents below, and open in a browser:
```xml
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/{{ latest }}/css/ol.css" type="text/css">
<style>
.map {
height: 400px;
width: 100%;
}
</style>
<script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/{{ latest }}/build/ol.js"></script>
<title>OpenLayers example</title>
</head>
<body>
<h2>My Map</h2>
<div id="map" class="map"></div>
<script type="text/javascript">
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
view: new ol.View({
center: ol.proj.fromLonLat([37.41, 8.82]),
zoom: 4
})
});
</script>
</body>
</html>
```
## Understanding what is going on
To include a map a web page you will need 3 things:
1. Include OpenLayers
2. `<div>` map container
3. JavaScript to create a simple map
### Include OpenLayers
```xml
<script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/{{ latest }}/build/ol.js"></script>
```
The first part is to include the JavaScript library. For the purpose of this tutorial, here we simply point to the openlayers.org website to get the whole library. In a production environment, we would build a custom version of the library including only the module needed for our application.
**Optional:** If the application is intended to run on old platforms like Internet Explorer or Android 4.x, another script needs to be included before OpenLayers:
```xml
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList"></script>
```
### `<div>` to contain the map
```xml
<div id="map" class="map"></div>
```
The map in the application is contained in a [`<div>` HTML element](https://en.wikipedia.org/wiki/Span_and_div). Through this `<div>` the map properties like width, height and border can be controlled through CSS. Here's the CSS element used to make the map 400 pixels high and as wide as the browser window.
```xml
<style>
.map {
height: 400px;
width: 100%;
}
</style>
```
### JavaScript to create a simple map
```js
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
view: new ol.View({
center: ol.proj.fromLonLat([37.41, 8.82]),
zoom: 4
})
});
```
With this JavaScript code, a map object is created with an OSM layer zoomed on the African East coast. Let's break this down:
The following line creates an OpenLayers `Map` object. Just by itself, this does nothing since there's no layers or interaction attached to it.
```js
var map = new ol.Map({ ... });
```
To attach the map object to the `<div>`, the map object takes a `target` into arguments. The value is the `id` of the `<div>`:
```js
target: 'map'
```
The `layers: [ ... ]` array is used to define the list of layers available in the map. The first and only layer right now is a tiled layer:
```js
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
]
```
Layers in OpenLayers are defined with a type (Image, Tile or Vector) which contains a source. The source is the protocol used to get the map tiles.
The next part of the `Map` object is the `View`. The view allows to specify the center, resolution, and rotation of the map. The simplest way to define a view is to define a center point and a zoom level. Note that zoom level 0 is zoomed out.
```js
view: new ol.View({
center: ol.proj.fromLonLat([37.41, 8.82]),
zoom: 4
})
```
You will notice that the `center` specified is in lon/lat coordinates (EPSG:4326). Since the only layer we use is in Spherical Mercator projection (EPSG:3857), we can reproject them on the fly to be able to zoom the map on the right coordinates.

View File

@@ -1,32 +0,0 @@
---
title: Basic project setup using NPM and Vite
layout: doc.hbs
---
# Introduction
Modern JavaScript works best when using and authoring modules. The recommended way of using OpenLayers is installing the [`ol`](https://npmjs.com/package/ol) package. This tutorial walks you through setting up a simple dev environment, which requires [node](https://nodejs.org) for everything to work.
In this tutorial, we will be using [Vite](https://vitejs.dev/) as a development tool and to bundle our application for production. There are several other options, some of which are linked from the [README](https://npmjs.com/package/ol).
## Application setup
Create a new empty directory for your project and navigate to it by running `mkdir new-project && cd new-project`. Initialize your project with
npx create-ol-app
*You will need to have `git` installed for the above command to work. If you receive an error, make sure that [Git is installed](https://github.com/git-guides/install-git) on your system.*
This will install the `ol` package, set up a development environment with additional dependencies, and give you an `index.html` and `main.js` starting point for your application. By default, [Vite](https://vitejs.dev/) will be used as a module loader and bundler. See the [`create-ol-app`](https://github.com/openlayers/create-ol-app) documentation for details on using another bundler.
To start the development server
npm start
You can now visit http://localhost:3000/ to view your application. Begin making changes to the `index.html` and `main.js` files to add additional functionality.
To create a production bundle of your application, simply type
npm run build
and copy the `dist/` folder to your production server.

View File

@@ -2,14 +2,15 @@
"globals": { "globals": {
"$": false, "$": false,
"arc": false, "arc": false,
"common": false, "bootstrap": false,
"chroma": false, "chroma": false,
"common": false,
"createMapboxStreetsV6Style": false, "createMapboxStreetsV6Style": false,
"d3": false, "d3": false,
"html2canvas": false,
"geojsonvt": false, "geojsonvt": false,
"gifler": false, "gifler": false,
"GyroNorm": false, "GyroNorm": false,
"html2canvas": false,
"jspdf": false, "jspdf": false,
"jsts": false, "jsts": false,
"JSZip": false, "JSZip": false,

View File

@@ -1,3 +0,0 @@
.tooltip-inner {
white-space: nowrap;
}

View File

@@ -3,12 +3,11 @@ layout: example.html
title: Custom Tooltips title: Custom Tooltips
shortdesc: This example shows how to customize the buttons tooltips with Bootstrap. shortdesc: This example shows how to customize the buttons tooltips with Bootstrap.
docs: > docs: >
This example shows how to customize the buttons tooltips with <a href="https://getbootstrap.com/docs/4.5/components/tooltips/">Bootstrap</a>. This example shows how to customize the buttons tooltips with <a href="https://getbootstrap.com/docs/5.2/components/tooltips/">Bootstrap</a>.
For the tooltips to work in fullscreen mode, set the container property to a selector that matches the map target. For the tooltips to work in fullscreen mode, set the container property to a selector that matches the map target.
tags: "custom, tooltip" tags: "custom, tooltip"
resources: resources:
- https://code.jquery.com/jquery-3.5.1.min.js - https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css - https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>

View File

@@ -17,11 +17,10 @@ const map = new Map({
}), }),
}); });
$('.ol-zoom-in, .ol-zoom-out').tooltip({ document
placement: 'right', .querySelectorAll('.ol-zoom-in, .ol-zoom-out, .ol-rotate-reset')
container: '#map', .forEach(function (el) {
}); new bootstrap.Tooltip(el, {
$('.ol-rotate-reset, .ol-attribution button[title]').tooltip({ container: '#map',
placement: 'left', });
container: '#map', });
});

View File

@@ -4,7 +4,6 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import {DEVICE_PIXEL_RATIO} from '../src/ol/has.js'; import {DEVICE_PIXEL_RATIO} from '../src/ol/has.js';
import {Fill, Stroke, Style} from '../src/ol/style.js';
import {fromLonLat} from '../src/ol/proj.js'; import {fromLonLat} from '../src/ol/proj.js';
// Gradient and pattern are in canvas pixel space, so we adjust for the // Gradient and pattern are in canvas pixel space, so we adjust for the
@@ -29,13 +28,11 @@ const vectorLayer = new VectorLayer({
url: 'data/kml/states.kml', url: 'data/kml/states.kml',
format: new KML({extractStyles: false}), format: new KML({extractStyles: false}),
}), }),
style: new Style({ style: {
fill: new Fill({color: gradient}), 'fill-color': gradient,
stroke: new Stroke({ 'stroke-width': 1,
color: '#333', 'stroke-color': '#333',
width: 1, },
}),
}),
}); });
const map = new Map({ const map = new Map({

View File

@@ -5,22 +5,21 @@ shortdesc: Example of a cartodb map.
docs: > docs: >
A simple example with an anonymous cartodb map A simple example with an anonymous cartodb map
tags: "simple, openstreetmap, attribution" tags: "simple, openstreetmap, attribution"
resources:
- https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css
--- ---
<div class="row-fluid"> <div id="map" class="map"></div>
<div class="span12"> <form class="row">
<div id="map" class="map"></div> <div class="col-auto">
<div> <div class="input-group">
<form class="form-horizontal"> <label for="country-area" class="input-group-text">Show european countries larger than</label>
<label> <select id="country-area" class="form-select">
Show countries larger than <option value="0" default>0 ㎢</option>
<select id="country-area" class="form-control"> <option value="5000">5000 ㎢</option>
<option value="0" default>0 ㎢</option> <option value="10000">10000 ㎢</option>
<option value="5000">5000 ㎢</option> <option value="50000">50000</option>
<option value="10000">10000 ㎢</option> <option value="100000">100000</option>
<option value="50000">50000 ㎢</option> </select>
<option value="100000">100000 ㎢</option> </div>
</select>
</label>
</form>
</div> </div>
</div> </form>

View File

@@ -10,17 +10,28 @@ const mapConfig = {
'options': { 'options': {
'cartocss_version': '2.1.1', 'cartocss_version': '2.1.1',
'cartocss': '#layer { polygon-fill: #F00; }', 'cartocss': '#layer { polygon-fill: #F00; }',
'sql': 'select * from european_countries_e where area > 0',
}, },
}, },
], ],
}; };
function setArea(n) {
mapConfig.layers[0].options.sql =
'select * from european_countries_e where area > ' + n;
}
const areaSelect = document.getElementById('country-area');
setArea(areaSelect.value);
const cartoDBSource = new CartoDB({ const cartoDBSource = new CartoDB({
account: 'documentation', account: 'documentation',
config: mapConfig, config: mapConfig,
}); });
areaSelect.addEventListener('change', function () {
setArea(this.value);
cartoDBSource.setConfig(mapConfig);
});
const map = new Map({ const map = new Map({
layers: [ layers: [
new TileLayer({ new TileLayer({
@@ -32,17 +43,7 @@ const map = new Map({
], ],
target: 'map', target: 'map',
view: new View({ view: new View({
center: [0, 0], center: [8500000, 8500000],
zoom: 2, zoom: 2,
}), }),
}); });
function setArea(n) {
mapConfig.layers[0].options.sql =
'select * from european_countries_e where area > ' + n;
cartoDBSource.setConfig(mapConfig);
}
document.getElementById('country-area').addEventListener('change', function () {
setArea(this.value);
});

View File

@@ -1,38 +1,27 @@
import GeoJSON from '../src/ol/format/GeoJSON.js'; import GeoJSON from '../src/ol/format/GeoJSON.js';
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
/** @type {VectorSource<import("../src/ol/geom/SimpleGeometry.js").default>} */
const source = new VectorSource({ const source = new VectorSource({
url: 'data/geojson/switzerland.geojson', url: 'data/geojson/switzerland.geojson',
format: new GeoJSON(), format: new GeoJSON(),
}); });
const style = new Style({
fill: new Fill({
color: 'rgba(255, 255, 255, 0.6)',
}),
stroke: new Stroke({
color: '#319FD3',
width: 1,
}),
image: new CircleStyle({
radius: 5,
fill: new Fill({
color: 'rgba(255, 255, 255, 0.6)',
}),
stroke: new Stroke({
color: '#319FD3',
width: 1,
}),
}),
});
const vectorLayer = new VectorLayer({ const vectorLayer = new VectorLayer({
source: source, source: source,
style: style, style: {
'fill-color': 'rgba(255, 255, 255, 0.6)',
'stroke-width': 1,
'stroke-color': '#319FD3',
'circle-radius': 5,
'circle-fill-color': 'rgba(255, 255, 255, 0.6)',
'circle-stroke-width': 1,
'circle-stroke-color': '#319FD3',
},
}); });
const view = new View({ const view = new View({
center: [0, 0], center: [0, 0],
zoom: 1, zoom: 1,

View File

@@ -12,7 +12,7 @@ docs: >
tags: "smooth, smoothing, chaikin" tags: "smooth, smoothing, chaikin"
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>
<form class="form-inline"> <form>
<label for="shall-smoothen">Smooth drawn geometry?</label> <label for="shall-smoothen">Smooth drawn geometry?</label>
<input id="shall-smoothen" type="checkbox" checked><br> <input id="shall-smoothen" type="checkbox" checked><br>
<label for="iterations">Number of smoothings</label> <label for="iterations">Number of smoothings</label>

View File

@@ -5,19 +5,21 @@ shortdesc: Example of using ol/source/Cluster.
docs: > docs: >
This example shows how to do clustering on point features. This example shows how to do clustering on point features.
tags: "cluster, vector" tags: "cluster, vector"
resources:
- https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>
<form> <form>
<div class="form-group"> <div class="form-group">
<label for="distance" class="col-form-label">Cluster distance</label> <label for="distance" class="col-form-label pb-0">Cluster distance</label>
<input id="distance" class="form-control-range" type="range" min="0" max="200" step="1" value="40"/> <input id="distance" class="form-range" type="range" min="0" max="200" step="1" value="40"/>
<small class="form-text text-muted"> <small class="form-text text-muted">
The distance within which features will be clustered together. The distance within which features will be clustered together.
</small> </small>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="min-distance" class="col-form-label">Minimum distance</label> <label for="min-distance" class="col-form-label pb-0">Minimum distance</label>
<input id="min-distance" class="form-control-range" type="range" min="0" max="200" step="1" value="20"/> <input id="min-distance" class="form-range" type="range" min="0" max="200" step="1" value="20"/>
<small class="form-text text-muted"> <small class="form-text text-muted">
The minimum distance between clusters. Can't be larger than the configured distance. The minimum distance between clusters. Can't be larger than the configured distance.
</small> </small>

View File

@@ -77,17 +77,13 @@ const map = new Map({
}), }),
}); });
const distanceHandler = function () { distanceInput.addEventListener('input', function () {
clusterSource.setDistance(parseInt(distanceInput.value, 10)); clusterSource.setDistance(parseInt(distanceInput.value, 10));
}; });
distanceInput.addEventListener('input', distanceHandler);
distanceInput.addEventListener('change', distanceHandler);
const minDistanceHandler = function () { minDistanceInput.addEventListener('input', function () {
clusterSource.setMinDistance(parseInt(minDistanceInput.value, 10)); clusterSource.setMinDistance(parseInt(minDistanceInput.value, 10));
}; });
minDistanceInput.addEventListener('input', minDistanceHandler);
minDistanceInput.addEventListener('change', minDistanceHandler);
map.on('click', (e) => { map.on('click', (e) => {
clusters.getFeatures(e.pixel).then((clickedFeatures) => { clusters.getFeatures(e.pixel).then((clickedFeatures) => {

10
examples/cog-blob.html Normal file
View File

@@ -0,0 +1,10 @@
---
layout: example.html
title: Cloud Optimized GeoTIFF (COG) from a Blob
shortdesc: Rendering a COG as a tiled layer from a Blob.
docs: >
Tiled data from a Cloud Optimized GeoTIFF (COG) can be rendered as a layer. In this
example, a single 3-band GeoTIFF is used to render RGB data from a Blob.
tags: "cog"
---
<div id="map" class="map"></div>

28
examples/cog-blob.js Normal file
View File

@@ -0,0 +1,28 @@
import GeoTIFF from '../src/ol/source/GeoTIFF.js';
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/WebGLTile.js';
fetch('data/example.tif')
.then((response) => response.blob())
.then((blob) => {
const source = new GeoTIFF({
sources: [
{
blob: blob,
},
],
});
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: source,
}),
],
view: source.getView().then((viewConfig) => {
viewConfig.showFullExtent = true;
return viewConfig;
}),
});
});

View File

@@ -166,12 +166,10 @@ const controlIds = ['hue', 'chroma', 'lightness'];
controlIds.forEach(function (id) { controlIds.forEach(function (id) {
const control = document.getElementById(id); const control = document.getElementById(id);
const output = document.getElementById(id + 'Out'); const output = document.getElementById(id + 'Out');
const listener = function () { control.addEventListener('input', function () {
output.innerText = control.value; output.innerText = control.value;
raster.changed(); raster.changed();
}; });
control.addEventListener('input', listener);
control.addEventListener('change', listener);
output.innerText = control.value; output.innerText = control.value;
controls[id] = control; controls[id] = control;
}); });

View File

@@ -1,7 +1,6 @@
import Feature from '../src/ol/Feature.js'; import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import {Fill, Icon, Stroke, Style} from '../src/ol/style.js';
import {LineString, Point, Polygon} from '../src/ol/geom.js'; import {LineString, Point, Polygon} from '../src/ol/geom.js';
import { import {
Pointer as PointerInteraction, Pointer as PointerInteraction,
@@ -147,22 +146,16 @@ const map = new Map({
source: new VectorSource({ source: new VectorSource({
features: [pointFeature, lineFeature, polygonFeature], features: [pointFeature, lineFeature, polygonFeature],
}), }),
style: new Style({ style: {
image: new Icon({ 'icon-src': 'data/icon.png',
anchor: [0.5, 46], 'icon-opacity': 0.95,
anchorXUnits: 'fraction', 'icon-anchor': [0.5, 46],
anchorYUnits: 'pixels', 'icon-anchor-x-units': 'fraction',
opacity: 0.95, 'icon-anchor-y-units': 'pixels',
src: 'data/icon.png', 'stroke-width': 3,
}), 'stroke-color': [255, 0, 0, 1],
stroke: new Stroke({ 'fill-color': [0, 0, 255, 0.6],
width: 3, },
color: [255, 0, 0, 1],
}),
fill: new Fill({
color: [0, 0, 255, 0.6],
}),
}),
}), }),
], ],
target: 'map', target: 'map',

View File

@@ -6,7 +6,7 @@ docs: >
The example loads TopoJSON geometries and uses d3 (<code>d3.geo.path</code>) to render these geometries to a SVG element. The example loads TopoJSON geometries and uses d3 (<code>d3.geo.path</code>) to render these geometries to a SVG element.
tags: "d3" tags: "d3"
resources: resources:
- https://unpkg.com/d3@6.7.0/dist/d3.min.js - https://unpkg.com/d3@7.4.4/dist/d3.min.js
- https://unpkg.com/topojson@3.0.2/dist/topojson.js - https://unpkg.com/topojson@3.0.2/dist/topojson.js
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>

3
examples/d3.js vendored
View File

@@ -1,5 +1,4 @@
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import SourceState from '../src/ol/source/State.js';
import Stamen from '../src/ol/source/Stamen.js'; import Stamen from '../src/ol/source/Stamen.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import {Layer, Tile as TileLayer} from '../src/ol/layer.js'; import {Layer, Tile as TileLayer} from '../src/ol/layer.js';
@@ -21,7 +20,7 @@ class CanvasLayer extends Layer {
} }
getSourceState() { getSourceState() {
return SourceState.READY; return 'ready';
} }
render(frameState) { render(frameState) {

File diff suppressed because it is too large Load Diff

BIN
examples/data/example.tif Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

File diff suppressed because one or more lines are too long

View File

@@ -5,38 +5,38 @@
<Style id="nStylem1200"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style> <Style id="nStylem1200"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style>
<Style id="nStylem1100"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style> <Style id="nStylem1100"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style>
<Style id="nStylem1000"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d20c939c</color></PolyStyle></Style> <Style id="nStylem1000"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d20c939c</color></PolyStyle></Style>
<Style id="nStylem0950"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style> <Style id="nStylem0950"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style>
<Style id="nStylem0900"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d299f7ff</color></PolyStyle></Style> <Style id="nStylem0900"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d299f7ff</color></PolyStyle></Style>
<Style id="nStylem0850"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style> <Style id="nStylem0850"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style>
<Style id="nStylem0800"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style> <Style id="nStylem0800"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style>
<Style id="nStylem0700"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style> <Style id="nStylem0700"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style>
<Style id="nStylem0600"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d20c939c</color></PolyStyle></Style> <Style id="nStylem0600"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d20c939c</color></PolyStyle></Style>
<Style id="nStylem0500"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d299f7ff</color></PolyStyle></Style> <Style id="nStylem0500"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d299f7ff</color></PolyStyle></Style>
<Style id="nStylem0400"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style> <Style id="nStylem0400"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style>
<Style id="nStylem0350"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style> <Style id="nStylem0350"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style>
<Style id="nStylem0300"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style> <Style id="nStylem0300"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style>
<Style id="nStylem0200"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d20c939c</color></PolyStyle></Style> <Style id="nStylem0200"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d20c939c</color></PolyStyle></Style>
<Style id="nStylem0100"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d299f7ff</color></PolyStyle></Style> <Style id="nStylem0100"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d299f7ff</color></PolyStyle></Style>
<Style id="nStyle0000"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style> <Style id="nStyle0000"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style>
<Style id="nStyle0100"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style> <Style id="nStyle0100"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style>
<Style id="nStyle0200"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d20c939c</color></PolyStyle></Style> <Style id="nStyle0200"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d20c939c</color></PolyStyle></Style>
<Style id="nStyle0300"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d299f7ff</color></PolyStyle></Style> <Style id="nStyle0300"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d299f7ff</color></PolyStyle></Style>
<Style id="nStyle0350"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style> <Style id="nStyle0350"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style>
<Style id="nStyle0400"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style> <Style id="nStyle0400"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style>
<Style id="nStyle0450"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2f8f6e2</color></PolyStyle></Style> <Style id="nStyle0450"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2f8f6e2</color></PolyStyle></Style>
<Style id="nStyle0500"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style> <Style id="nStyle0500"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style>
<Style id="nStyle0550"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style> <Style id="nStyle0550"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style>
<Style id="nStyle0575"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2f8f6e2</color></PolyStyle></Style> <Style id="nStyle0575"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2f8f6e2</color></PolyStyle></Style>
<Style id="nStyle0600"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d20c939c</color></PolyStyle></Style> <Style id="nStyle0600"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d20c939c</color></PolyStyle></Style>
<Style id="nStyle0650"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style> <Style id="nStyle0650"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style>
<Style id="nStyle0700"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d299f7ff</color></PolyStyle></Style> <Style id="nStyle0700"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d299f7ff</color></PolyStyle></Style>
<Style id="nStyle0800"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style> <Style id="nStyle0800"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style>
<Style id="nStyle0900"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style> <Style id="nStyle0900"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style>
<Style id="nStyle0950"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style> <Style id="nStyle0950"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style>
<Style id="nStyle1000"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d20c939c</color></PolyStyle></Style> <Style id="nStyle1000"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d20c939c</color></PolyStyle></Style>
<Style id="nStyle1050"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style> <Style id="nStyle1050"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style>
<Style id="nStyle1100"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d299f7ff</color></PolyStyle></Style> <Style id="nStyle1100"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d299f7ff</color></PolyStyle></Style>
<Style id="nStyle1150"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2f8f6e2</color></PolyStyle></Style> <Style id="nStyle1150"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2f8f6e2</color></PolyStyle></Style>
<Style id="nStyle1200"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style> <Style id="nStyle1200"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style>
<Style id="nStyle1275"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style> <Style id="nStyle1275"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d2eafeff</color></PolyStyle></Style>
@@ -44,38 +44,38 @@
<Style id="hStylem1200"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style> <Style id="hStylem1200"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style>
<Style id="hStylem1100"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style> <Style id="hStylem1100"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style>
<Style id="hStylem1000"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da0c939c</color></PolyStyle></Style> <Style id="hStylem1000"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da0c939c</color></PolyStyle></Style>
<Style id="hStylem0950"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style> <Style id="hStylem0950"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style>
<Style id="hStylem0900"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da99f7ff</color></PolyStyle></Style> <Style id="hStylem0900"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da99f7ff</color></PolyStyle></Style>
<Style id="hStylem0850"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style> <Style id="hStylem0850"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style>
<Style id="hStylem0800"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style> <Style id="hStylem0800"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style>
<Style id="hStylem0700"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style> <Style id="hStylem0700"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style>
<Style id="hStylem0600"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da0c939c</color></PolyStyle></Style> <Style id="hStylem0600"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da0c939c</color></PolyStyle></Style>
<Style id="hStylem0500"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da99f7ff</color></PolyStyle></Style> <Style id="hStylem0500"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da99f7ff</color></PolyStyle></Style>
<Style id="hStylem0400"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style> <Style id="hStylem0400"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style>
<Style id="hStylem0350"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style> <Style id="hStylem0350"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style>
<Style id="hStylem0300"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style> <Style id="hStylem0300"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style>
<Style id="hStylem0200"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da0c939c</color></PolyStyle></Style> <Style id="hStylem0200"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da0c939c</color></PolyStyle></Style>
<Style id="hStylem0100"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da99f7ff</color></PolyStyle></Style> <Style id="hStylem0100"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da99f7ff</color></PolyStyle></Style>
<Style id="hStyle0000"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style> <Style id="hStyle0000"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style>
<Style id="hStyle0100"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style> <Style id="hStyle0100"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style>
<Style id="hStyle0200"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da0c939c</color></PolyStyle></Style> <Style id="hStyle0200"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da0c939c</color></PolyStyle></Style>
<Style id="hStyle0300"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da99f7ff</color></PolyStyle></Style> <Style id="hStyle0300"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da99f7ff</color></PolyStyle></Style>
<Style id="hStyle0350"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style> <Style id="hStyle0350"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style>
<Style id="hStyle0400"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style> <Style id="hStyle0400"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style>
<Style id="hStyle0450"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daf8f6e2</color></PolyStyle></Style> <Style id="hStyle0450"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daf8f6e2</color></PolyStyle></Style>
<Style id="hStyle0500"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style> <Style id="hStyle0500"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style>
<Style id="hStyle0550"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style> <Style id="hStyle0550"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style>
<Style id="hStyle0575"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daf8f6e2</color></PolyStyle></Style> <Style id="hStyle0575"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daf8f6e2</color></PolyStyle></Style>
<Style id="hStyle0600"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da0c939c</color></PolyStyle></Style> <Style id="hStyle0600"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da0c939c</color></PolyStyle></Style>
<Style id="hStyle0650"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style> <Style id="hStyle0650"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style>
<Style id="hStyle0700"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da99f7ff</color></PolyStyle></Style> <Style id="hStyle0700"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da99f7ff</color></PolyStyle></Style>
<Style id="hStyle0800"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style> <Style id="hStyle0800"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style>
<Style id="hStyle0900"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style> <Style id="hStyle0900"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style>
<Style id="hStyle0950"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style> <Style id="hStyle0950"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style>
<Style id="hStyle1000"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da0c939c</color></PolyStyle></Style> <Style id="hStyle1000"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da0c939c</color></PolyStyle></Style>
<Style id="hStyle1050"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style> <Style id="hStyle1050"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style>
<Style id="hStyle1100"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da99f7ff</color></PolyStyle></Style> <Style id="hStyle1100"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da99f7ff</color></PolyStyle></Style>
<Style id="hStyle1150"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daf8f6e2</color></PolyStyle></Style> <Style id="hStyle1150"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daf8f6e2</color></PolyStyle></Style>
<Style id="hStyle1200"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style> <Style id="hStyle1200"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style>
<Style id="hStyle1275"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style> <Style id="hStyle1275"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>daeafeff</color></PolyStyle></Style>
@@ -398,7 +398,7 @@
</outerBoundaryIs> </outerBoundaryIs>
<tessellate>1</tessellate> <tessellate>1</tessellate>
</Polygon> </Polygon>
</MultiGeometry> </MultiGeometry>
</Placemark> </Placemark>
<Placemark> <Placemark>
<name>GMT -07:00</name> <name>GMT -07:00</name>
@@ -530,7 +530,7 @@
</MultiGeometry> </MultiGeometry>
</Placemark> </Placemark>
<Placemark> <Placemark>
<name>GMT -03.30</name> <name>GMT -03:30</name>
<description><![CDATA[<div style="width:300px;height:50px;" id="clock" ></div> <description><![CDATA[<div style="width:300px;height:50px;" id="clock" ></div>
<script language="JavaScript"> <script language="JavaScript">
var int=self.setInterval("tick()",50); var int=self.setInterval("tick()",50);
@@ -602,7 +602,7 @@
</innerBoundaryIs> </innerBoundaryIs>
<tessellate>1</tessellate> <tessellate>1</tessellate>
</Polygon> </Polygon>
</MultiGeometry> </MultiGeometry>
</Placemark> </Placemark>
<Placemark> <Placemark>
<name>GMT -02:00</name> <name>GMT -02:00</name>
@@ -640,7 +640,7 @@
</outerBoundaryIs> </outerBoundaryIs>
<tessellate>1</tessellate> <tessellate>1</tessellate>
</Polygon> </Polygon>
</MultiGeometry> </MultiGeometry>
</Placemark> </Placemark>
<Placemark> <Placemark>
<name>GMT -01:00</name> <name>GMT -01:00</name>
@@ -687,7 +687,7 @@
</outerBoundaryIs> </outerBoundaryIs>
<tessellate>1</tessellate> <tessellate>1</tessellate>
</Polygon> </Polygon>
</MultiGeometry> </MultiGeometry>
</Placemark> </Placemark>
<Placemark> <Placemark>
<name>GMT +00:00</name> <name>GMT +00:00</name>
@@ -799,7 +799,7 @@
</outerBoundaryIs> </outerBoundaryIs>
<tessellate>1</tessellate> <tessellate>1</tessellate>
</Polygon> </Polygon>
</MultiGeometry> </MultiGeometry>
</Placemark> </Placemark>
<Placemark> <Placemark>
<name>GMT +03:00</name> <name>GMT +03:00</name>
@@ -837,7 +837,7 @@
</outerBoundaryIs> </outerBoundaryIs>
<tessellate>1</tessellate> <tessellate>1</tessellate>
</Polygon> </Polygon>
</MultiGeometry> </MultiGeometry>
</Placemark> </Placemark>
<Placemark> <Placemark>
<name>GMT +03:30</name> <name>GMT +03:30</name>
@@ -1056,7 +1056,7 @@
</outerBoundaryIs> </outerBoundaryIs>
<tessellate>1</tessellate> <tessellate>1</tessellate>
</Polygon> </Polygon>
</MultiGeometry> </MultiGeometry>
</Placemark> </Placemark>
<Placemark> <Placemark>
<name>GMT +05:45</name> <name>GMT +05:45</name>
@@ -1537,7 +1537,7 @@
</outerBoundaryIs> </outerBoundaryIs>
<tessellate>1</tessellate> <tessellate>1</tessellate>
</Polygon> </Polygon>
</MultiGeometry> </MultiGeometry>
</Placemark> </Placemark>
<Placemark> <Placemark>
<name>GMT +12:45</name> <name>GMT +12:45</name>

BIN
examples/data/world.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -16,7 +16,7 @@ const zip = new JSZip();
function getKMLData(buffer) { function getKMLData(buffer) {
let kmlData; let kmlData;
zip.load(buffer); zip.load(buffer);
const kmlFile = zip.file(/.kml$/i)[0]; const kmlFile = zip.file(/\.kml$/i)[0];
if (kmlFile) { if (kmlFile) {
kmlData = kmlFile.asText(); kmlData = kmlFile.asText();
} }
@@ -24,17 +24,14 @@ function getKMLData(buffer) {
} }
function getKMLImage(href) { function getKMLImage(href) {
let url = href; const index = window.location.href.lastIndexOf('/');
let path = window.location.href; if (index !== -1) {
path = path.slice(0, path.lastIndexOf('/') + 1); const kmlFile = zip.file(href.slice(index + 1));
if (href.indexOf(path) === 0) {
const regexp = new RegExp(href.replace(path, '') + '$', 'i');
const kmlFile = zip.file(regexp)[0];
if (kmlFile) { if (kmlFile) {
url = URL.createObjectURL(new Blob([kmlFile.asArrayBuffer()])); return URL.createObjectURL(new Blob([kmlFile.asArrayBuffer()]));
} }
} }
return url; return href;
} }
// Define a KMZ format class by subclassing ol/format/KML // Define a KMZ format class by subclassing ol/format/KML
@@ -139,14 +136,9 @@ function download(fullpath, filename) {
return response.blob(); return response.blob();
}) })
.then(function (blob) { .then(function (blob) {
if (navigator.msSaveBlob) { link.href = URL.createObjectURL(blob);
// link download attribute does not work on MS browsers link.download = filename;
navigator.msSaveBlob(blob, filename); link.click();
} else {
link.href = URL.createObjectURL(blob);
link.download = filename;
link.click();
}
}); });
} }

View File

@@ -107,14 +107,9 @@ function download(fullpath, filename) {
return response.blob(); return response.blob();
}) })
.then(function (blob) { .then(function (blob) {
if (navigator.msSaveBlob) { link.href = URL.createObjectURL(blob);
// link download attribute does not work on MS browsers link.download = filename;
navigator.msSaveBlob(blob, filename); link.click();
} else {
link.href = URL.createObjectURL(blob);
link.download = filename;
link.click();
}
}); });
} }

View File

@@ -101,14 +101,9 @@ function download(fullpath, filename) {
return response.blob(); return response.blob();
}) })
.then(function (blob) { .then(function (blob) {
if (navigator.msSaveBlob) { link.href = URL.createObjectURL(blob);
// link download attribute does not work on MS browsers link.download = filename;
navigator.msSaveBlob(blob, filename); link.click();
} else {
link.href = URL.createObjectURL(blob);
link.download = filename;
link.click();
}
}); });
} }

View File

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

View File

@@ -1,6 +1,5 @@
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import {Circle as CircleStyle, Fill, Stroke, Style} from '../src/ol/style.js';
import {Draw, Modify, Snap} from '../src/ol/interaction.js'; import {Draw, Modify, Snap} from '../src/ol/interaction.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
@@ -13,21 +12,13 @@ const raster = new TileLayer({
const source = new VectorSource(); const source = new VectorSource();
const vector = new VectorLayer({ const vector = new VectorLayer({
source: source, source: source,
style: new Style({ style: {
fill: new Fill({ 'fill-color': 'rgba(255, 255, 255, 0.2)',
color: 'rgba(255, 255, 255, 0.2)', 'stroke-color': '#ffcc33',
}), 'stroke-width': 2,
stroke: new Stroke({ 'circle-radius': 7,
color: '#ffcc33', 'circle-fill-color': '#ffcc33',
width: 2, },
}),
image: new CircleStyle({
radius: 7,
fill: new Fill({
color: '#ffcc33',
}),
}),
}),
}); });
// Limit multi-world panning to one world east and west of the real world. // Limit multi-world panning to one world east and west of the real world.

View File

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

View File

@@ -8,16 +8,22 @@ docs: >
point. To activate freehand drawing for lines, polygons, and circles, hold point. To activate freehand drawing for lines, polygons, and circles, hold
the `Shift` key. To remove the last point of a line or polygon, press "Undo". the `Shift` key. To remove the last point of a line or polygon, press "Undo".
tags: "draw, edit, freehand, vector" tags: "draw, edit, freehand, vector"
resources:
- https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>
<form class="form-inline"> <div class="row">
<label for="type">Geometry type: &nbsp;</label> <div class="col-auto">
<select class="form-control mr-2 mb-2 mt-2" id="type"> <span class="input-group">
<option value="Point">Point</option> <label class="input-group-text" for="type">Geometry type:</label>
<option value="LineString">LineString</option> <select class="form-select" id="type">
<option value="Polygon">Polygon</option> <option value="Point">Point</option>
<option value="Circle">Circle</option> <option value="LineString">LineString</option>
<option value="None">None</option> <option value="Polygon">Polygon</option>
</select> <option value="Circle">Circle</option>
<input class="form-control mr-2 mb-2 mt-2" type="button" value="Undo" id="undo"> <option value="None">None</option>
</form> </select>
<input class="form-control" type="button" value="Undo" id="undo">
</span>
</div>
</div>

View File

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

View File

@@ -12,16 +12,22 @@ docs: >
circle. Star drawing uses a custom geometry function that converts a circle 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. into a star using the center and radius provided by the draw interaction.
tags: "draw, edit, freehand, vector" tags: "draw, edit, freehand, vector"
resources:
- https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>
<form class="form-inline"> <div class="row">
<label for="type">Shape type: &nbsp;</label> <div class="col-auto">
<select class="form-control mr-2 mb-2 mt-2" id="type"> <span class="input-group">
<option value="Circle">Circle</option> <label class="input-group-text" for="type">Shape type:</label>
<option value="Square">Square</option> <select class="form-select" id="type">
<option value="Box">Box</option> <option value="Circle">Circle</option>
<option value="Star">Star</option> <option value="Square">Square</option>
<option value="None">None</option> <option value="Box">Box</option>
</select> <option value="Star">Star</option>
<input class="form-control mr-2 mb-2 mt-2" type="button" value="Undo" id="undo"> <option value="None">None</option>
</form> </select>
<input class="form-control" type="button" value="Undo" id="undo">
</span>
</div>
</div>

View File

@@ -9,7 +9,7 @@ class OLComponent extends HTMLElement {
this.shadow = this.attachShadow({mode: 'open'}); this.shadow = this.attachShadow({mode: 'open'});
const link = document.createElement('link'); const link = document.createElement('link');
link.setAttribute('rel', 'stylesheet'); link.setAttribute('rel', 'stylesheet');
link.setAttribute('href', 'css/ol.css'); link.setAttribute('href', 'theme/ol.css');
this.shadow.appendChild(link); this.shadow.appendChild(link);
const style = document.createElement('style'); const style = document.createElement('style');
style.innerText = ` style.innerText = `

View File

@@ -5,7 +5,11 @@ shortdesc: Example of exporting a map as a PNG image.
docs: > docs: >
Example of exporting a map as a PNG image. Example of exporting a map as a PNG image.
tags: "export, png, openstreetmap" tags: "export, png, openstreetmap"
resources:
- https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css
- https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/fontawesome.min.css
- https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/solid.css
--- ---
<div id="map" class="map"></div> <div id="map" class="map"></div>
<a id="export-png" class="btn btn-default"><i class="fa fa-download"></i> Download PNG</a> <a id="export-png" class="btn btn-outline-dark" role="button"><i class="fa fa-download"></i> Download PNG</a>
<a id="image-download" download="map.png"></a> <a id="image-download" download="map.png"></a>

View File

@@ -64,13 +64,6 @@ document.getElementById('export-png').addEventListener('click', function () {
const opacity = const opacity =
canvas.parentNode.style.opacity || canvas.style.opacity; canvas.parentNode.style.opacity || canvas.style.opacity;
mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity); mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity);
const backgroundColor = canvas.parentNode.style.backgroundColor;
if (backgroundColor) {
mapContext.fillStyle = backgroundColor;
mapContext.fillRect(0, 0, canvas.width, canvas.height);
}
let matrix; let matrix;
const transform = canvas.style.transform; const transform = canvas.style.transform;
if (transform) { if (transform) {
@@ -94,19 +87,20 @@ document.getElementById('export-png').addEventListener('click', function () {
mapContext, mapContext,
matrix matrix
); );
const backgroundColor = canvas.parentNode.style.backgroundColor;
if (backgroundColor) {
mapContext.fillStyle = backgroundColor;
mapContext.fillRect(0, 0, canvas.width, canvas.height);
}
mapContext.drawImage(canvas, 0, 0); mapContext.drawImage(canvas, 0, 0);
} }
} }
); );
mapContext.globalAlpha = 1; mapContext.globalAlpha = 1;
if (navigator.msSaveBlob) { mapContext.setTransform(1, 0, 0, 1, 0, 0);
// link download attribute does not work on MS browsers const link = document.getElementById('image-download');
navigator.msSaveBlob(mapCanvas.msToBlob(), 'map.png'); link.href = mapCanvas.toDataURL();
} else { link.click();
const link = document.getElementById('image-download');
link.href = mapCanvas.toDataURL();
link.click();
}
}); });
map.renderSync(); map.renderSync();
}); });

View File

@@ -84,6 +84,7 @@ exportButton.addEventListener(
} }
); );
mapContext.globalAlpha = 1; mapContext.globalAlpha = 1;
mapContext.setTransform(1, 0, 0, 1, 0, 0);
const pdf = new jspdf.jsPDF('landscape', undefined, format); const pdf = new jspdf.jsPDF('landscape', undefined, format);
pdf.addImage( pdf.addImage(
mapCanvas.toDataURL('image/jpeg'), mapCanvas.toDataURL('image/jpeg'),

View File

@@ -55,27 +55,23 @@ const style = {
const minYearInput = document.getElementById('min-year'); const minYearInput = document.getElementById('min-year');
const maxYearInput = document.getElementById('max-year'); const maxYearInput = document.getElementById('max-year');
function updateMinYear() {
style.variables.minYear = parseInt(minYearInput.value);
updateStatusText();
}
function updateMaxYear() {
style.variables.maxYear = parseInt(maxYearInput.value);
updateStatusText();
}
function updateStatusText() { function updateStatusText() {
const div = document.getElementById('status'); const div = document.getElementById('status');
div.querySelector('span.min-year').textContent = minYearInput.value; div.querySelector('span.min-year').textContent = minYearInput.value;
div.querySelector('span.max-year').textContent = maxYearInput.value; div.querySelector('span.max-year').textContent = maxYearInput.value;
} }
minYearInput.addEventListener('input', updateMinYear); minYearInput.addEventListener('input', function () {
minYearInput.addEventListener('change', updateMinYear); style.variables.minYear = parseInt(minYearInput.value);
maxYearInput.addEventListener('input', updateMaxYear); updateStatusText();
maxYearInput.addEventListener('change', updateMaxYear); });
maxYearInput.addEventListener('input', function () {
style.variables.maxYear = parseInt(maxYearInput.value);
updateStatusText();
});
updateStatusText(); updateStatusText();
// load data // load data;
const client = new XMLHttpRequest(); const client = new XMLHttpRequest();
client.open('GET', 'data/csv/meteorite_landings.csv'); client.open('GET', 'data/csv/meteorite_landings.csv');
client.onload = function () { client.onload = function () {

View File

@@ -2,9 +2,6 @@
height: 100%; height: 100%;
margin: 0; margin: 0;
} }
.map:-ms-fullscreen {
height: 100%;
}
.map:fullscreen { .map:fullscreen {
height: 100%; height: 100%;
} }

View File

@@ -2,9 +2,6 @@
height: 100%; height: 100%;
margin: 0; margin: 0;
} }
.fullscreen:-ms-fullscreen {
height: 100%;
}
.fullscreen:fullscreen { .fullscreen:fullscreen {
height: 100%; height: 100%;

View File

@@ -2,9 +2,6 @@
height: 100%; height: 100%;
margin: 0; margin: 0;
} }
.map:-ms-fullscreen {
height: 100%;
}
.map:fullscreen { .map:fullscreen {
height: 100%; height: 100%;
} }

View File

@@ -8,9 +8,8 @@ docs: >
not geographic). not geographic).
tags: "geographic" tags: "geographic"
resources: resources:
- https://code.jquery.com/jquery-3.5.1.min.js - https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css - https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js
--- ---
<div id="map" class="map"> <div id="map" class="map">
<div id="popup"></div> <div id="popup"></div>

View File

@@ -1,4 +1,3 @@
import {Circle, Fill, Style} from '../src/ol/style.js';
import {Feature, Map, Overlay, View} from '../src/ol/index.js'; import {Feature, Map, Overlay, View} from '../src/ol/index.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Point} from '../src/ol/geom.js'; import {Point} from '../src/ol/geom.js';
@@ -25,12 +24,10 @@ const map = new Map({
source: new VectorSource({ source: new VectorSource({
features: [new Feature(point)], features: [new Feature(point)],
}), }),
style: new Style({ style: {
image: new Circle({ 'circle-radius': 9,
radius: 9, 'circle-fill-color': 'red',
fill: new Fill({color: 'red'}), },
}),
}),
}), }),
], ],
}); });
@@ -39,9 +36,7 @@ const element = document.getElementById('popup');
const popup = new Overlay({ const popup = new Overlay({
element: element, element: element,
positioning: 'bottom-center',
stopEvent: false, stopEvent: false,
offset: [0, -10],
}); });
map.addOverlay(popup); map.addOverlay(popup);
@@ -62,31 +57,34 @@ map.on('moveend', function () {
info.innerHTML = formatCoordinate(center); info.innerHTML = formatCoordinate(center);
}); });
let popover;
map.on('click', function (event) { map.on('click', function (event) {
$(element).popover('dispose'); if (popover) {
popover.dispose();
const feature = map.getFeaturesAtPixel(event.pixel)[0]; popover = undefined;
if (feature) {
const coordinate = feature.getGeometry().getCoordinates();
popup.setPosition([
coordinate[0] + Math.round(event.coordinate[0] / 360) * 360,
coordinate[1],
]);
$(element).popover({
container: element.parentElement,
html: true,
sanitize: false,
content: formatCoordinate(coordinate),
placement: 'top',
});
$(element).popover('show');
} }
const feature = map.getFeaturesAtPixel(event.pixel)[0];
if (!feature) {
return;
}
const coordinate = feature.getGeometry().getCoordinates();
popup.setPosition([
coordinate[0] + Math.round(event.coordinate[0] / 360) * 360,
coordinate[1],
]);
popover = new bootstrap.Popover(element, {
container: element.parentElement,
content: formatCoordinate(coordinate),
html: true,
offset: [0, 20],
placement: 'top',
sanitize: false,
});
popover.show();
}); });
map.on('pointermove', function (event) { map.on('pointermove', function (event) {
if (map.hasFeatureAtPixel(event.pixel)) { const type = map.hasFeatureAtPixel(event.pixel) ? 'pointer' : 'inherit';
map.getViewport().style.cursor = 'pointer'; map.getViewport().style.cursor = type;
} else {
map.getViewport().style.cursor = 'inherit';
}
}); });

View File

@@ -4,17 +4,16 @@ title: Geolocation Tracking with Orientation
shortdesc: Example of a geolocated and oriented map. shortdesc: Example of a geolocated and oriented map.
tags: "fullscreen, geolocation, orientation, mobile" tags: "fullscreen, geolocation, orientation, mobile"
--- ---
<!doctype html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../css/ol.css" type="text/css">
<link rel="stylesheet" href="./resources/layout.css" type="text/css">
<title>Mobile Geolocation Tracking with Orientation</title> <title>Mobile Geolocation Tracking with Orientation</title>
<style type="text/css"> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="/theme/ol.css">
<link rel="stylesheet" type="text/css" href="/theme/site.css">
<style>
html, body, .map { html, body, .map {
margin: 0; margin: 0;
padding: 0; padding: 0;
@@ -29,24 +28,23 @@ tags: "fullscreen, geolocation, orientation, mobile"
background-color: lightgrey; background-color: lightgrey;
padding: 4px; padding: 4px;
} }
.button { .geolocate-buttons {
position: absolute; position: absolute;
bottom: 40px; bottom: 40px;
left: 10px; left: 10px;
} }
</style> </style>
<script src="https://unpkg.com/elm-pep@1.0.6/dist/elm-pep.js"></script>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL"></script>
</head> </head>
<body> <body>
<div id="map" class="map"></div> <div id="map" class="map"></div>
<div id="info"></div> <div id="info"></div>
<img id="geolocation_marker" src="data/geolocation_marker.png" /> <img id="geolocation_marker" src="data/geolocation_marker.png" />
<div class="button"> <div class="geolocate-buttons">
<button id="geolocate">Geolocate Me!</button> <button id="geolocate" class="btn btn-primary">Geolocate Me!</button>
<button id="simulate">Simulate</button> <button id="simulate" class="btn btn-secondary">Simulate</button>
</div> </div>
<script src="common.js"></script> <script src="https://unpkg.com/elm-pep@1.0.6/dist/elm-pep.js"></script>
<script src="geolocation-orientation.js"></script> <script src="geolocation-orientation.js"></script>
<script src="common.js"></script>
</body> </body>
</html> </html>

View File

@@ -42,14 +42,10 @@ new Map({
}), }),
}); });
const blurHandler = function () { blur.addEventListener('input', function () {
vector.setBlur(parseInt(blur.value, 10)); vector.setBlur(parseInt(blur.value, 10));
}; });
blur.addEventListener('input', blurHandler);
blur.addEventListener('change', blurHandler);
const radiusHandler = function () { radius.addEventListener('input', function () {
vector.setRadius(parseInt(radius.value, 10)); vector.setRadius(parseInt(radius.value, 10));
}; });
radius.addEventListener('input', radiusHandler);
radius.addEventListener('change', radiusHandler);

View File

@@ -1,21 +0,0 @@
---
layout: example.html
title: HERE Map Tile API
shortdesc: Example of a map with map tiles from HERE.
docs: >
<p><a href="https://developer.here.com/rest-apis/documentation/enterprise-map-tile" target="_blank">HERE Map Tile API</a> used with <code>ol/source/XYZ</code>.</p>
<p>Be sure to respect the <a href="https://legal.here.com/en/terms/serviceterms/us/" target="_blank">HERE Service Terms</a> when using their tile API.</p>
tags: "here, here-maps, here-tile-api"
cloak:
- key: x13yMxvFSo8FIKFDDTnQaJ57Gakt11ZaIyqIctoSD3Y
value: Your HERE Maps API key from https://developer.here.com/
---
<div id="map" class="map"></div>
<select id="layer-select">
<option value="normal.day" selected>Normal Day</option>
<option value="normal.day.transit">Normal Day Transit</option>
<option value="pedestrian.day">Pedestrian Day</option>
<option value="terrain.day">Terrain Day</option>
<option value="satellite.day">Satellite Day</option>
<option value="hybrid.day">Hybrid Day</option>
</select>

View File

@@ -1,94 +0,0 @@
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
const apiKey = 'x13yMxvFSo8FIKFDDTnQaJ57Gakt11ZaIyqIctoSD3Y';
const hereLayers = [
{
base: 'base',
type: 'maptile',
scheme: 'normal.day',
apiKey: apiKey,
},
{
base: 'base',
type: 'maptile',
scheme: 'normal.day.transit',
apiKey: apiKey,
},
{
base: 'base',
type: 'maptile',
scheme: 'pedestrian.day',
apiKey: apiKey,
},
{
base: 'aerial',
type: 'maptile',
scheme: 'terrain.day',
apiKey: apiKey,
},
{
base: 'aerial',
type: 'maptile',
scheme: 'satellite.day',
apiKey: apiKey,
},
{
base: 'aerial',
type: 'maptile',
scheme: 'hybrid.day',
apiKey: apiKey,
},
];
const urlTpl =
'https://{1-4}.{base}.maps.ls.hereapi.com' +
'/{type}/2.1/maptile/newest/{scheme}/{z}/{x}/{y}/256/png' +
'?apiKey={apiKey}';
const layers = [];
let i, ii;
for (i = 0, ii = hereLayers.length; i < ii; ++i) {
const layerDesc = hereLayers[i];
layers.push(
new TileLayer({
visible: false,
preload: Infinity,
source: new XYZ({
url: createUrl(urlTpl, layerDesc),
attributions:
'Map Tiles &copy; ' +
new Date().getFullYear() +
' ' +
'<a href="https://developer.here.com/" target="_blank">HERE</a>',
}),
})
);
}
const map = new Map({
layers: layers,
target: 'map',
view: new View({
center: [921371.9389, 6358337.7609],
zoom: 10,
}),
});
function createUrl(tpl, layerDesc) {
return tpl
.replace('{base}', layerDesc.base)
.replace('{type}', layerDesc.type)
.replace('{scheme}', layerDesc.scheme)
.replace('{apiKey}', layerDesc.apiKey);
}
const select = document.getElementById('layer-select');
function onChange() {
const scheme = select.value;
for (let i = 0, ii = layers.length; i < ii; ++i) {
layers[i].setVisible(hereLayers[i].scheme === scheme);
}
}
select.addEventListener('change', onChange);
onChange();

View File

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

View File

@@ -31,8 +31,6 @@ rome.setStyle(
image: new Icon({ image: new Icon({
color: '#BADA55', color: '#BADA55',
crossOrigin: 'anonymous', crossOrigin: 'anonymous',
// For Internet Explorer 11
imgSize: [20, 20],
src: 'data/square.svg', src: 'data/square.svg',
}), }),
}) })
@@ -64,8 +62,6 @@ paris.setStyle(
image: new Icon({ image: new Icon({
color: '#8959A8', color: '#8959A8',
crossOrigin: 'anonymous', crossOrigin: 'anonymous',
// For Internet Explorer 11
imgSize: [20, 20],
src: 'data/dot.svg', src: 'data/dot.svg',
}), }),
}) })
@@ -75,8 +71,6 @@ berlin.setStyle(
new Style({ new Style({
image: new Icon({ image: new Icon({
crossOrigin: 'anonymous', crossOrigin: 'anonymous',
// For Internet Explorer 11
imgSize: [20, 20],
src: 'data/dot.svg', src: 'data/dot.svg',
}), }),
}) })

View File

@@ -1,16 +1,211 @@
--- ---
layout: example.html layout: example.html
title: Icon Scale title: Icon and Label Scale
shortdesc: Example of scaling icons and labels. shortdesc: Example of scaling icons and labels.
docs: > docs: >
Icons and labels can be scaled in both dimensions if required. A negative value will flip the image Icons and labels can be scaled in both dimensions if required. A negative value will flip the image
or text around its anchor point (reversed text is <b>not</b> suitable for line placement). A newline or text around its anchor point (reversed text is <b>not</b> suitable for line placement).
character inserted in label text is interpreted in a <b>vector layer</b>, but will not be shown in
a <b>vector context</b>.
tags: "vector, style, icon, label, scale" tags: "vector, style, icon, label, scale"
resources:
- https://code.jquery.com/jquery-3.5.1.min.js
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js
--- ---
<div id="map" class="map"><div id="popup"></div></div> <div id="map" class="map"></div>
<table class="controls">
<tr>
<th>
Image
</th>
<th></th>
<th style="visibility: hidden;">-0.00 π</th>
<th>&nbsp;&nbsp;&nbsp;&nbsp;</th>
<th>
Text
</th>
<th></th>
<th></th>
</tr>
<tr>
<td><label for="rotateWithView">Rotate with view</label>&nbsp;&nbsp;</td>
<td>
<input id="rotateWithView" type="checkbox" />
</td>
<td><span id="rotateWithViewOut"></span></td>
<td></td>
<td><label for="textRotateWithView">Rotate with view</label>&nbsp;&nbsp;</td>
<td>
<input id="textRotateWithView" type="checkbox" />
</td>
<td><span id="textRotateWithViewOut"></span></td>
</tr>
<tr>
<td><label for="rotation">Rotation</label></td>
<td>
<input
id="rotation"
type="range"
min="-1"
max="1"
step="0.05"
value="0.25"
/>
</td>
<td><span id="rotationOut"></span> π</td>
<td></td>
<td><label for="textRotation">Rotation</label></td>
<td>
<input
id="textRotation"
type="range"
min="-1"
max="1"
step="0.05"
value="0.25"
/>
</td>
<td><span id="textRotationOut"></span> π</td>
</tr>
<tr>
<td><label for="scaleX">Scale X</label></td>
<td>
<input
id="scaleX"
type="range"
min="-2"
max="2"
step="0.1"
value="1"
/>
</td>
<td><span id="scaleXOut"></span></td>
<td></td>
<td><label for="textScaleX">Scale X</label></td>
<td>
<input
id="textScaleX"
type="range"
min="-2"
max="2"
step="0.1"
value="1"
/>
</td>
<td><span id="textScaleXOut"></span></td>
</tr>
<tr>
<td><label for="scaleY">Scale Y</label></td>
<td>
<input
id="scaleY"
type="range"
min="-2"
max="2"
step="0.1"
value="1"
/>
</td>
<td><span id="scaleYOut"></span></td>
<td></td>
<td><label for="textScaleY">Scale Y</label></td>
<td>
<input
id="textScaleY"
type="range"
min="-2"
max="2"
step="0.1"
value="1"
/>
</td>
<td><span id="textScaleYOut"></span></td>
</tr>
<tr>
<td><label for="anchorX">Anchor X</label></td>
<td>
<input
id="anchorX"
type="range"
min="0"
max="1"
step="0.01"
value="0.5"
/>
</td>
<td><span id="anchorXOut"></span></td>
<td></td>
<td><label for="textAlign">Align</label></td>
<td>
<input
id="textAlign"
type="range"
min="0"
max="2"
step="1"
value="1"
/>
</td>
<td><span id="textAlignOut"></span></td>
</tr>
<tr>
<td><label for="anchorY">Anchor Y</label></td>
<td>
<input
id="anchorY"
type="range"
min="0"
max="1"
step="0.01"
value="1"
/>
</td>
<td><span id="anchorYOut"></span></td>
<td></td>
<td><label for="textBaseline">Baseline</label></td>
<td>
<input
id="textBaseline"
type="range"
min="0"
max="2"
step="1"
value="0"
/>
</td>
<td><span id="textBaselineOut"></span></td>
</tr>
<tr>
<td><label for="displacementX">Displacement X</label></td>
<td>
<input
id="displacementX"
type="range"
min="-100"
max="100"
value="0"
/>
</td>
<td><span id="displacementXOut"></span></td>
<td></td>
<td><label for="textOffsetX">Offset X</label></td>
<td>
<input id="textOffsetX" type="range" min="-100" max="100" value="0" />
</td>
<td><span id="textOffsetXOut"></span></td>
</tr>
<tr>
<td><label for="displacementY">Displacement Y</label></td>
<td>
<input
id="displacementY"
type="range"
min="-100"
max="100"
value="0"
/>
</td>
<td><span id="displacementYOut"></span></td>
<td></td>
<td><label for="textOffsetY">Offset Y</label></td>
<td>
<input id="textOffsetY" type="range" min="-100" max="100" value="0" />
</td>
<td><span id="textOffsetYOut"></span></td>
</tr>
</table>

View File

@@ -1,14 +1,56 @@
import Feature from '../src/ol/Feature.js'; import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import Overlay from '../src/ol/Overlay.js';
import Point from '../src/ol/geom/Point.js'; import Point from '../src/ol/geom/Point.js';
import TileJSON from '../src/ol/source/TileJSON.js'; import TileJSON from '../src/ol/source/TileJSON.js';
import VectorSource from '../src/ol/source/Vector.js'; import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import {Icon, Style, Text} from '../src/ol/style.js'; import {Circle, Fill, Icon, Stroke, Style, Text} from '../src/ol/style.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
import {fromLonLat} from '../src/ol/proj.js';
import {getVectorContext} from '../src/ol/render.js'; const iconFeature = new Feature({
geometry: new Point([0, 0]),
});
const iconStyle = new Style({
image: new Icon({
anchor: [0.5, 1],
src: 'data/world.png',
}),
text: new Text({
text: 'World\nText',
font: 'bold 30px Calibri,sans-serif',
fill: new Fill({
color: 'black',
}),
stroke: new Stroke({
color: 'white',
width: 2,
}),
}),
});
const pointStyle = new Style({
image: new Circle({
radius: 7,
fill: new Fill({
color: 'black',
}),
stroke: new Stroke({
color: 'white',
width: 2,
}),
}),
});
iconFeature.setStyle([pointStyle, iconStyle]);
const vectorSource = new VectorSource({
features: [iconFeature],
});
const vectorLayer = new VectorLayer({
source: vectorSource,
});
const rasterLayer = new TileLayer({ const rasterLayer = new TileLayer({
source: new TileJSON({ source: new TileJSON({
@@ -17,115 +59,119 @@ const rasterLayer = new TileLayer({
}), }),
}); });
const iconFeature = new Feature({
geometry: new Point(fromLonLat([0, -10])),
name: 'Fish.1',
});
const feature1 = new Feature({
geometry: new Point(fromLonLat([0, -10])),
name: 'Fish.1 Island',
});
const feature2 = new Feature({
geometry: new Point(fromLonLat([-30, 10])),
name: 'Fish.2 Island',
});
const iconStyle = new Style({
image: new Icon({
anchor: [0.5, 0.9],
src: 'data/fish.png',
crossOrigin: '',
scale: [0, 0],
rotation: Math.PI / 4,
}),
text: new Text({
text: 'FISH\nTEXT',
scale: [0, 0],
rotation: Math.PI / 4,
textAlign: 'center',
textBaseline: 'top',
}),
});
let i = 0;
let j = 45;
iconFeature.setStyle(function () {
const x = Math.sin((i * Math.PI) / 180) * 3;
const y = Math.sin((j * Math.PI) / 180) * 4;
iconStyle.getImage().setScale([x, y]);
iconStyle.getText().setScale([x, y]);
return iconStyle;
});
rasterLayer.on('postrender', function (event) {
const vectorContext = getVectorContext(event);
const x = Math.cos((i * Math.PI) / 180) * 3;
const y = Math.cos((j * Math.PI) / 180) * 4;
iconStyle.getImage().setScale([x, y]);
iconStyle.getText().setScale([x, y]);
vectorContext.drawFeature(feature2, iconStyle);
});
const vectorSource = new VectorSource({
features: [iconFeature, feature1, feature2],
});
const vectorLayer = new VectorLayer({
source: vectorSource,
});
const map = new Map({ const map = new Map({
layers: [rasterLayer, vectorLayer], layers: [rasterLayer, vectorLayer],
target: document.getElementById('map'), target: 'map',
view: new View({ view: new View({
center: fromLonLat([-15, 0]), center: [0, 0],
zoom: 3, zoom: 3,
}), }),
}); });
setInterval(function () { const textAlignments = ['left', 'center', 'right'];
i = (i + 4) % 360; const textBaselines = ['top', 'middle', 'bottom'];
j = (j + 5) % 360; const controls = {};
vectorSource.changed(); const controlIds = [
}, 1000); 'rotation',
'rotateWithView',
const element = document.getElementById('popup'); 'scaleX',
'scaleY',
const popup = new Overlay({ 'anchorX',
element: element, 'anchorY',
positioning: 'bottom-center', 'displacementX',
stopEvent: false, 'displacementY',
}); 'textRotation',
map.addOverlay(popup); 'textRotateWithView',
'textScaleX',
// display popup on click 'textScaleY',
map.on('click', function (evt) { 'textAlign',
const feature = map.forEachFeatureAtPixel(evt.pixel, function (feature) { 'textBaseline',
return feature; 'textOffsetX',
}); 'textOffsetY',
$(element).popover('dispose'); ];
if (feature) { controlIds.forEach(function (id) {
popup.setPosition(evt.coordinate); const control = document.getElementById(id);
$(element).popover({ const output = document.getElementById(id + 'Out');
placement: 'top', function setOutput() {
html: true, const value = parseFloat(control.value);
animation: false, if (control.type === 'checkbox') {
content: feature.get('name'), output.innerText = control.checked;
}); } else if (id === 'textAlign') {
$(element).popover('show'); output.innerText = textAlignments[value];
} else if (id === 'textBaseline') {
output.innerText = textBaselines[value];
} else {
output.innerText = control.step.startsWith('0.')
? value.toFixed(2)
: value;
}
} }
control.addEventListener('input', function () {
setOutput();
updateStyle();
});
setOutput();
controls[id] = control;
}); });
function updateStyle() {
iconStyle
.getImage()
.setRotation(parseFloat(controls['rotation'].value) * Math.PI);
iconStyle.getImage().setRotateWithView(controls['rotateWithView'].checked);
iconStyle
.getImage()
.setScale([
parseFloat(controls['scaleX'].value),
parseFloat(controls['scaleY'].value),
]);
iconStyle
.getImage()
.setAnchor([
parseFloat(controls['anchorX'].value),
parseFloat(controls['anchorY'].value),
]);
iconStyle
.getImage()
.setDisplacement([
parseFloat(controls['displacementX'].value),
parseFloat(controls['displacementY'].value),
]);
iconStyle
.getText()
.setRotation(parseFloat(controls['textRotation'].value) * Math.PI);
iconStyle.getText().setRotateWithView(controls['textRotateWithView'].checked);
iconStyle
.getText()
.setScale([
parseFloat(controls['textScaleX'].value),
parseFloat(controls['textScaleY'].value),
]);
iconStyle
.getText()
.setTextAlign(textAlignments[parseFloat(controls['textAlign'].value)]);
iconStyle
.getText()
.setTextBaseline(textBaselines[parseFloat(controls['textBaseline'].value)]);
iconStyle.getText().setOffsetX(parseFloat(controls['textOffsetX'].value));
iconStyle.getText().setOffsetY(parseFloat(controls['textOffsetY'].value));
iconFeature.changed();
}
updateStyle();
// change mouse cursor when over marker // change mouse cursor when over marker
map.on('pointermove', function (e) { map.on('pointermove', function (e) {
const pixel = map.getEventPixel(e.originalEvent); const hit = map.hasFeatureAtPixel(e.pixel);
const hit = map.hasFeatureAtPixel(pixel); map.getTargetElement().style.cursor = hit ? 'pointer' : '';
map.getTarget().style.cursor = hit ? 'pointer' : '';
});
// Close the popup when the map is moved
map.on('movestart', function () {
$(element).popover('dispose');
}); });

View File

@@ -1,11 +1,11 @@
import Feature from '../src/ol/Feature.js'; import Feature from '../src/ol/Feature.js';
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import Point from '../src/ol/geom/Point.js'; import Point from '../src/ol/geom/Point.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/WebGLTile.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import WebGLPointsLayer from '../src/ol/layer/WebGLPoints.js'; import WebGLPointsLayer from '../src/ol/layer/WebGLPoints.js';
import XYZ from '../src/ol/source/XYZ.js'; import XYZ from '../src/ol/source/XYZ.js';
import {Vector} from '../src/ol/source.js';
import {fromLonLat} from '../src/ol/proj.js'; import {fromLonLat} from '../src/ol/proj.js';
const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB';
@@ -31,11 +31,6 @@ const map = new Map({
}), }),
}); });
const vectorSource = new Vector({
features: [],
attributions: 'National UFO Reporting Center',
});
const oldColor = [255, 160, 110]; const oldColor = [255, 160, 110];
const newColor = [180, 255, 200]; const newColor = [180, 255, 200];
const size = 16; const size = 16;
@@ -45,10 +40,9 @@ const style = {
filterShape: 'all', filterShape: 'all',
}, },
filter: [ filter: [
'case', 'any',
['!=', ['var', 'filterShape'], 'all'], ['==', ['var', 'filterShape'], 'all'],
['==', ['get', 'shape'], ['var', 'filterShape']], ['==', ['var', 'filterShape'], ['get', 'shape']],
true,
], ],
symbol: { symbol: {
symbolType: 'image', symbolType: 'image',
@@ -87,24 +81,22 @@ const style = {
}, },
}; };
// key is shape name, value is sightings count
const shapeTypes = {
all: 0,
};
const shapeSelect = document.getElementById('shape-filter'); const shapeSelect = document.getElementById('shape-filter');
shapeSelect.addEventListener('input', function () { shapeSelect.addEventListener('input', function () {
style.variables.filterShape = style.variables.filterShape = shapeSelect.value;
shapeSelect.options[shapeSelect.selectedIndex].value;
map.render(); map.render();
}); });
function fillShapeSelect() { function fillShapeSelect(shapeTypes) {
Object.keys(shapeTypes) Object.keys(shapeTypes)
.sort(function (a, b) { .sort(function (a, b) {
return shapeTypes[b] - shapeTypes[a]; return shapeTypes[b] - shapeTypes[a];
}) })
.forEach(function (shape) { .forEach(function (shape) {
const option = document.createElement('option'); const option = document.createElement('option');
option.text = `${shape} (${shapeTypes[shape]} sightings)`; const sightings = shapeTypes[shape];
option.text = `${shape} (${sightings} sighting${
sightings === 1 ? '' : 's'
})`;
option.value = shape; option.value = shape;
shapeSelect.appendChild(option); shapeSelect.appendChild(option);
}); });
@@ -112,68 +104,56 @@ function fillShapeSelect() {
const client = new XMLHttpRequest(); const client = new XMLHttpRequest();
client.open('GET', 'data/csv/ufo_sighting_data.csv'); client.open('GET', 'data/csv/ufo_sighting_data.csv');
client.onload = function () { client.addEventListener('load', function () {
const csv = client.responseText; const csv = client.responseText;
// key is shape name, value is sightings count
const shapeTypes = {};
const features = []; const features = [];
let prevIndex = csv.indexOf('\n') + 1; // scan past the header line let prevIndex = csv.indexOf('\n') + 1; // scan past the header line
let curIndex; let curIndex;
while ((curIndex = csv.indexOf('\n', prevIndex)) != -1) { while ((curIndex = csv.indexOf('\n', prevIndex)) !== -1) {
const line = csv.substr(prevIndex, curIndex - prevIndex).split(','); const line = csv.substring(prevIndex, curIndex).split(',');
prevIndex = curIndex + 1; prevIndex = curIndex + 1;
const coords = fromLonLat([parseFloat(line[5]), parseFloat(line[4])]); const coords = [parseFloat(line[5]), parseFloat(line[4])];
// only keep valid points
if (isNaN(coords[0]) || isNaN(coords[1])) {
continue;
}
const shape = line[2]; const shape = line[2];
shapeTypes[shape] = (shapeTypes[shape] ? shapeTypes[shape] : 0) + 1; shapeTypes[shape] = (shapeTypes[shape] || 0) + 1;
shapeTypes['all']++;
features.push( features.push(
new Feature({ new Feature({
datetime: line[0], datetime: line[0],
year: parseInt(/[0-9]{4}/.exec(line[0])[0]), // extract the year as int year: parseInt(/[0-9]{4}/.exec(line[0])[0], 10), // extract the year as int
shape: shape, shape: shape,
duration: line[3], duration: line[3],
geometry: new Point(coords), geometry: new Point(fromLonLat(coords)),
}) })
); );
} }
vectorSource.addFeatures(features); shapeTypes['all'] = features.length;
fillShapeSelect(); map.addLayer(
}; new WebGLPointsLayer({
source: new VectorSource({
features: features,
attributions: 'National UFO Reporting Center',
}),
style: style,
})
);
fillShapeSelect(shapeTypes);
});
client.send(); client.send();
map.addLayer(
new WebGLPointsLayer({
source: vectorSource,
style: style,
})
);
const info = document.getElementById('info'); const info = document.getElementById('info');
map.on('pointermove', function (evt) { map.on('pointermove', function (evt) {
if (map.getView().getInteracting() || map.getView().getAnimating()) { if (map.getView().getInteracting() || map.getView().getAnimating()) {
return; return;
} }
const pixel = evt.pixel; const text = map.forEachFeatureAtPixel(evt.pixel, function (feature) {
info.innerText = '';
map.forEachFeatureAtPixel(pixel, function (feature) {
const datetime = feature.get('datetime'); const datetime = feature.get('datetime');
const duration = feature.get('duration'); const duration = feature.get('duration');
const shape = feature.get('shape'); const shape = feature.get('shape');
info.innerText = return `On ${datetime}, lasted ${duration} seconds and had a "${shape}" shape.`;
'On ' +
datetime +
', lasted ' +
duration +
' seconds and had a "' +
shape +
'" shape.';
}); });
info.innerText = text || '';
}); });

View File

@@ -6,8 +6,7 @@ docs: >
Example using an icon to symbolize a point. Example using an icon to symbolize a point.
tags: "vector, style, icon, marker, popup" tags: "vector, style, icon, marker, popup"
resources: resources:
- https://code.jquery.com/jquery-3.5.1.min.js - https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css - https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js
--- ---
<div id="map" class="map"><div id="popup"></div></div> <div id="map" class="map"><div id="popup"></div></div>

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