Compare commits

...

403 Commits

Author SHA1 Message Date
Andreas Hocevar
b068a339f5 Update package version to 6.8.1 2021-09-25 09:02:23 +00:00
Andreas Hocevar
7ac93be8dd Changelog for v6.8.1 2021-09-25 09:01:39 +00:00
Tim Schaub
7a6b9f8a33 Merge pull request #12811 from tschaub/inheritance
Controls inherit font size from parent
2021-09-25 08:20:30 +00:00
Tim Schaub
ef5d00cb9a Controls inherit font size from parent 2021-09-25 06:31:36 +00:00
Tim Schaub
2a0a71107e Merge pull request #12810 from openlayers/release-v6.8.0
Release v6.8.0
2021-09-24 20:07:58 +00:00
Tim Schaub
6b1232b922 Back to development 2021-09-24 19:54:37 +00:00
Tim Schaub
a2d6bd3d85 Updates for 6.8 2021-09-24 19:51:28 +00:00
Tim Schaub
264f155fe3 Merge pull request #12785 from mike-000/Promise.allSettled
Promise.allSettled polyfill and other browser compatibilty
2021-09-24 19:32:53 +00:00
Tim Schaub
0b1d0c9b6e Merge pull request #12807 from tschaub/style-tweaks
Updated styles
2021-09-24 14:12:56 +00:00
Tim Schaub
f5169aafd3 Merge pull request #12806 from tschaub/simpler-sea-level
Update to the WebGL sea level example
2021-09-24 13:50:19 +00:00
Tim Schaub
3db0bf1c6d Update to the WebGL sea level example 2021-09-24 13:41:19 +00:00
Tim Schaub
f5052149d1 Updated styles 2021-09-24 13:40:54 +00:00
Tim Schaub
01bd84d1fc Merge pull request #12808 from tschaub/rendering-tests
Update expectations for vector tile icon label rendering
2021-09-24 13:40:35 +00:00
Tim Schaub
a5e236fe0c Update expectations for vector tile icon label rendering 2021-09-24 13:24:14 +00:00
Andreas Hocevar
2e222083de Merge pull request #12804 from ahocevar/vectortiles-simpler-faster
Make vector tiles rendering simpler and a bit faster
2021-09-23 20:38:17 +00:00
Tim Schaub
b03b6b2e87 Merge pull request #12802 from tschaub/enqueue-next
Enqueue tiles at the next step in the animation
2021-09-23 20:37:38 +00:00
Andreas Hocevar
9aa890217c Render images only when we have frame budget left 2021-09-23 20:11:26 +00:00
Andreas Hocevar
74a628ac85 Remove unused tile image render queue 2021-09-23 19:47:10 +00:00
Tim Schaub
4dc66ef8e3 Enqueue tiles at the next resolution in the animation 2021-09-23 17:28:39 +00:00
Andreas Hocevar
1bd0d8187f Merge pull request #12801 from ahocevar/latest-ol-mapbox-style
Update ol-mapbox-style to latest version without ol peer dependency
2021-09-23 16:35:34 +00:00
Andreas Hocevar
6d427050ce Merge pull request #12792 from ahocevar/no-render-work-when-no-features
Do not do any canvas work when there are no features to render
2021-09-23 16:34:47 +00:00
Andreas Hocevar
03f8bf47e1 Update ol-mapbox-style to latest version without ol peer dependency 2021-09-23 14:41:57 +00:00
Andreas Hocevar
3a2c33f827 Merge pull request #12797 from ahocevar/dependency-updates
Update geotiff
2021-09-23 14:28:55 +00:00
Andreas Hocevar
276d6cb914 Update related dependencies 2021-09-23 13:35:11 +00:00
Tim Schaub
2435321133 Merge pull request #12799 from tschaub/dispose-webgl-points
All layers now call dispose on the renderer
2021-09-23 13:26:22 +00:00
Andreas Hocevar
c934f08866 Update geotiff 2021-09-23 13:24:58 +00:00
Tim Schaub
f357495574 All layers now call dispose on the renderer 2021-09-23 13:14:22 +00:00
Tim Schaub
0db6a021c2 Merge pull request #12798 from tschaub/dispose-webgl-tilelayer
More cleanup in the WebGL tile layer's dispose method
2021-09-23 12:34:23 +00:00
Tim Schaub
a332842540 More cleanup in the WebGL tile layer's dispose method 2021-09-23 12:00:00 +00:00
Tim Schaub
2ebbee2340 Merge pull request #12795 from mike-000/wmts
New tile source for the WMTS example
2021-09-22 23:51:50 +00:00
mike-000
1776f13f4c Update the tile source 2021-09-22 16:25:17 +01:00
Tim Schaub
81bdd513df Merge pull request #12793 from tschaub/set-layers
Add a method to set the map layers
2021-09-22 03:17:37 -05:00
Tim Schaub
a63735a649 Add a method to set the map layers 2021-09-21 13:34:35 +00:00
Andreas Hocevar
46b21c2588 Do not do any canvas work when there are no features to render 2021-09-21 11:21:01 +00:00
Andreas Hocevar
b50f4ce107 Merge pull request #12789 from ahocevar/mapbox-vector-layer-tilejson
Handle TileJSON urls in Mapbox Style document
2021-09-21 11:08:51 +00:00
Tim Schaub
0505d5d379 Merge pull request #12790 from tschaub/view-promise
Allow maps to be configured with a promise for view props
2021-09-21 05:35:14 -05:00
Tim Schaub
d5813deb08 Allow maps to be configured with a promise for view props 2021-09-21 10:25:29 +00:00
Andreas Hocevar
8585d4382b Handle TileJSON urls in Mapbox Style document 2021-09-20 23:37:53 +00:00
Tim Schaub
79a54e33bb Merge pull request #12784 from openlayers/dependabot/npm_and_yarn/webpack-dev-server-4.2.1
Bump webpack-dev-server from 4.2.0 to 4.2.1
2021-09-20 12:48:55 -05:00
Tim Schaub
0a2404089e Merge pull request #12783 from openlayers/dependabot/npm_and_yarn/marked-3.0.4
Bump marked from 3.0.3 to 3.0.4
2021-09-20 12:48:27 -05:00
Tim Schaub
c3cdba3d00 Merge pull request #12782 from openlayers/dependabot/npm_and_yarn/webpack-sources-3.2.1
Bump webpack-sources from 3.2.0 to 3.2.1
2021-09-20 12:48:01 -05:00
Tim Schaub
67034faa60 Merge pull request #12781 from openlayers/dependabot/npm_and_yarn/webpack-5.53.0
Bump webpack from 5.52.1 to 5.53.0
2021-09-20 12:47:30 -05:00
Tim Schaub
878721468e Merge pull request #12780 from openlayers/dependabot/npm_and_yarn/babel/eslint-parser-7.15.7
Bump @babel/eslint-parser from 7.15.4 to 7.15.7
2021-09-20 12:46:59 -05:00
mike-000
ff6aee0d45 Additional requirements for ol/source/GeoTIFF 2021-09-20 12:25:18 +01:00
mike-000
8be8660b91 Fix range slider for better browser support 2021-09-20 11:39:21 +01:00
mike-000
3b108ef058 add NumpyLoader 2021-09-20 11:25:21 +01:00
mike-000
208e2cb022 Polyfill for Promise.allSettled 2021-09-20 11:21:21 +01:00
mike-000
b4275f887e Polyfill for Promise.allSettled 2021-09-20 11:17:59 +01:00
dependabot[bot]
7478705871 Bump webpack-dev-server from 4.2.0 to 4.2.1
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.2.0 to 4.2.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.2.0...v4.2.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>
2021-09-20 10:02:11 +00:00
dependabot[bot]
5dffb0e94e Bump marked from 3.0.3 to 3.0.4
Bumps [marked](https://github.com/markedjs/marked) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js)
- [Commits](https://github.com/markedjs/marked/compare/v3.0.3...v3.0.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-20 10:01:57 +00:00
dependabot[bot]
1d4c40b05e Bump webpack-sources from 3.2.0 to 3.2.1
Bumps [webpack-sources](https://github.com/webpack/webpack-sources) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/webpack/webpack-sources/releases)
- [Commits](https://github.com/webpack/webpack-sources/compare/v3.2.0...v3.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-20 10:01:21 +00:00
dependabot[bot]
e40c029f9f Bump webpack from 5.52.1 to 5.53.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.52.1 to 5.53.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.52.1...v5.53.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-20 10:01:11 +00:00
dependabot[bot]
1344ee83a3 Bump @babel/eslint-parser from 7.15.4 to 7.15.7
Bumps [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) from 7.15.4 to 7.15.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.15.7/eslint/babel-eslint-parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-20 10:00:56 +00:00
Andreas Hocevar
b2f1d081ed Merge pull request #12777 from ahocevar/fix-offscreen-canvas
Fix offscreen-canvas example
2021-09-18 22:47:26 +02:00
Andreas Hocevar
b7e3695cac Merge pull request #12778 from ahocevar/vectortile-remove-extra-work
Do not render vector tiles unless they are being used
2021-09-18 22:46:41 +02:00
Tim Schaub
391af5a466 Merge pull request #12773 from tschaub/lazy-gl-extensions
Enable WebGL extensions when required
2021-09-18 07:26:26 -06:00
MoonE
964b1af72a Merge pull request #12774 from MoonE/fix-text-declutter
Fix text decluttering when segment length is zero
2021-09-18 11:09:15 +02:00
Andreas Hocevar
610fd69120 Do not render vector tiles unless they are being used 2021-09-18 11:02:55 +02:00
Andreas Hocevar
35b3262e0b Fix offscreen-canvas example 2021-09-18 10:30:34 +02:00
Andreas Hocevar
e5193ffa6e Use a more restrictive Mapbox token 2021-09-18 09:28:25 +02:00
Maximilian Krög
4be657a28f Fix text decluttering when segment length is zero 2021-09-17 23:09:56 +02:00
Tim Schaub
367d77d1dc Merge pull request #12770 from tschaub/avoid-clamped
Use Uint8Array instead of Uint8ClampedArray for increased browser compatibility
2021-09-17 14:29:59 -06:00
Tim Schaub
da256e6c00 Enable WebGL extensions when required 2021-09-17 14:14:12 -06:00
Andreas Hocevar
0d06f7b493 Merge pull request #12759 from jumpinjackie/fix/control-typings
#12758: Allow undefined to be passed to control setMap(). Also fix type of getMap()
2021-09-17 08:07:39 +02:00
Tim Schaub
836aa4900e Use Uint8Array instead of Uint8ClampedArray for browser compatibility 2021-09-16 15:10:35 -06:00
Andreas Hocevar
c57c898381 Merge pull request #12760 from ahocevar/opacity
Fix opacity handling for tile and vector layers
2021-09-16 19:49:47 +02:00
Tim Schaub
a1eb2481ba Merge pull request #12764 from webwitcher/imageinformationresponse-fix
Fix ImageInformationResponse typedef
2021-09-16 10:16:32 -06:00
Tim Schaub
87aa801939 Merge pull request #12769 from tschaub/fix-anchor
Remove extra closing anchor tag
2021-09-16 10:08:09 -06:00
Tim Schaub
0fb5237de2 Remove extra closing anchor tag 2021-09-16 09:59:22 -06:00
Tim Schaub
506b176ef2 Merge pull request #12761 from theduckylittle/datatile-float-textures
Add Float Textures for GL Rendering / DataTiles
2021-09-16 09:56:29 -06:00
Tim Schaub
0783a8211f Adjustments to NumpyTiles example 2021-09-16 09:44:43 -06:00
Martin Hauck
c86841dae0 Update src/ol/format/IIIFInfo.js
Co-authored-by: Simon Seyock <8100558+simonseyock@users.noreply.github.com>
2021-09-16 17:15:11 +02:00
Duck
3fc8217254 Add example featuring numpytiles 2021-09-16 07:09:31 -07:00
Martin Hauck
e955eeff21 Fix ImageInformationResponse typedef
`TileInfo` should be an array to conform to https://iiif.io/api/image
2021-09-16 11:41:33 +02:00
Andreas Hocevar
2f5e6906b9 Fix opacity handling for tile and vector layers 2021-09-16 08:49:32 +02:00
Duck
05615df1a3 Allow TileTexture to select float or int based textures. 2021-09-15 15:10:55 -07:00
Duck
f2472b7801 Allow DataTile source to include more than four bands. 2021-09-15 15:10:26 -07:00
Duck
17394cc8be Ensure the texture is loaded into the correct index.
The previous code would try to load subsequent textures into the 0th slot.
2021-09-15 15:10:08 -07:00
Duck
5afd25150f Add additional extension requirements for floating point textures. 2021-09-15 09:35:23 -07:00
mike-000
cb6995d71a Various fixes for browser compatibility issues (#12740)
* Replace Math.log2 with ol/math.log2
* TypedArray.from() browser compatibility fallback
* listen for input and change events for range
2021-09-15 08:45:12 -06:00
Tim Schaub
f9454ba8e3 Merge pull request #12741 from mike-000/GMLBase
Minimal documentation for GMLBase
2021-09-15 08:42:08 -06:00
Tim Schaub
77e457a676 Merge pull request #12750 from openlayers/dependabot/npm_and_yarn/webpack-dev-server-4.2.0
Bump webpack-dev-server from 4.1.0 to 4.2.0
2021-09-15 08:38:20 -06:00
Jackie Ng
67d885d6ef #12758: Allow undefined to be passed to control setMap(). Consequently the return type of getMap() now can also be undefined as well. 2021-09-16 00:05:53 +10:00
Andreas Hocevar
0efdef9b40 Merge pull request #12749 from openlayers/dependabot/npm_and_yarn/marked-3.0.3
Bump marked from 3.0.2 to 3.0.3
2021-09-13 17:49:23 +02:00
Andreas Hocevar
860546800f Merge pull request #12748 from openlayers/dependabot/npm_and_yarn/ol-mapbox-style-6.4.2
Bump ol-mapbox-style from 6.4.1 to 6.4.2
2021-09-13 17:48:56 +02:00
Andreas Hocevar
cccdaf7546 Merge pull request #12747 from openlayers/dependabot/npm_and_yarn/terser-webpack-plugin-5.2.4
Bump terser-webpack-plugin from 5.2.3 to 5.2.4
2021-09-13 17:48:24 +02:00
Andreas Hocevar
ee8fe615f2 Merge pull request #12746 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.15.6
Bump @babel/preset-env from 7.15.4 to 7.15.6
2021-09-13 17:47:55 +02:00
Andreas Hocevar
d4f77349e7 Merge pull request #12745 from openlayers/dependabot/npm_and_yarn/webpack-5.52.1
Bump webpack from 5.52.0 to 5.52.1
2021-09-13 17:47:18 +02:00
Andreas Hocevar
2523929c4f Merge pull request #12744 from openlayers/dependabot/npm_and_yarn/webpack-dev-middleware-5.1.0
Bump webpack-dev-middleware from 5.0.0 to 5.1.0
2021-09-13 17:46:41 +02:00
Andreas Hocevar
11ea89468a Merge pull request #12743 from mike-000/patch-3
Remove docs reference to unmanaged layer and Select
2021-09-13 17:45:45 +02:00
dependabot[bot]
ee7b877b9f Bump webpack-dev-server from 4.1.0 to 4.2.0
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.1.0 to 4.2.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.1.0...v4.2.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>
2021-09-13 10:02:15 +00:00
dependabot[bot]
bac66e6cbc Bump marked from 3.0.2 to 3.0.3
Bumps [marked](https://github.com/markedjs/marked) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js)
- [Commits](https://github.com/markedjs/marked/compare/v3.0.2...v3.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 10:02:03 +00:00
dependabot[bot]
08e1f2e8ef Bump ol-mapbox-style from 6.4.1 to 6.4.2
Bumps [ol-mapbox-style](https://github.com/openlayers/ol-mapbox-style) from 6.4.1 to 6.4.2.
- [Release notes](https://github.com/openlayers/ol-mapbox-style/releases)
- [Changelog](https://github.com/openlayers/ol-mapbox-style/blob/master/CHANGELOG.md)
- [Commits](https://github.com/openlayers/ol-mapbox-style/compare/v6.4.1...v6.4.2)

---
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>
2021-09-13 10:01:47 +00:00
dependabot[bot]
24948708e4 Bump terser-webpack-plugin from 5.2.3 to 5.2.4
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 5.2.3 to 5.2.4.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.2.3...v5.2.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 10:01:35 +00:00
dependabot[bot]
5eee0277d2 Bump @babel/preset-env from 7.15.4 to 7.15.6
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.15.4 to 7.15.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.15.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>
2021-09-13 10:01:18 +00:00
dependabot[bot]
4c278a801f Bump webpack from 5.52.0 to 5.52.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.52.0 to 5.52.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.52.0...v5.52.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 10:01:04 +00:00
dependabot[bot]
5ed413ee3c Bump webpack-dev-middleware from 5.0.0 to 5.1.0
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.0.0...v5.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 10:00:50 +00:00
mike-000
5d937b8c5b Remove docs reference to unmanaged layer 2021-09-13 10:27:16 +01:00
mike-000
a5ed3ce853 Change Select to Draw to describe unmanaged layers 2021-09-13 10:20:30 +01:00
mike-000
7b725cfdf0 add @api 2021-09-12 16:20:22 +01:00
Andreas Hocevar
c5fafbd6c2 Merge pull request #12734 from ahocevar/still-ie11-why-oh-why
Continue supporting IE11 in examples and legacy build
2021-09-11 17:23:03 +02:00
Andreas Hocevar
6085964b61 Merge pull request #12739 from mike-000/patch-2
Change canvas style from initial to unset
2021-09-10 21:50:28 +02:00
mike-000
e0c15c28dc Change canvas style from initial to unset 2021-09-10 20:18:20 +01:00
Andreas Hocevar
c128051802 Add polyfills to legacy build preview 2021-09-10 18:32:26 +02:00
Andreas Hocevar
0f2ec4d9c5 Add legacy build test map to site/index.html 2021-09-10 18:15:09 +02:00
Andreas Hocevar
ccb9ff6f37 Configure builds so they actually work 2021-09-10 18:15:08 +02:00
Andreas Hocevar
f0b3ce635a Merge pull request #12731 from ahocevar/user-resolution
Handle resolution and tile loadingstrategy with user projection
2021-09-10 17:52:48 +02:00
Tim Schaub
bb20ca3c23 Merge pull request #12736 from simonseyock/onsignature-return
OnSignatures return more specific type
2021-09-10 08:33:47 -06:00
Andreas Hocevar
b4d93141ec Do not mangle properties for built examples 2021-09-10 16:28:42 +02:00
Simon Seyock
ce4f6ccb0d OnSignatures return more specific type 2021-09-10 16:11:38 +02:00
Andreas Hocevar
fa8aa81840 Continue supporting IE11 in examples and legacy buld 2021-09-10 13:40:25 +02:00
Andreas Hocevar
26fd8a8f59 Better distinguish new example from existing one 2021-09-10 13:15:17 +02:00
Andreas Hocevar
87bcfdeaa4 Merge pull request #12732 from mike-000/patch-1
Add <meta charset="utf-8"> to Quick Start
2021-09-10 13:10:24 +02:00
mike-000
5cf5b7aeb1 Add <meta charset="utf-8"> to Quick Start 2021-09-10 10:14:05 +01:00
Andreas Hocevar
50e89080a4 Use view projection tile grid in tile loadingstrategy 2021-09-10 02:01:47 +02:00
Andreas Hocevar
c9593b0cf6 Adjust resolution for user extent 2021-09-10 02:01:46 +02:00
Tim Schaub
22a0a209ac Merge pull request #12728 from openlayers/release-v6.7.0
Release v6.7.0
2021-09-09 11:44:08 -06:00
Tim Schaub
eddf8df139 Develop on 6.7.1-dev 2021-09-09 11:35:21 -06:00
Tim Schaub
b64b8af2ea Changes for v6.7.0 2021-09-09 11:24:29 -06:00
Tim Schaub
be312c1616 Merge pull request #12727 from simonseyock/patch-3
Add missing 'boxstart' event to OnSignature
2021-09-09 09:54:08 -06:00
Simon Seyock
c27974b3da Add missing 'boxstart' event to OnSignature
Fixes #12725
2021-09-09 16:48:23 +02:00
Tim Schaub
d7f7cbbc75 Merge pull request #12718 from tschaub/wms-caps
Rename function to avoid minification failure
2021-09-07 14:40:49 -06:00
Tim Schaub
c0546c5f07 Rename function to avoid minification failure 2021-09-07 14:18:52 -06:00
Andreas Hocevar
1f3e3efe5d Merge pull request #12712 from ahocevar/read-rgb
Add convertToRGB option to GeoTIFF source
2021-09-07 17:23:32 +02:00
Andreas Hocevar
cde6417d62 Add convertToRGB option to GeoTIFF source 2021-09-07 17:19:34 +02:00
Frédéric Junod
4c673ce846 Merge pull request #12716 from fredj/spelling
Spelling fix
2021-09-07 14:15:50 +02:00
Tim Schaub
3a869ba7f6 Merge pull request #12715 from tschaub/proj-units
Try harder to get the projection from GeoTIFF headers
2021-09-07 06:12:19 -06:00
Frederic Junod
5c212008de Spelling fix 2021-09-07 09:47:47 +02:00
Tim Schaub
be51d0480c Try harder to get the projection from GeoTIFF headers 2021-09-06 16:55:16 -06:00
Tim Schaub
e89b6c0a3f Merge pull request #12714 from tschaub/simpler-examples
Avoid creating duplicate projections in COG examples
2021-09-06 16:54:16 -06:00
Tim Schaub
4b340fc9bc Avoid creating duplicate projections in COG examples 2021-09-06 16:08:10 -06:00
Tim Schaub
81fdcd5a38 Merge pull request #12713 from tschaub/geotiff-crs
Check for GeoTIFF CRS starting with last image
2021-09-06 16:05:02 -06:00
Tim Schaub
cbfbe08aaa Merge pull request #12709 from tschaub/unreferenced-geotiff
Support rendering of GeoTIFF images in pixel coordinates
2021-09-06 15:30:35 -06:00
Tim Schaub
fce42dc80f Check for crs starting with last image 2021-09-06 15:26:19 -06:00
Tim Schaub
9ddca3739b Merge pull request #12711 from tschaub/band-number
Use band numbers starting with one
2021-09-06 12:50:17 -06:00
Tim Schaub
83375e735c Merge pull request #12710 from tschaub/doc-typo
Spelling fix in GeoTIFF docs
2021-09-06 12:00:48 -06:00
Tim Schaub
0e4c40e315 Use band numbers starting with one 2021-09-06 11:31:08 -06:00
Tim Schaub
39f62f1fa2 Spelling fix 2021-09-06 11:06:46 -06:00
Tim Schaub
eab8dcf7ba Support rendering of GeoTIFF images in pixel coordinates 2021-09-06 09:14:50 -06:00
Andreas Hocevar
8a67c5dbe6 Merge pull request #12703 from openlayers/dependabot/npm_and_yarn/terser-webpack-plugin-5.2.3
Bump terser-webpack-plugin from 5.1.4 to 5.2.3
2021-09-06 12:45:22 +02:00
Andreas Hocevar
72ad10887e Merge pull request #12704 from openlayers/dependabot/npm_and_yarn/babel/eslint-parser-7.15.4
Bump @babel/eslint-parser from 7.15.0 to 7.15.4
2021-09-06 12:45:01 +02:00
Andreas Hocevar
8c96fc8120 Merge pull request #12705 from openlayers/dependabot/npm_and_yarn/webpack-5.52.0
Bump webpack from 5.51.1 to 5.52.0
2021-09-06 12:44:22 +02:00
Andreas Hocevar
348a1d1a13 Merge pull request #12706 from openlayers/dependabot/npm_and_yarn/webpack-dev-server-4.1.0
Bump webpack-dev-server from 4.0.0 to 4.1.0
2021-09-06 12:44:01 +02:00
Andreas Hocevar
0b0d6ba637 Merge pull request #12707 from openlayers/dependabot/npm_and_yarn/babel/core-7.15.5
Bump @babel/core from 7.15.0 to 7.15.5
2021-09-06 12:43:34 +02:00
Andreas Hocevar
6173b3259d Merge pull request #12702 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.15.4
Bump @babel/preset-env from 7.15.0 to 7.15.4
2021-09-06 12:43:14 +02:00
dependabot[bot]
02f2cb8a65 Bump @babel/core from 7.15.0 to 7.15.5
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.15.0 to 7.15.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.15.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>
2021-09-06 10:02:38 +00:00
dependabot[bot]
3a4fdbdf6b Bump webpack-dev-server from 4.0.0 to 4.1.0
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.0.0 to 4.1.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.0.0...v4.1.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>
2021-09-06 10:02:15 +00:00
dependabot[bot]
593ea6706a Bump webpack from 5.51.1 to 5.52.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.51.1 to 5.52.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.51.1...v5.52.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-06 10:02:04 +00:00
dependabot[bot]
0ac661bed1 Bump @babel/eslint-parser from 7.15.0 to 7.15.4
Bumps [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) from 7.15.0 to 7.15.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.15.4/eslint/babel-eslint-parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-06 10:01:51 +00:00
dependabot[bot]
aa7ab1ba65 Bump terser-webpack-plugin from 5.1.4 to 5.2.3
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 5.1.4 to 5.2.3.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.1.4...v5.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-06 10:01:30 +00:00
dependabot[bot]
d63728d3d4 Bump @babel/preset-env from 7.15.0 to 7.15.4
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.15.0 to 7.15.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.15.4/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>
2021-09-06 10:01:14 +00:00
Tim Schaub
c9ec6138ba Merge pull request #12697 from tschaub/doc-warning
Move description above type tag
2021-09-05 12:27:48 -06:00
Tim Schaub
c0bfcfb7ba Move description above type tag 2021-09-05 11:29:15 -06:00
Tim Schaub
69ec9871e2 Merge pull request #12695 from mike-000/KML
Update Google KML icon anchors and correct icon scaling
2021-09-05 08:51:06 -06:00
Andreas Hocevar
1f40bcd633 Merge pull request #12642 from ahocevar/mapbox-style-fullscreen
Fix fullscreen in mapbox-style example
2021-09-05 09:30:33 +02:00
Andreas Hocevar
5901751f43 Merge pull request #12624 from ahocevar/apidoc-undefined
Improve API docs for optional properties
2021-09-05 09:30:04 +02:00
mike-000
7b8d6c817b Ensure scale used in calculations is numeric 2021-09-05 00:04:14 +01:00
mike-000
0c912b6c29 Test load icon image and reset the scale 2021-09-04 23:12:40 +01:00
Tim Schaub
3004f5707f Merge pull request #10963 from tschaub/ogc-tiles
OGC map and vector tile sources
2021-09-04 11:20:42 -06:00
Tim Schaub
c8067bebbb Add supported media type list to feature formats 2021-09-04 11:17:41 -06:00
mike-000
35ed7d4358 Update expected scales 2021-09-04 18:10:01 +01:00
mike-000
c76e78d0b3 Update Google default icon hotspot anchors
Update Google default icon hotspot anchors
Correct icon scaling
Include icon anchor in textOffset calculation
2021-09-04 17:38:36 +01:00
Tim Schaub
ac4e472353 Use union type for corner of origin 2021-09-04 10:31:36 -06:00
Tim Schaub
7168a26cab Use union types
Co-authored-by: Andreas Hocevar <andreas.hocevar@gmail.com>
2021-09-04 10:21:36 -06:00
Tim Schaub
12795e3923 Slightly smaller functions 2021-09-03 14:21:22 -06:00
Tim Schaub
d8baa87e25 Respect tile matrix set limits 2021-09-03 14:13:06 -06:00
Tim Schaub
58cf9f5f6d Leave as experimental until spec is finalized 2021-09-03 12:28:27 -06:00
Tim Schaub
4099f60779 OGC vector tile source 2021-09-03 12:28:27 -06:00
Tim Schaub
791add0d73 OGC map tile source 2021-09-03 12:28:27 -06:00
Andreas Hocevar
d7af546ad3 Merge pull request #12690 from ahocevar/foreachsegment-stride
Fix return stride of forEachSegment
2021-09-02 16:20:23 +02:00
Andreas Hocevar
d17c7ad31e Fix return stride of forEachSegment 2021-09-02 09:44:33 +02:00
Andreas Hocevar
95bfe85dd5 Merge pull request #12684 from mike-000/patch-12
Fix view resolutions in example
2021-08-31 13:11:02 +02:00
mike-000
167d852e02 Fix view resolutions 2021-08-31 11:27:18 +01:00
Andreas Hocevar
7bb5211fc0 Merge pull request #12683 from ahocevar/icon-sprite-offset-pixelratio
Fix sprite offset for pixel ratio !== 1
2021-08-31 09:47:47 +02:00
Tim Schaub
04da7d568f Merge pull request #12677 from openlayers/dependabot/npm_and_yarn/marked-3.0.2
Bump marked from 3.0.0 to 3.0.2
2021-08-30 16:50:23 -06:00
Andreas Hocevar
df493725c6 Fix sprite offset for pixel ratio !== 1 2021-08-30 22:05:34 +02:00
dependabot[bot]
25c1fe7d57 Bump marked from 3.0.0 to 3.0.2
Bumps [marked](https://github.com/markedjs/marked) from 3.0.0 to 3.0.2.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js)
- [Commits](https://github.com/markedjs/marked/compare/v3.0.0...v3.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-30 15:48:50 +00:00
Tim Schaub
706955dfd9 Merge pull request #12678 from openlayers/dependabot/npm_and_yarn/globby-12.0.2
Bump globby from 12.0.1 to 12.0.2
2021-08-30 09:48:23 -06:00
Tim Schaub
611c0e5d6b Merge pull request #12679 from openlayers/dependabot/npm_and_yarn/mocha-9.1.1
Bump mocha from 9.1.0 to 9.1.1
2021-08-30 09:47:58 -06:00
dependabot[bot]
ae38ef32df Bump mocha from 9.1.0 to 9.1.1
Bumps [mocha](https://github.com/mochajs/mocha) from 9.1.0 to 9.1.1.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.1.0...v9.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-30 10:01:33 +00:00
dependabot[bot]
f5fc891ae0 Bump globby from 12.0.1 to 12.0.2
Bumps [globby](https://github.com/sindresorhus/globby) from 12.0.1 to 12.0.2.
- [Release notes](https://github.com/sindresorhus/globby/releases)
- [Commits](https://github.com/sindresorhus/globby/compare/v12.0.1...v12.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-30 10:01:17 +00:00
Tim Schaub
1601d6b859 Merge pull request #12671 from tschaub/cacheless
Configure cache on the layer instead of the source
2021-08-28 15:01:01 -06:00
Andreas Hocevar
9c5d0b54e3 Merge pull request #12669 from ahocevar/geotiff-options
Add opaque and transition options to GeoTIFF source
2021-08-28 19:54:12 +02:00
Tim Schaub
d37e3e3134 Configure cache on the layer instead of the source 2021-08-27 18:04:00 -06:00
Andreas Hocevar
14371a5462 Add opaque and transition options to GeoTIFF source 2021-08-27 19:46:49 +02:00
Tim Schaub
5e6e2f0fb6 Merge pull request #12667 from tschaub/raster-updates
Additional docs and type checking for raster source
2021-08-26 16:44:21 -06:00
Andreas Hocevar
64ea2a56da Merge pull request #12666 from ahocevar/pluggablemap-events
Re-add accidently removed events
2021-08-26 19:29:20 +02:00
Andreas Hocevar
b588ec8c7f Re-add accidently removed events 2021-08-26 19:05:27 +02:00
Tim Schaub
de9ff20f65 Additional docs and type checking for raster source 2021-08-26 11:04:07 -06:00
Andreas Hocevar
3b6bf14cdc Merge pull request #12657 from openlayers/dependabot/npm_and_yarn/mocha-9.1.0
Bump mocha from 9.0.3 to 9.1.0
2021-08-23 14:06:32 +02:00
dependabot[bot]
d58a1b7d09 Bump mocha from 9.0.3 to 9.1.0
Bumps [mocha](https://github.com/mochajs/mocha) from 9.0.3 to 9.1.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.0.3...v9.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-23 10:01:11 +00:00
Andreas Hocevar
0fcaad321c Merge pull request #12650 from openlayers/dependabot/npm_and_yarn/webpack-5.51.1
Bump webpack from 5.50.0 to 5.51.1
2021-08-23 10:42:25 +02:00
dependabot[bot]
fe9a8d2c74 Bump webpack from 5.50.0 to 5.51.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.50.0 to 5.51.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.50.0...v5.51.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-23 08:34:09 +00:00
Andreas Hocevar
64fff348fd Merge pull request #12654 from openlayers/dependabot/npm_and_yarn/webpack-dev-server-4.0.0
Bump webpack-dev-server from 4.0.0-rc.0 to 4.0.0
2021-08-23 10:32:49 +02:00
Andreas Hocevar
88810afac6 Merge pull request #12653 from openlayers/dependabot/npm_and_yarn/globby-12.0.1
Bump globby from 12.0.0 to 12.0.1
2021-08-23 10:29:01 +02:00
Andreas Hocevar
1723bea12c Merge pull request #12652 from openlayers/dependabot/npm_and_yarn/loglevelnext-5.0.6
Bump loglevelnext from 5.0.5 to 5.0.6
2021-08-23 10:22:29 +02:00
Andreas Hocevar
fbded2a504 Merge pull request #12651 from openlayers/dependabot/npm_and_yarn/rollup-2.56.3
Bump rollup from 2.56.2 to 2.56.3
2021-08-23 10:18:09 +02:00
dependabot[bot]
9ea56cf9c7 Bump webpack-dev-server from 4.0.0-rc.0 to 4.0.0
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.0.0-rc.0 to 4.0.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.0.0-rc.0...v4.0.0)

---
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>
2021-08-23 08:14:04 +00:00
dependabot[bot]
674ed45888 Bump globby from 12.0.0 to 12.0.1
Bumps [globby](https://github.com/sindresorhus/globby) from 12.0.0 to 12.0.1.
- [Release notes](https://github.com/sindresorhus/globby/releases)
- [Commits](https://github.com/sindresorhus/globby/compare/v12.0.0...v12.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-23 08:13:04 +00:00
dependabot[bot]
8674c46899 Bump loglevelnext from 5.0.5 to 5.0.6
Bumps [loglevelnext](https://github.com/shellscape/loglevelnext) from 5.0.5 to 5.0.6.
- [Release notes](https://github.com/shellscape/loglevelnext/releases)
- [Commits](https://github.com/shellscape/loglevelnext/compare/v5.0.5...v5.0.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-23 08:12:33 +00:00
dependabot[bot]
0a7c90acdd Bump rollup from 2.56.2 to 2.56.3
Bumps [rollup](https://github.com/rollup/rollup) from 2.56.2 to 2.56.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.56.2...v2.56.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-23 08:12:01 +00:00
Andreas Hocevar
b71667c386 Merge pull request #12647 from mike-000/patch-11
Remove Translate option conflicts and update documentation
2021-08-22 12:29:27 +02:00
mike-000
d85990436d fix typo 2021-08-21 15:13:38 +01:00
mike-000
3c1e3dcfd5 Document (existing) multiple feature behaviour 2021-08-21 15:11:57 +01:00
mike-000
207fc99295 Remove option conflicts and update documentation 2021-08-21 14:57:11 +01:00
Tim Schaub
72d153696a Merge pull request #12008 from tschaub/gl
Rendering raster tiles with WebGL
2021-08-20 10:14:48 -06:00
Andreas Hocevar
a0b75268ee Fix fullscreen in mapbox-style example 2021-08-20 09:28:22 +02:00
Tim Schaub
42970915ea Extract nodata values from metadata when possible 2021-08-19 10:40:59 -06:00
Tim Schaub
8954f001fa Modify the source extent 2021-08-19 09:19:53 -06:00
Tim Schaub
b8c52b4298 Update aspect calculation for GLSL atan implementation 2021-08-18 18:25:38 -06:00
Andreas Hocevar
10989f96bf Fix aspect calculation in shaded-relief example 2021-08-18 21:30:53 +02:00
Andreas Hocevar
814d70b1cc Add more tests 2021-08-18 17:54:48 +02:00
Andreas Hocevar
7acd5338c9 Allow sampling data from neighboring pixels 2021-08-18 11:24:37 +02:00
Andreas Hocevar
324148c606 Add more docs 2021-08-18 11:24:37 +02:00
Andreas Hocevar
7a8c1f309b Use geotiff v1.0.4 2021-08-18 11:24:36 +02:00
Andreas Hocevar
011c14c7df Load layers for pyramid on demand 2021-08-18 11:24:35 +02:00
Andreas Hocevar
283aed2dc9 Better docs 2021-08-18 11:24:34 +02:00
Andreas Hocevar
4526f2ef34 Properly handle alt tiles of transparent images 2021-08-18 11:24:34 +02:00
Andreas Hocevar
efae01e71f Add COG tile pyramid example 2021-08-18 11:24:33 +02:00
Andreas Hocevar
394873013c Do not render layer when outside extent 2021-08-18 11:24:32 +02:00
Andreas Hocevar
e7dfcc77ae Fix source key handling for interim tiles 2021-08-18 11:24:32 +02:00
Andreas Hocevar
e8ead306ff Remove multi-source restrictions and fix alpha 2021-08-18 11:24:31 +02:00
Tim Schaub
7f3f4e6cdd Set tile after creating helper
Co-authored-by: MoonE <maxi_kroeg@web.de>
2021-08-18 11:24:30 +02:00
Andreas Hocevar
79b3bc4244 Add multi-source cog example 2021-08-18 11:24:29 +02:00
Andreas Hocevar
05e0fb1bf7 Mix Geotiffs with arbitrary bands and resolutions 2021-08-18 11:24:29 +02:00
Andreas Hocevar
f0cac76718 Add expression for Math.abs 2021-08-18 11:24:28 +02:00
Andreas Hocevar
05eac3e384 Use worker for GeoTIFF decoding 2021-08-18 11:24:27 +02:00
Andreas Hocevar
311247265b Add interim tiles handling 2021-08-18 11:24:26 +02:00
Andreas Hocevar
fd43b00118 Premultiply alpha for transparent tile sources 2021-08-18 11:24:25 +02:00
Andreas Hocevar
976f1b694a Fix legacy build to work with geotiff 2021-08-18 11:24:24 +02:00
Andreas Hocevar
429a8fbc1a Remove lint after dependency updates 2021-08-18 11:24:24 +02:00
Tim Schaub
af80477c1d Rendering raster tiles with WebGL 2021-08-18 11:24:23 +02:00
Andreas Hocevar
2dd212cdac Merge pull request #12627 from openlayers/dependabot/npm_and_yarn/webpack-cli-4.8.0
Bump webpack-cli from 4.7.2 to 4.8.0
2021-08-17 11:48:33 +02:00
Andreas Hocevar
6df5ff8d2b Merge pull request #12632 from mike-000/patch-10
Only warn of zero size when map should be visible
2021-08-17 10:27:35 +02:00
mike-000
0f56eed272 only warn of zero size when map should be visible 2021-08-16 23:43:43 +01:00
Andreas Hocevar
b41abcb08e Merge pull request #12631 from openlayers/dependabot/npm_and_yarn/marked-3.0.0
Bump marked from 2.1.3 to 3.0.0
2021-08-16 14:03:47 +02:00
Andreas Hocevar
e9607acacb Merge pull request #12630 from openlayers/dependabot/npm_and_yarn/webpack-5.50.0
Bump webpack from 5.49.0 to 5.50.0
2021-08-16 14:02:55 +02:00
Andreas Hocevar
c155850395 Merge pull request #12629 from openlayers/dependabot/npm_and_yarn/yargs-17.1.1
Bump yargs from 17.1.0 to 17.1.1
2021-08-16 14:02:15 +02:00
Andreas Hocevar
b068284d8f Merge pull request #12628 from openlayers/dependabot/npm_and_yarn/rollup-2.56.2
Bump rollup from 2.56.1 to 2.56.2
2021-08-16 14:01:47 +02:00
Andreas Hocevar
2332acc4e4 Merge pull request #12626 from mike-000/patch-9
Set canvas style to override problem 3rd party css
2021-08-16 12:15:07 +02:00
dependabot[bot]
d6a1f83b0e Bump marked from 2.1.3 to 3.0.0
Bumps [marked](https://github.com/markedjs/marked) from 2.1.3 to 3.0.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js)
- [Commits](https://github.com/markedjs/marked/compare/v2.1.3...v3.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 10:02:10 +00:00
dependabot[bot]
492fa3d9f7 Bump webpack from 5.49.0 to 5.50.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.49.0 to 5.50.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.49.0...v5.50.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 10:01:56 +00:00
dependabot[bot]
2c0fc5eded Bump yargs from 17.1.0 to 17.1.1
Bumps [yargs](https://github.com/yargs/yargs) from 17.1.0 to 17.1.1.
- [Release notes](https://github.com/yargs/yargs/releases)
- [Changelog](https://github.com/yargs/yargs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs/compare/v17.1.0...v17.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 10:01:25 +00:00
dependabot[bot]
82e17ca11b Bump rollup from 2.56.1 to 2.56.2
Bumps [rollup](https://github.com/rollup/rollup) from 2.56.1 to 2.56.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.56.1...v2.56.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 10:01:13 +00:00
dependabot[bot]
f5fd052aee Bump webpack-cli from 4.7.2 to 4.8.0
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.7.2 to 4.8.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.7.2...webpack-cli@4.8.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>
2021-08-16 10:00:59 +00:00
mike-000
d824475305 set initial style after document.createElement 2021-08-16 10:27:41 +01:00
mike-000
78c105e838 set canvas style to override problem 3rd party css
move typecast for simplicity
2021-08-15 23:14:41 +01:00
Andreas Hocevar
000461993b Add undefined as type when optional and no default 2021-08-12 12:18:51 +02:00
Andreas Hocevar
44ec78749f Merge pull request #12616 from openlayers/dependabot/npm_and_yarn/webpack-5.49.0
Bump webpack from 5.47.1 to 5.49.0
2021-08-09 14:22:51 +02:00
Andreas Hocevar
0649f613ad Merge pull request #12617 from openlayers/dependabot/npm_and_yarn/babel/eslint-parser-7.15.0
Bump @babel/eslint-parser from 7.14.9 to 7.15.0
2021-08-09 14:22:18 +02:00
Andreas Hocevar
6ee0da2d76 Merge pull request #12615 from openlayers/dependabot/npm_and_yarn/rollup-2.56.1
Bump rollup from 2.56.0 to 2.56.1
2021-08-09 14:21:45 +02:00
Andreas Hocevar
d86cc70e46 Merge pull request #12614 from openlayers/dependabot/npm_and_yarn/puppeteer-10.2.0
Bump puppeteer from 10.1.0 to 10.2.0
2021-08-09 14:21:16 +02:00
Andreas Hocevar
91a24d45bd Merge pull request #12613 from openlayers/dependabot/npm_and_yarn/yargs-17.1.0
Bump yargs from 17.0.1 to 17.1.0
2021-08-09 14:18:44 +02:00
Andreas Hocevar
99fe1d1f8b Merge pull request #12612 from openlayers/dependabot/npm_and_yarn/babel/core-7.15.0
Bump @babel/core from 7.14.8 to 7.15.0
2021-08-09 14:18:13 +02:00
dependabot[bot]
5e50a23bc7 Bump webpack from 5.47.1 to 5.49.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.47.1 to 5.49.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.47.1...v5.49.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 12:12:37 +00:00
dependabot[bot]
9f7b8b955f Bump @babel/core from 7.14.8 to 7.15.0
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.14.8 to 7.15.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.15.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>
2021-08-09 12:12:35 +00:00
Andreas Hocevar
c328d47074 Merge pull request #12611 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.15.0
Bump @babel/preset-env from 7.14.9 to 7.15.0
2021-08-09 14:11:43 +02:00
Andreas Hocevar
3420eeca1c Merge pull request #12610 from openlayers/dependabot/npm_and_yarn/clean-css-cli-5.3.3
Bump clean-css-cli from 5.3.2 to 5.3.3
2021-08-09 14:11:09 +02:00
dependabot[bot]
1eb2f36deb Bump @babel/eslint-parser from 7.14.9 to 7.15.0
Bumps [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) from 7.14.9 to 7.15.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.15.0/eslint/babel-eslint-parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 10:02:31 +00:00
dependabot[bot]
1feae26489 Bump rollup from 2.56.0 to 2.56.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.56.0 to 2.56.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.56.0...v2.56.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 10:01:59 +00:00
dependabot[bot]
3ad04d09cc Bump puppeteer from 10.1.0 to 10.2.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 10.1.0 to 10.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/v10.1.0...v10.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>
2021-08-09 10:01:40 +00:00
dependabot[bot]
acd6f9b5d7 Bump yargs from 17.0.1 to 17.1.0
Bumps [yargs](https://github.com/yargs/yargs) from 17.0.1 to 17.1.0.
- [Release notes](https://github.com/yargs/yargs/releases)
- [Changelog](https://github.com/yargs/yargs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs/compare/v17.0.1...v17.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 10:01:26 +00:00
dependabot[bot]
f166629dd5 Bump @babel/preset-env from 7.14.9 to 7.15.0
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.14.9 to 7.15.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.15.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>
2021-08-09 10:01:00 +00:00
dependabot[bot]
0d3526976d Bump clean-css-cli from 5.3.2 to 5.3.3
Bumps [clean-css-cli](https://github.com/clean-css/clean-css-cli) from 5.3.2 to 5.3.3.
- [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.3.2...v5.3.3)

---
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>
2021-08-09 10:00:43 +00:00
Tim Schaub
3bff0f23ca Merge pull request #12608 from tschaub/more-proj-ids
Support more OGC CRS identifiers
2021-08-08 15:58:07 -06:00
Tim Schaub
08583b4a41 Add more alternative identifiers for EPSG:4326 2021-08-08 12:15:52 -06:00
Tim Schaub
73bb89f196 Add another alternative identifier for EPSG:3857 2021-08-08 12:13:19 -06:00
MoonE
22a48fe939 Merge pull request #12607 from MoonE/expression-no-color-equal-operator
Don't add color as possible type if it was not set
2021-08-08 15:40:55 +02:00
Maximilian Krög
2bcd57193d Don't add color as possible type if it was not set 2021-08-08 15:30:57 +02:00
Tim Schaub
c1f4749e4d Merge pull request #12605 from simonseyock/typings
Some typing improvements
2021-08-06 11:57:34 -06:00
Tim Schaub
687219a089 Merge pull request #12600 from simonseyock/attributions-public
Make attribution getters public.
2021-08-06 11:50:12 -06:00
Simon Seyock
f636d68cce Fix typing errors. 2021-08-06 17:14:17 +02:00
Simon Seyock
d6e0eb75fa Use Source as default parameter for Layer. 2021-08-06 17:14:17 +02:00
Simon Seyock
d7b443bf44 Make constructor pick up geometry type from properties object. 2021-08-06 17:14:17 +02:00
Simon Seyock
cebaa546b7 Feature.clone returns correct type. 2021-08-06 17:14:17 +02:00
Andreas Hocevar
f8ac74fa1b Merge pull request #12597 from mwerlitz/12596_rastersource_does_not_end_tile_transition
#12596 fix RasterSource does not end Tile transition
2021-08-05 15:19:16 +02:00
mwerlitz
aea11b773c fix whitespace error
Co-authored-by: Andreas Hocevar <andreas.hocevar@gmail.com>
2021-08-05 13:02:26 +02:00
Andreas Hocevar
022928eaa1 Merge pull request #12602 from openlayers/dependabot/npm_and_yarn/rollup-2.56.0
Bump rollup from 2.54.0 to 2.56.0
2021-08-05 12:40:17 +02:00
dependabot[bot]
dbcb5d1582 Bump rollup from 2.54.0 to 2.56.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.54.0 to 2.56.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.54.0...v2.56.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-05 10:18:03 +00:00
Simon Seyock
6ce7b58020 Make attribution getters public. 2021-08-05 11:04:33 +02:00
Andreas Hocevar
7a2b0cd2d9 Merge pull request #12583 from openlayers/dependabot/npm_and_yarn/webpack-sources-3.2.0
Bump webpack-sources from 2.3.1 to 3.2.0
2021-08-05 10:23:24 +02:00
dependabot[bot]
d938a75b53 Bump webpack-sources from 2.3.1 to 3.2.0
Bumps [webpack-sources](https://github.com/webpack/webpack-sources) from 2.3.1 to 3.2.0.
- [Release notes](https://github.com/webpack/webpack-sources/releases)
- [Commits](https://github.com/webpack/webpack-sources/compare/v2.3.1...v3.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-05 07:26:17 +00:00
Andreas Hocevar
7bb35422a0 Merge pull request #12599 from ahocevar/reference-image-again
Replace reference image to match that of the CI
2021-08-05 09:24:59 +02:00
Andreas Hocevar
27d915aefa Replace reference image to match that of the CI 2021-08-05 09:17:29 +02:00
Andreas Hocevar
4f38dd2c66 Merge pull request #12595 from ahocevar/null-types
Generate correct type definitions with null
2021-08-05 07:57:28 +02:00
Andreas Hocevar
e9791cf4d3 Generate correct type definitions with null 2021-08-04 14:32:36 +02:00
Andreas Hocevar
40f7140348 Merge pull request #12578 from ahocevar/update-reference-image
Update rendering test reference image
2021-08-04 13:47:04 +02:00
Mathias Werlitz
c72a31a226 #12596 fix RasterSource does not end Tile transition 2021-08-04 12:20:42 +02:00
Tim Schaub
f0bbe366f5 Merge pull request #12581 from openlayers/dependabot/npm_and_yarn/rollup/plugin-commonjs-20.0.0
Bump @rollup/plugin-commonjs from 19.0.1 to 20.0.0
2021-08-02 22:30:22 -06:00
Tim Schaub
68871eae86 Merge pull request #12582 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.14.9
Bump @babel/preset-env from 7.14.8 to 7.14.9
2021-08-02 22:24:05 -06:00
Tim Schaub
632053a4f4 Merge pull request #12585 from openlayers/dependabot/npm_and_yarn/clean-css-cli-5.3.2
Bump clean-css-cli from 5.3.0 to 5.3.2
2021-08-02 22:23:32 -06:00
Tim Schaub
c197e80bd4 Merge pull request #12584 from openlayers/dependabot/npm_and_yarn/webpack-5.47.1
Bump webpack from 5.46.0 to 5.47.1
2021-08-02 22:22:22 -06:00
Tim Schaub
470b0df16a Merge pull request #12586 from openlayers/dependabot/npm_and_yarn/babel/eslint-parser-7.14.9
Bump @babel/eslint-parser from 7.14.7 to 7.14.9
2021-08-02 22:21:17 -06:00
Tim Schaub
43a2ae29f0 Merge pull request #12588 from openlayers/dependabot/npm_and_yarn/sinon-11.1.2
Bump sinon from 11.1.1 to 11.1.2
2021-08-02 22:20:30 -06:00
Tim Schaub
e3777edac2 Merge pull request #12589 from openlayers/dependabot/npm_and_yarn/eslint-7.32.0
Bump eslint from 7.31.0 to 7.32.0
2021-08-02 22:19:56 -06:00
dependabot[bot]
7fd51b3195 Bump eslint from 7.31.0 to 7.32.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.31.0 to 7.32.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.31.0...v7.32.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-02 10:02:55 +00:00
dependabot[bot]
444da4ab39 Bump sinon from 11.1.1 to 11.1.2
Bumps [sinon](https://github.com/sinonjs/sinon) from 11.1.1 to 11.1.2.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-02 10:02:40 +00:00
dependabot[bot]
4bdd40b7e1 Bump @babel/eslint-parser from 7.14.7 to 7.14.9
Bumps [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) from 7.14.7 to 7.14.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.14.9/eslint/babel-eslint-parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-02 10:02:13 +00:00
dependabot[bot]
8dc9ecd4b5 Bump clean-css-cli from 5.3.0 to 5.3.2
Bumps [clean-css-cli](https://github.com/jakubpawlowicz/clean-css-cli) from 5.3.0 to 5.3.2.
- [Release notes](https://github.com/jakubpawlowicz/clean-css-cli/releases)
- [Changelog](https://github.com/clean-css/clean-css-cli/blob/master/History.md)
- [Commits](https://github.com/jakubpawlowicz/clean-css-cli/commits)

---
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>
2021-08-02 10:01:51 +00:00
dependabot[bot]
0c919784ae Bump webpack from 5.46.0 to 5.47.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.46.0 to 5.47.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.46.0...v5.47.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-02 10:01:34 +00:00
dependabot[bot]
a8e890ca3f Bump @babel/preset-env from 7.14.8 to 7.14.9
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.14.8 to 7.14.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.14.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>
2021-08-02 10:01:09 +00:00
dependabot[bot]
9f92628212 Bump @rollup/plugin-commonjs from 19.0.1 to 20.0.0
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 19.0.1 to 20.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-v20.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>
2021-08-02 10:00:52 +00:00
Andreas Hocevar
36fc2c042a Update rendering test reference image 2021-08-01 11:03:47 +02:00
MoonE
f701f20eae Merge pull request #12577 from MoonE/fix-buid-site-on-windows-cmd
Use shx for the build-site script, clean before run
2021-08-01 10:36:53 +02:00
Andreas Hocevar
6bc60f9911 Merge pull request #12575 from ahocevar/raster-events
Add on(), un() and once() signatures for ol/source/Raster
2021-08-01 10:33:19 +02:00
Andreas Hocevar
ea9b2c4c41 Merge pull request #12565 from sebakerckhof/fix/12564
Handle named colors as string in equal operator
2021-08-01 10:32:06 +02:00
Andreas Hocevar
2038a93880 Add on(), un() and once() signatures for ol/source/Raster 2021-08-01 10:28:02 +02:00
Maximilian Krög
0f894a28df Use shx for the build-site script, clean before run 2021-08-01 09:55:30 +02:00
MoonE
0cc533e5d8 Merge pull request #12576 from MoonE/fix-example-and-legacy-build-with-nodejs-16-6
Fix example and legacy build with nodejs 16.6
2021-08-01 09:51:25 +02:00
Maximilian Krög
687b131714 Fix example and legacy build with nodejs 16.6 2021-08-01 01:13:26 +02:00
Seba Kerckhof
fec6fee83c Remove color from value type in equal operator 2021-07-28 09:26:29 +02:00
Seba Kerckhof
25af938a83 Update test/browser/spec/ol/style/expressions.test.js
Co-authored-by: Andreas Hocevar <andreas.hocevar@gmail.com>
2021-07-28 09:17:10 +02:00
Seba Kerckhof
db57d9bf89 Handle named colors as string in equal operator 2021-07-27 18:54:08 +02:00
Andreas Hocevar
1dc336e459 Merge pull request #12559 from openlayers/dependabot/npm_and_yarn/rollup-2.54.0
Bump rollup from 2.53.2 to 2.54.0
2021-07-26 13:26:02 +02:00
Andreas Hocevar
7749eaf953 Merge pull request #12560 from openlayers/dependabot/npm_and_yarn/babel/core-7.14.8
Bump @babel/core from 7.14.6 to 7.14.8
2021-07-26 13:25:35 +02:00
Andreas Hocevar
f9362a0825 Merge pull request #12558 from openlayers/dependabot/npm_and_yarn/webpack-dev-server-4.0.0-rc.0
Bump webpack-dev-server from 4.0.0-beta.3 to 4.0.0-rc.0
2021-07-26 13:25:00 +02:00
Andreas Hocevar
9a38a91816 Merge pull request #12556 from openlayers/dependabot/npm_and_yarn/globby-12.0.0
Bump globby from 11.0.4 to 12.0.0
2021-07-26 13:18:19 +02:00
Andreas Hocevar
de460cfb09 Change import 2021-07-26 13:13:54 +02:00
Andreas Hocevar
20240c549f Merge pull request #12555 from openlayers/dependabot/npm_and_yarn/webpack-5.46.0
Bump webpack from 5.45.1 to 5.46.0
2021-07-26 13:10:59 +02:00
dependabot[bot]
9986e6d0c0 Bump webpack from 5.45.1 to 5.46.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.45.1 to 5.46.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.45.1...v5.46.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-26 10:19:25 +00:00
dependabot[bot]
310eeea207 Bump rollup from 2.53.2 to 2.54.0
Bumps [rollup](https://github.com/rollup/rollup) from 2.53.2 to 2.54.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.53.2...v2.54.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-26 10:18:44 +00:00
Andreas Hocevar
498721ff57 Merge pull request #12554 from openlayers/dependabot/npm_and_yarn/mocha-9.0.3
Bump mocha from 9.0.2 to 9.0.3
2021-07-26 12:12:54 +02:00
Andreas Hocevar
a86cfcc3be Merge pull request #12553 from openlayers/dependabot/npm_and_yarn/babel/preset-env-7.14.8
Bump @babel/preset-env from 7.14.7 to 7.14.8
2021-07-26 12:12:23 +02:00
Andreas Hocevar
2c3851b541 Merge pull request #12552 from openlayers/dependabot/npm_and_yarn/rollup/plugin-node-resolve-13.0.4
Bump @rollup/plugin-node-resolve from 13.0.2 to 13.0.4
2021-07-26 12:11:53 +02:00
Andreas Hocevar
55fb897f88 Merge pull request #12551 from M393/add-wkb-to-ol-format
Add WKB to the exports of ol/format
2021-07-26 12:10:46 +02:00
dependabot[bot]
8baba070d5 Bump @babel/core from 7.14.6 to 7.14.8
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.14.6 to 7.14.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.14.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>
2021-07-26 10:03:08 +00:00
dependabot[bot]
14eaaac976 Bump webpack-dev-server from 4.0.0-beta.3 to 4.0.0-rc.0
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.0.0-beta.3 to 4.0.0-rc.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.0.0-beta.3...v4.0.0-rc.0)

---
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>
2021-07-26 10:02:18 +00:00
dependabot[bot]
16f8e1be7a Bump globby from 11.0.4 to 12.0.0
Bumps [globby](https://github.com/sindresorhus/globby) from 11.0.4 to 12.0.0.
- [Release notes](https://github.com/sindresorhus/globby/releases)
- [Commits](https://github.com/sindresorhus/globby/compare/v11.0.4...v12.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-26 10:01:41 +00:00
dependabot[bot]
9a883f5a73 Bump mocha from 9.0.2 to 9.0.3
Bumps [mocha](https://github.com/mochajs/mocha) from 9.0.2 to 9.0.3.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.0.2...v9.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-26 10:01:12 +00:00
dependabot[bot]
a9b9bb34fa Bump @babel/preset-env from 7.14.7 to 7.14.8
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.14.7 to 7.14.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.14.8/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>
2021-07-26 10:01:00 +00:00
dependabot[bot]
b05d4d9cad Bump @rollup/plugin-node-resolve from 13.0.2 to 13.0.4
Bumps [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/HEAD/packages/node-resolve) from 13.0.2 to 13.0.4.
- [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.0.4/packages/node-resolve)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-26 10:00:45 +00:00
Maximilian Krög
e50d5a2197 Add WKB to the exports of ol/format 2021-07-26 09:24:52 +02:00
Andreas Hocevar
0b941e01d9 Merge pull request #12550 from simonseyock/example-grid-tag
Add `grid` tag to examples.
2021-07-23 14:13:42 +02:00
Andreas Hocevar
65742a22f9 Merge pull request #12549 from simonseyock/group-layer-event
Add `change:layers` event.
2021-07-23 14:12:52 +02:00
Simon Seyock
2e054aea4d Add grid tag to examples. 2021-07-23 13:15:51 +02:00
Simon Seyock
bf9ca7f3d1 Add change:layers event. 2021-07-23 13:03:57 +02:00
Andreas Hocevar
82956aaf5e Merge pull request #12545 from ahocevar/proj4-axis
Restore simple axis order handling with fixed proj4
2021-07-22 18:46:20 +02:00
Andreas Hocevar
eb39f59713 Merge pull request #12544 from ahocevar/raster-image-generics
Make Raster source work as generics type for Image layer
2021-07-22 18:45:36 +02:00
Andreas Hocevar
a5a156525f Restore simple axis order handling with fixed proj4 2021-07-22 14:20:55 +02:00
Andreas Hocevar
a26fe5f31b Make Raster source work as generics type for Image layer 2021-07-22 12:57:39 +02:00
Andreas Hocevar
8004e0faad Merge pull request #12527 from mike-000/patch-1
Treat custom loaders without success/fail handling as if they were a void loader
2021-07-22 12:39:21 +02:00
Tim Schaub
c640457501 Merge pull request #12538 from tschaub/lazy-doc
Avoid creating context until needed
2021-07-21 07:41:26 -06:00
Tim Schaub
adff6f0e77 Avoid creating context until needed 2021-07-19 09:08:21 -06:00
Tim Schaub
58b7faed55 Merge pull request #12536 from openlayers/dependabot/npm_and_yarn/rollup-2.53.2
Bump rollup from 2.53.1 to 2.53.2
2021-07-19 09:08:10 -06:00
dependabot[bot]
48321a47d7 Bump rollup from 2.53.1 to 2.53.2
Bumps [rollup](https://github.com/rollup/rollup) from 2.53.1 to 2.53.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.53.1...v2.53.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 14:59:00 +00:00
Tim Schaub
dc93933973 Merge pull request #12537 from openlayers/dependabot/npm_and_yarn/rollup/plugin-node-resolve-13.0.2
Bump @rollup/plugin-node-resolve from 13.0.0 to 13.0.2
2021-07-19 08:58:14 -06:00
Tim Schaub
695fee9d3c Merge pull request #12535 from openlayers/dependabot/npm_and_yarn/webpack-5.45.1
Bump webpack from 5.44.0 to 5.45.1
2021-07-19 08:57:40 -06:00
Tim Schaub
9c2852bb7c Merge pull request #12534 from openlayers/dependabot/npm_and_yarn/eslint-7.31.0
Bump eslint from 7.30.0 to 7.31.0
2021-07-19 08:56:46 -06:00
Tim Schaub
408dace5c9 Merge pull request #12533 from openlayers/dependabot/npm_and_yarn/rollup/plugin-commonjs-19.0.1
Bump @rollup/plugin-commonjs from 19.0.0 to 19.0.1
2021-07-19 08:55:38 -06:00
dependabot[bot]
a32113afbf Bump @rollup/plugin-node-resolve from 13.0.0 to 13.0.2
Bumps [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/HEAD/packages/node-resolve) from 13.0.0 to 13.0.2.
- [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.0.2/packages/node-resolve)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 10:02:13 +00:00
dependabot[bot]
a81a2120e3 Bump webpack from 5.44.0 to 5.45.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.44.0 to 5.45.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.44.0...v5.45.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 10:01:31 +00:00
dependabot[bot]
8b3494a585 Bump eslint from 7.30.0 to 7.31.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.30.0 to 7.31.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.30.0...v7.31.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 10:01:14 +00:00
dependabot[bot]
822b967a9c Bump @rollup/plugin-commonjs from 19.0.0 to 19.0.1
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 19.0.0 to 19.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-v19.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>
2021-07-19 10:00:50 +00:00
MoonE
f1530364dd Merge pull request #12528 from MoonE/hit-detect-priority-test
Convert the hit tolerance priority example into a test
2021-07-17 17:49:21 +02:00
Maximilian Krög
19fb51183e Convert hit detect priority example to test 2021-07-17 15:09:38 +02:00
mike-000
6c862df03f include custom loader in rendercomplete test
include a VectorSource with custom loader (no success/fail handling) in rendercomplete test
2021-07-17 12:56:33 +01:00
mike-000
431beed45f Handle custom loaders without success/fail
Treat custom loaders without success/fail handling as if the were VOID
2021-07-16 20:44:03 +01:00
Tim Schaub
e8047f6d08 Merge pull request #12522 from tschaub/create-cluster
Shorter name for the option to create a custom cluster
2021-07-16 10:47:31 -06:00
Tim Schaub
1b9329ea91 Shorter name for the option to create a custom cluster 2021-07-15 21:35:59 -06:00
Andreas Hocevar
a617ef3caf Merge pull request #12506 from M393/fix-ol-ext-bar
Fix adding controls with map config
2021-07-15 18:33:26 +02:00
Maximilian Krög
8f8027c33a Fix adding controls with map config
If a control like ol.control.Bar adds sub controls when added to a map
it fails during map creating because the listeners are added after the control
was added to the map.
2021-07-15 14:19:08 +02:00
Maximilian Krög
5d7f7dbf51 Add test for subcontrol added during map contruction 2021-07-15 14:19:08 +02:00
Andreas Hocevar
10e38947cc Merge pull request #12487 from Razi91/cluster-feature-fn
Custom cluster feature creation function
2021-07-15 11:30:46 +02:00
Andreas Hocevar
94d0b85fde Merge pull request #12520 from ahocevar/release-notes-typo
Fix typo in changelog
2021-07-15 11:25:11 +02:00
Andreas Hocevar
5dd9836546 Fix typo in changelog 2021-07-15 11:24:32 +02:00
Andreas Hocevar
9f5da8cd76 Merge pull request #12519 from openlayers/release-v6.6.1
Release v6.6.1
2021-07-15 11:21:52 +02:00
Andreas Hocevar
1b2512d013 Develop on 6.6.2-dev 2021-07-15 11:16:58 +02:00
Andreas Hocevar
a8b949a802 Update package version to 6.6.1 2021-07-15 11:10:48 +02:00
Andreas Hocevar
61566f79e6 Changelog for v6.6.1 2021-07-15 10:45:26 +02:00
Andreas Hocevar
b1385e4175 Merge pull request #12498 from bryantevans00/canvaslayerrenderer-type-parameter
CanvasLayerRenderer: Forward LayerType type parameter to LayerRenderer
2021-07-15 10:34:35 +02:00
jkonieczny
e1b161bbbe remove setter/getter 2021-07-15 09:06:13 +02:00
Andreas Hocevar
50b3756424 Merge pull request #12518 from DaniEll-AT/patch-1
VectorEventType: Add 'changefeature' in @typedef
2021-07-14 19:59:00 +02:00
Daniel Ellmerer
2eb1bf479b VectorEventType: Add 'changefeature' in @typedef
'changefeature' is missing in @typedef - Add it.
2021-07-14 16:35:55 +02:00
Tim Schaub
f18eaf12c5 Merge pull request #12517 from ela-compil/update-sponsors
Update ela-compil sponsors section of README
2021-07-14 06:54:01 -06:00
Jakub Bartkowiak
9a61f9cc40 Update ela-compil sponsors section of README 2021-07-14 11:24:54 +02:00
Andreas Hocevar
917918e3ae Merge pull request #12511 from ahocevar/ela-compil-sponsor
Add ela-compil to sponsors section of README
2021-07-13 22:58:32 +02:00
Andreas Hocevar
8c0ba8abae Merge pull request #12513 from ahocevar/draw-sketch-point
Draw a sketch point when adding a vertex programmatically
2021-07-13 22:45:31 +02:00
MoonE
f87abdb612 Merge pull request #12507 from MoonE/fix-regular-shape-hit-detect-transparent-fill
Fix regular shape hit detect transparent fill
2021-07-13 17:54:41 +02:00
jkonieczny
a8f7d955af rename to createClusterFeature 2021-07-13 17:27:32 +02:00
Andreas Hocevar
93de780671 Draw a sketch point when adding a vertex programmatically 2021-07-13 16:07:59 +02:00
Andreas Hocevar
5fc89f5bbe Add ela-compil to sponsors section of README 2021-07-13 09:37:47 +02:00
Andreas Hocevar
7edc016e02 Merge pull request #12509 from ahocevar/listener-return-type
Allow any return type from listener functions
2021-07-13 08:18:25 +02:00
Andreas Hocevar
98e63c4bf1 Allow any return type from listener functions 2021-07-12 23:18:21 +02:00
Maximilian Krög
58e2e57638 Fix hit detection of RegularShape with transparent fill 2021-07-12 19:33:17 +02:00
Maximilian Krög
5f3b22bf7f Remove lineCap, it is useless on closed paths 2021-07-12 19:32:42 +02:00
jkonieczny
9fd25dddbf allow hydrating clustered features 2021-07-12 19:28:00 +02:00
Andreas Hocevar
e791bf4e33 Merge pull request #12505 from ahocevar/fix-settarget-type
Fix type of PluggableMap#setTarget() argument
2021-07-12 17:26:53 +02:00
Andreas Hocevar
146d41dfca Merge pull request #12503 from openlayers/dependabot/npm_and_yarn/webpack-5.44.0
Bump webpack from 5.42.0 to 5.44.0
2021-07-12 14:37:52 +02:00
Andreas Hocevar
f26e60dc50 Merge pull request #12502 from openlayers/dependabot/npm_and_yarn/types/geojson-7946.0.8
Bump @types/geojson from 7946.0.7 to 7946.0.8
2021-07-12 14:37:04 +02:00
Andreas Hocevar
171ce67aee Merge pull request #12501 from openlayers/dependabot/npm_and_yarn/rollup-2.53.1
Bump rollup from 2.52.7 to 2.53.1
2021-07-12 14:36:29 +02:00
Andreas Hocevar
d5e2a43755 Merge pull request #12500 from openlayers/dependabot/npm_and_yarn/types/arcgis-rest-api-10.4.5
Bump @types/arcgis-rest-api from 10.4.4 to 10.4.5
2021-07-12 14:31:00 +02:00
Andreas Hocevar
d7e9cc5285 Fix type of PluggableMap#setTarget() argument 2021-07-12 13:20:10 +02:00
dependabot[bot]
8203b4cf39 Bump webpack from 5.42.0 to 5.44.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.42.0 to 5.44.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.42.0...v5.44.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 10:01:41 +00:00
dependabot[bot]
b18b4e5f2a Bump @types/geojson from 7946.0.7 to 7946.0.8
Bumps [@types/geojson](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/geojson) from 7946.0.7 to 7946.0.8.
- [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>
2021-07-12 10:01:22 +00:00
dependabot[bot]
f7476409f1 Bump rollup from 2.52.7 to 2.53.1
Bumps [rollup](https://github.com/rollup/rollup) from 2.52.7 to 2.53.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.52.7...v2.53.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 10:01:05 +00:00
dependabot[bot]
b1c4c88ae8 Bump @types/arcgis-rest-api from 10.4.4 to 10.4.5
Bumps [@types/arcgis-rest-api](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/arcgis-rest-api) from 10.4.4 to 10.4.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/arcgis-rest-api)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 10:00:53 +00:00
Bryant Evans
709e933799 Forward LayerType type parameter to LayerRenderer 2021-07-12 09:00:20 +00:00
Tim Schaub
4c33b106ed Merge pull request #12495 from tschaub/tpyos
Edits to the changelog
2021-07-11 14:26:36 -06:00
Tim Schaub
0e7b9b9a08 Edits to the changelog 2021-07-11 14:21:29 -06:00
Andreas Hocevar
ec38b39f2e Merge pull request #12494 from openlayers/release-v6.6.0
Release v6.6.0
2021-07-11 22:12:06 +02:00
Andreas Hocevar
d9c50a31da Develop on 6.6.1-dev 2021-07-11 22:07:58 +02:00
Andreas Hocevar
4defa429cb Merge pull request #12493 from ahocevar/cleanup-readme
Remove obsolete section from README
2021-07-11 20:44:01 +02:00
Andreas Hocevar
bf090f44fd Remove obsolete section from README 2021-07-11 20:31:02 +02:00
226 changed files with 8903 additions and 2132 deletions

View File

@@ -70,39 +70,20 @@ OpenLayers appreciates contributions of all kinds. We especially want to thank
<br>
[![ela-compil logo](./sponsor-logos/ela-compil.png)](https://ela.pl/)
> We develop leading Physical Security Information Management (PSIM) software.
> OpenLayers is the core of our map engine and we love it!
> https://elacompil.recruitee.com/
<br>
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.
## IntelliSense (VS Code) support
The untranspiled sources in the `src/` folder are JSDoc type annotated. For applications authored in JavaScript, VS Code can get type definitions from these sources with a properly configured `jsconfig.json` in the project root:
<details><summary>jsconfig.json</summary>
```json
{
"compilerOptions": {
"checkJs": true,
"baseUrl": "./",
"paths": {
"ol": ["node_modules/ol/src"],
"ol/*": ["node_modules/ol/src/*"]
}
},
"include": [
"**/*.js",
"node_modules/ol/**/*.js"
],
"typeAcquisition": {
"exclude": ["ol"]
}
}
```
</details>
## TypeScript support
The [ol package](https://npmjs.com/package/ol) includes auto-generated TypeScript declarations as `*.d.ts` files.
@@ -121,6 +102,8 @@ For older browsers and platforms (Internet Explorer, Android 4.x, iOS v12 and ol
* [`Number.isInteger`](https://caniuse.com/isInteger): Available from [polyfill.io](https://polyfill.io/).
* [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
Check out the [hosted examples](https://openlayers.org/en/latest/examples/), the [workshop](https://openlayers.org/workshop/) or the [API documentation](https://openlayers.org/en/latest/apidoc/).

View File

@@ -1,6 +1,12 @@
## Upgrade notes
### Next version
### v6.8.0
There should be nothing special required when upgrading from v6.7 to v6.8.
### v6.7.0
There should be nothing special required when upgrading from v6.6 to v6.7.
### v6.6.0
@@ -22,7 +28,7 @@ The `undefinedHTML` option for the MousePosition control has been deprecated and
#### New `placeholder` option for the MousePosition control
When the mouse position is not available, the control renders a non-breaking space. To render somthing else instead,
When the mouse position is not available, the control renders a non-breaking space. To render something else instead,
set the `placeholder` option. If you want to retain the last position when the mouse leaves the viewport, set
`placeholder: false`. This will be the default behavior in a future release.

View File

@@ -1,6 +1,6 @@
# 6.6.0
With more than 160 pull requests from 14 contributors, this release brings improved support for using OpenLayers in Node.js enviromnents, a new WKB (well knowm binary) format, TypeScript declarations in the ol package, and more efficient vector tile rendering. In addition, several examples were added or improved, and many bugs were fixed.
With more than 160 pull requests from 14 contributors, this release brings improved support for using OpenLayers in Node.js environments, a new WKB (well known binary) format, TypeScript declarations in the ol package, and more efficient vector tile rendering. In addition, several examples were added or improved, and many bugs were fixed.
## Upgrade notes
@@ -22,7 +22,7 @@ The `undefinedHTML` option for the MousePosition control has been deprecated and
#### New `placeholder` option for the MousePosition control
When the mouse position is not available, the control renders a non-breaking space. To render somthing else instead,
When the mouse position is not available, the control renders a non-breaking space. To render something else instead,
set the `placeholder` option. If you want to retain the last position when the mouse leaves the viewport, set
`placeholder: false`. This will be the default behavior in a future release.
@@ -43,7 +43,7 @@ The `placeholder` option has no effect if the deprecated `undefinedHTML` option
* More efficient vector tile rendering to save battery on mobile devices and memory.
* New 'properties' option on layers for easier use of arbitrary properties in typed environments.
* Hit detection support when using OffscreenCanvas and workers for rendering.
* The [ol](https://npmjs.com/package/ol) now uses `"type": "module"` in `package.json` for easier use of OpenLayers in Node.js.
* The [ol package](https://npmjs.com/package/ol) now uses `"type": "module"` in `package.json` for easier use of OpenLayers in Node.js.
* New WKB (Well-Known Binary) format parser and serializer.
* Console warning when map container's width or height are zero.
* New `snapToPointer` option on the `Modify` interaction to control user experience when clicking a vertex far away from its center.

26
changelog/v6.6.1.md Normal file
View File

@@ -0,0 +1,26 @@
# 6.6.1
This is a bugfix release which brings improvements to the included TypeScript types, and fixes two minor issues with the Draw interaction and hit detection of regular shape symbols.
## List of all changes
* [#12498](https://github.com/openlayers/openlayers/pull/12498) - CanvasLayerRenderer: Forward LayerType type parameter to LayerRenderer ([@bryantevans00](https://github.com/bryantevans00))
* [#12518](https://github.com/openlayers/openlayers/pull/12518) - VectorEventType: Add 'changefeature' in @typedef ([@DaniEll-AT](https://github.com/DaniEll-AT))
* [#12517](https://github.com/openlayers/openlayers/pull/12517) - Update ela-compil sponsors section of README ([@ela-compil](https://github.com/ela-compil))
* [#12511](https://github.com/openlayers/openlayers/pull/12511) - Add ela-compil to sponsors section of README ([@ahocevar](https://github.com/ahocevar))
* [#12513](https://github.com/openlayers/openlayers/pull/12513) - Draw a sketch point when adding a vertex programmatically ([@ahocevar](https://github.com/ahocevar))
* [#12507](https://github.com/openlayers/openlayers/pull/12507) - Fix regular shape hit detect transparent fill ([@MoonE](https://github.com/MoonE))
* [#12509](https://github.com/openlayers/openlayers/pull/12509) - Allow any return type from listener functions ([@ahocevar](https://github.com/ahocevar))
* [#12505](https://github.com/openlayers/openlayers/pull/12505) - Fix type of PluggableMap#setTarget() argument ([@ahocevar](https://github.com/ahocevar))
* [#12495](https://github.com/openlayers/openlayers/pull/12495) - Edits to the changelog ([@tschaub](https://github.com/tschaub))
<details>
<summary>Dependency Updates</summary>
* [#12503](https://github.com/openlayers/openlayers/pull/12503) - Bump webpack from 5.42.0 to 5.44.0 ([@openlayers](https://github.com/openlayers))
* [#12502](https://github.com/openlayers/openlayers/pull/12502) - Bump @types/geojson from 7946.0.7 to 7946.0.8 ([@openlayers](https://github.com/openlayers))
* [#12501](https://github.com/openlayers/openlayers/pull/12501) - Bump rollup from 2.52.7 to 2.53.1 ([@openlayers](https://github.com/openlayers))
* [#12500](https://github.com/openlayers/openlayers/pull/12500) - Bump @types/arcgis-rest-api from 10.4.4 to 10.4.5 ([@openlayers](https://github.com/openlayers))
</details>

121
changelog/v6.7.0.md Normal file
View File

@@ -0,0 +1,121 @@
# 6.7.0
The 6.7 release includes a great batch of usability improvements, fixes, and new features. See the full list of changes from 100 pull requests below, but here are some highlights:
* New GeoTIFF source! With parsing support from the awesome [geotiff.js](https://geotiffjs.github.io/) library, you can now render layers from hosted GeoTIFF imagery. The GeoTIFF source gives you the ability to pull from multiple GeoTIFF images, read from arbitrary bands, run band math expressions, and style the imagery to your liking.
* New WebGL tile renderer. The GeoTIFF source is rendered with a new WebGL-based tile renderer. In addition to GeoTIFFs, the renderer supports layers with a generic DataTile source  these can be used to render aribtrary raster data and leverage the same style expressions as described above.
* More type checking. We continue to make improvements to the TypeScript definitions included in the `ol` package.
* New sources supporting the draft [OGC API - Tiles](https://ogcapi.ogc.org/tiles/) specification. The OGCMapTile and OGCVectorTile sources allow you to render data from services that implement the draft OGC tiles spec. Since the specification is not yet final, these sources are not yet part of the stable OpenLayers API and should be considered experimental.
* Custom cluster creation support, improved KML icon rendering, lots of fixes, and more. See below for all the detail.
## List of all changes
* [#12727](https://github.com/openlayers/openlayers/pull/12727) - Add missing 'boxstart' event to OnSignature ([@simonseyock](https://github.com/simonseyock))
* [#12718](https://github.com/openlayers/openlayers/pull/12718) - Rename function to avoid minification failure ([@tschaub](https://github.com/tschaub))
* [#12712](https://github.com/openlayers/openlayers/pull/12712) - Add convertToRGB option to GeoTIFF source ([@ahocevar](https://github.com/ahocevar))
* [#12716](https://github.com/openlayers/openlayers/pull/12716) - Spelling fix ([@fredj](https://github.com/fredj))
* [#12715](https://github.com/openlayers/openlayers/pull/12715) - Try harder to get the projection from GeoTIFF headers ([@tschaub](https://github.com/tschaub))
* [#12714](https://github.com/openlayers/openlayers/pull/12714) - Avoid creating duplicate projections in COG examples ([@tschaub](https://github.com/tschaub))
* [#12713](https://github.com/openlayers/openlayers/pull/12713) - Check for GeoTIFF CRS starting with last image ([@tschaub](https://github.com/tschaub))
* [#12709](https://github.com/openlayers/openlayers/pull/12709) - Support rendering of GeoTIFF images in pixel coordinates ([@tschaub](https://github.com/tschaub))
* [#12711](https://github.com/openlayers/openlayers/pull/12711) - Use band numbers starting with one ([@tschaub](https://github.com/tschaub))
* [#12710](https://github.com/openlayers/openlayers/pull/12710) - Spelling fix in GeoTIFF docs ([@tschaub](https://github.com/tschaub))
* [#12697](https://github.com/openlayers/openlayers/pull/12697) - Move description above type tag ([@tschaub](https://github.com/tschaub))
* [#12695](https://github.com/openlayers/openlayers/pull/12695) - Update Google KML icon anchors and correct icon scaling ([@mike-000](https://github.com/mike-000))
* [#12642](https://github.com/openlayers/openlayers/pull/12642) - Fix fullscreen in mapbox-style example ([@ahocevar](https://github.com/ahocevar))
* [#12624](https://github.com/openlayers/openlayers/pull/12624) - Improve API docs for optional properties ([@ahocevar](https://github.com/ahocevar))
* [#10963](https://github.com/openlayers/openlayers/pull/10963) - OGC map and vector tile sources ([@tschaub](https://github.com/tschaub))
* [#12690](https://github.com/openlayers/openlayers/pull/12690) - Fix return stride of forEachSegment ([@ahocevar](https://github.com/ahocevar))
* [#12684](https://github.com/openlayers/openlayers/pull/12684) - Fix view resolutions in example ([@mike-000](https://github.com/mike-000))
* [#12683](https://github.com/openlayers/openlayers/pull/12683) - Fix sprite offset for pixel ratio !== 1 ([@ahocevar](https://github.com/ahocevar))
* [#12671](https://github.com/openlayers/openlayers/pull/12671) - Configure cache on the layer instead of the source ([@tschaub](https://github.com/tschaub))
* [#12669](https://github.com/openlayers/openlayers/pull/12669) - Add opaque and transition options to GeoTIFF source ([@ahocevar](https://github.com/ahocevar))
* [#12667](https://github.com/openlayers/openlayers/pull/12667) - Additional docs and type checking for raster source ([@tschaub](https://github.com/tschaub))
* [#12666](https://github.com/openlayers/openlayers/pull/12666) - Re-add accidently removed events ([@ahocevar](https://github.com/ahocevar))
* [#12647](https://github.com/openlayers/openlayers/pull/12647) - Remove Translate option conflicts and update documentation ([@mike-000](https://github.com/mike-000))
* [#12008](https://github.com/openlayers/openlayers/pull/12008) - Rendering raster tiles with WebGL ([@tschaub](https://github.com/tschaub))
* [#12632](https://github.com/openlayers/openlayers/pull/12632) - Only warn of zero size when map should be visible ([@mike-000](https://github.com/mike-000))
* [#12626](https://github.com/openlayers/openlayers/pull/12626) - Set canvas style to override problem 3rd party css ([@mike-000](https://github.com/mike-000))
* [#12608](https://github.com/openlayers/openlayers/pull/12608) - Support more OGC CRS identifiers ([@tschaub](https://github.com/tschaub))
* [#12607](https://github.com/openlayers/openlayers/pull/12607) - Don't add color as possible type if it was not set ([@MoonE](https://github.com/MoonE))
* [#12605](https://github.com/openlayers/openlayers/pull/12605) - Some typing improvements ([@simonseyock](https://github.com/simonseyock))
* [#12600](https://github.com/openlayers/openlayers/pull/12600) - Make attribution getters public. ([@simonseyock](https://github.com/simonseyock))
* [#12597](https://github.com/openlayers/openlayers/pull/12597) - #12596 fix RasterSource does not end Tile transition ([@mwerlitz](https://github.com/mwerlitz))
* [#12599](https://github.com/openlayers/openlayers/pull/12599) - Replace reference image to match that of the CI ([@ahocevar](https://github.com/ahocevar))
* [#12595](https://github.com/openlayers/openlayers/pull/12595) - Generate correct type definitions with null ([@ahocevar](https://github.com/ahocevar))
* [#12578](https://github.com/openlayers/openlayers/pull/12578) - Update rendering test reference image ([@ahocevar](https://github.com/ahocevar))
* [#12577](https://github.com/openlayers/openlayers/pull/12577) - Use shx for the build-site script, clean before run ([@MoonE](https://github.com/MoonE))
* [#12575](https://github.com/openlayers/openlayers/pull/12575) - Add on(), un() and once() signatures for ol/source/Raster ([@ahocevar](https://github.com/ahocevar))
* [#12565](https://github.com/openlayers/openlayers/pull/12565) - Handle named colors as string in equal operator ([@sebakerckhof](https://github.com/sebakerckhof))
* [#12576](https://github.com/openlayers/openlayers/pull/12576) - Fix example and legacy build with nodejs 16.6 ([@MoonE](https://github.com/MoonE))
* [#12551](https://github.com/openlayers/openlayers/pull/12551) - Add WKB to the exports of ol/format ([@M393](https://github.com/M393))
* [#12550](https://github.com/openlayers/openlayers/pull/12550) - Add `grid` tag to examples. ([@simonseyock](https://github.com/simonseyock))
* [#12549](https://github.com/openlayers/openlayers/pull/12549) - Add `change:layers` event. ([@simonseyock](https://github.com/simonseyock))
* [#12545](https://github.com/openlayers/openlayers/pull/12545) - Restore simple axis order handling with fixed proj4 ([@ahocevar](https://github.com/ahocevar))
* [#12544](https://github.com/openlayers/openlayers/pull/12544) - Make Raster source work as generics type for Image layer ([@ahocevar](https://github.com/ahocevar))
* [#12527](https://github.com/openlayers/openlayers/pull/12527) - Treat custom loaders without success/fail handling as if they were a void loader ([@mike-000](https://github.com/mike-000))
* [#12538](https://github.com/openlayers/openlayers/pull/12538) - Avoid creating context until needed ([@tschaub](https://github.com/tschaub))
* [#12528](https://github.com/openlayers/openlayers/pull/12528) - Convert the hit tolerance priority example into a test ([@MoonE](https://github.com/MoonE))
* [#12522](https://github.com/openlayers/openlayers/pull/12522) - Shorter name for the option to create a custom cluster ([@tschaub](https://github.com/tschaub))
* [#12506](https://github.com/openlayers/openlayers/pull/12506) - Fix adding controls with map config ([@M393](https://github.com/M393))
* [#12487](https://github.com/openlayers/openlayers/pull/12487) - Custom cluster feature creation function ([@Razi91](https://github.com/Razi91))
* [#12520](https://github.com/openlayers/openlayers/pull/12520) - Fix typo in changelog ([@ahocevar](https://github.com/ahocevar))
* [#12519](https://github.com/openlayers/openlayers/pull/12519) - Release v6.6.1 ([@openlayers](https://github.com/openlayers))
<details>
<summary>Dependency Updates</summary>
* [#12703](https://github.com/openlayers/openlayers/pull/12703) - Bump terser-webpack-plugin from 5.1.4 to 5.2.3 ([@openlayers](https://github.com/openlayers))
* [#12704](https://github.com/openlayers/openlayers/pull/12704) - Bump @babel/eslint-parser from 7.15.0 to 7.15.4 ([@openlayers](https://github.com/openlayers))
* [#12705](https://github.com/openlayers/openlayers/pull/12705) - Bump webpack from 5.51.1 to 5.52.0 ([@openlayers](https://github.com/openlayers))
* [#12706](https://github.com/openlayers/openlayers/pull/12706) - Bump webpack-dev-server from 4.0.0 to 4.1.0 ([@openlayers](https://github.com/openlayers))
* [#12707](https://github.com/openlayers/openlayers/pull/12707) - Bump @babel/core from 7.15.0 to 7.15.5 ([@openlayers](https://github.com/openlayers))
* [#12702](https://github.com/openlayers/openlayers/pull/12702) - Bump @babel/preset-env from 7.15.0 to 7.15.4 ([@openlayers](https://github.com/openlayers))
* [#12677](https://github.com/openlayers/openlayers/pull/12677) - Bump marked from 3.0.0 to 3.0.2 ([@openlayers](https://github.com/openlayers))
* [#12678](https://github.com/openlayers/openlayers/pull/12678) - Bump globby from 12.0.1 to 12.0.2 ([@openlayers](https://github.com/openlayers))
* [#12679](https://github.com/openlayers/openlayers/pull/12679) - Bump mocha from 9.1.0 to 9.1.1 ([@openlayers](https://github.com/openlayers))
* [#12657](https://github.com/openlayers/openlayers/pull/12657) - Bump mocha from 9.0.3 to 9.1.0 ([@openlayers](https://github.com/openlayers))
* [#12650](https://github.com/openlayers/openlayers/pull/12650) - Bump webpack from 5.50.0 to 5.51.1 ([@openlayers](https://github.com/openlayers))
* [#12654](https://github.com/openlayers/openlayers/pull/12654) - Bump webpack-dev-server from 4.0.0-rc.0 to 4.0.0 ([@openlayers](https://github.com/openlayers))
* [#12653](https://github.com/openlayers/openlayers/pull/12653) - Bump globby from 12.0.0 to 12.0.1 ([@openlayers](https://github.com/openlayers))
* [#12652](https://github.com/openlayers/openlayers/pull/12652) - Bump loglevelnext from 5.0.5 to 5.0.6 ([@openlayers](https://github.com/openlayers))
* [#12651](https://github.com/openlayers/openlayers/pull/12651) - Bump rollup from 2.56.2 to 2.56.3 ([@openlayers](https://github.com/openlayers))
* [#12627](https://github.com/openlayers/openlayers/pull/12627) - Bump webpack-cli from 4.7.2 to 4.8.0 ([@openlayers](https://github.com/openlayers))
* [#12631](https://github.com/openlayers/openlayers/pull/12631) - Bump marked from 2.1.3 to 3.0.0 ([@openlayers](https://github.com/openlayers))
* [#12630](https://github.com/openlayers/openlayers/pull/12630) - Bump webpack from 5.49.0 to 5.50.0 ([@openlayers](https://github.com/openlayers))
* [#12629](https://github.com/openlayers/openlayers/pull/12629) - Bump yargs from 17.1.0 to 17.1.1 ([@openlayers](https://github.com/openlayers))
* [#12628](https://github.com/openlayers/openlayers/pull/12628) - Bump rollup from 2.56.1 to 2.56.2 ([@openlayers](https://github.com/openlayers))
* [#12616](https://github.com/openlayers/openlayers/pull/12616) - Bump webpack from 5.47.1 to 5.49.0 ([@openlayers](https://github.com/openlayers))
* [#12617](https://github.com/openlayers/openlayers/pull/12617) - Bump @babel/eslint-parser from 7.14.9 to 7.15.0 ([@openlayers](https://github.com/openlayers))
* [#12615](https://github.com/openlayers/openlayers/pull/12615) - Bump rollup from 2.56.0 to 2.56.1 ([@openlayers](https://github.com/openlayers))
* [#12614](https://github.com/openlayers/openlayers/pull/12614) - Bump puppeteer from 10.1.0 to 10.2.0 ([@openlayers](https://github.com/openlayers))
* [#12613](https://github.com/openlayers/openlayers/pull/12613) - Bump yargs from 17.0.1 to 17.1.0 ([@openlayers](https://github.com/openlayers))
* [#12612](https://github.com/openlayers/openlayers/pull/12612) - Bump @babel/core from 7.14.8 to 7.15.0 ([@openlayers](https://github.com/openlayers))
* [#12611](https://github.com/openlayers/openlayers/pull/12611) - Bump @babel/preset-env from 7.14.9 to 7.15.0 ([@openlayers](https://github.com/openlayers))
* [#12610](https://github.com/openlayers/openlayers/pull/12610) - Bump clean-css-cli from 5.3.2 to 5.3.3 ([@openlayers](https://github.com/openlayers))
* [#12602](https://github.com/openlayers/openlayers/pull/12602) - Bump rollup from 2.54.0 to 2.56.0 ([@openlayers](https://github.com/openlayers))
* [#12583](https://github.com/openlayers/openlayers/pull/12583) - Bump webpack-sources from 2.3.1 to 3.2.0 ([@openlayers](https://github.com/openlayers))
* [#12581](https://github.com/openlayers/openlayers/pull/12581) - Bump @rollup/plugin-commonjs from 19.0.1 to 20.0.0 ([@openlayers](https://github.com/openlayers))
* [#12582](https://github.com/openlayers/openlayers/pull/12582) - Bump @babel/preset-env from 7.14.8 to 7.14.9 ([@openlayers](https://github.com/openlayers))
* [#12585](https://github.com/openlayers/openlayers/pull/12585) - Bump clean-css-cli from 5.3.0 to 5.3.2 ([@openlayers](https://github.com/openlayers))
* [#12584](https://github.com/openlayers/openlayers/pull/12584) - Bump webpack from 5.46.0 to 5.47.1 ([@openlayers](https://github.com/openlayers))
* [#12586](https://github.com/openlayers/openlayers/pull/12586) - Bump @babel/eslint-parser from 7.14.7 to 7.14.9 ([@openlayers](https://github.com/openlayers))
* [#12588](https://github.com/openlayers/openlayers/pull/12588) - Bump sinon from 11.1.1 to 11.1.2 ([@openlayers](https://github.com/openlayers))
* [#12589](https://github.com/openlayers/openlayers/pull/12589) - Bump eslint from 7.31.0 to 7.32.0 ([@openlayers](https://github.com/openlayers))
* [#12559](https://github.com/openlayers/openlayers/pull/12559) - Bump rollup from 2.53.2 to 2.54.0 ([@openlayers](https://github.com/openlayers))
* [#12560](https://github.com/openlayers/openlayers/pull/12560) - Bump @babel/core from 7.14.6 to 7.14.8 ([@openlayers](https://github.com/openlayers))
* [#12558](https://github.com/openlayers/openlayers/pull/12558) - Bump webpack-dev-server from 4.0.0-beta.3 to 4.0.0-rc.0 ([@openlayers](https://github.com/openlayers))
* [#12556](https://github.com/openlayers/openlayers/pull/12556) - Bump globby from 11.0.4 to 12.0.0 ([@openlayers](https://github.com/openlayers))
* [#12555](https://github.com/openlayers/openlayers/pull/12555) - Bump webpack from 5.45.1 to 5.46.0 ([@openlayers](https://github.com/openlayers))
* [#12554](https://github.com/openlayers/openlayers/pull/12554) - Bump mocha from 9.0.2 to 9.0.3 ([@openlayers](https://github.com/openlayers))
* [#12553](https://github.com/openlayers/openlayers/pull/12553) - Bump @babel/preset-env from 7.14.7 to 7.14.8 ([@openlayers](https://github.com/openlayers))
* [#12552](https://github.com/openlayers/openlayers/pull/12552) - Bump @rollup/plugin-node-resolve from 13.0.2 to 13.0.4 ([@openlayers](https://github.com/openlayers))
* [#12536](https://github.com/openlayers/openlayers/pull/12536) - Bump rollup from 2.53.1 to 2.53.2 ([@openlayers](https://github.com/openlayers))
* [#12537](https://github.com/openlayers/openlayers/pull/12537) - Bump @rollup/plugin-node-resolve from 13.0.0 to 13.0.2 ([@openlayers](https://github.com/openlayers))
* [#12535](https://github.com/openlayers/openlayers/pull/12535) - Bump webpack from 5.44.0 to 5.45.1 ([@openlayers](https://github.com/openlayers))
* [#12534](https://github.com/openlayers/openlayers/pull/12534) - Bump eslint from 7.30.0 to 7.31.0 ([@openlayers](https://github.com/openlayers))
* [#12533](https://github.com/openlayers/openlayers/pull/12533) - Bump @rollup/plugin-commonjs from 19.0.0 to 19.0.1 ([@openlayers](https://github.com/openlayers))
</details>

60
changelog/v6.8.0.md Normal file
View File

@@ -0,0 +1,60 @@
# 6.8.0
The 6.8 release builds on the momentum of 6.7 with some great new enhancements. Data tiles now handle 32-bit data in addition to 8-bit. Views properties can now be provided that sources that fetch view-related data. Vector tile rendering got some performance enhancements. Find detail on these features and a number of fixes in the list of changes below.
## List of all changes
* [#12785](https://github.com/openlayers/openlayers/pull/12785) - Promise.allSettled polyfill and other browser compatibilty ([@mike-000](https://github.com/mike-000))
* [#12807](https://github.com/openlayers/openlayers/pull/12807) - Updated styles ([@tschaub](https://github.com/tschaub))
* [#12806](https://github.com/openlayers/openlayers/pull/12806) - Update to the WebGL sea level example ([@tschaub](https://github.com/tschaub))
* [#12808](https://github.com/openlayers/openlayers/pull/12808) - Update expectations for vector tile icon label rendering ([@tschaub](https://github.com/tschaub))
* [#12804](https://github.com/openlayers/openlayers/pull/12804) - Make vector tiles rendering simpler and a bit faster ([@ahocevar](https://github.com/ahocevar))
* [#12802](https://github.com/openlayers/openlayers/pull/12802) - Enqueue tiles at the next step in the animation ([@tschaub](https://github.com/tschaub))
* [#12801](https://github.com/openlayers/openlayers/pull/12801) - Update ol-mapbox-style to latest version without ol peer dependency ([@ahocevar](https://github.com/ahocevar))
* [#12792](https://github.com/openlayers/openlayers/pull/12792) - Do not do any canvas work when there are no features to render ([@ahocevar](https://github.com/ahocevar))
* [#12797](https://github.com/openlayers/openlayers/pull/12797) - Update geotiff ([@ahocevar](https://github.com/ahocevar))
* [#12799](https://github.com/openlayers/openlayers/pull/12799) - All layers now call dispose on the renderer ([@tschaub](https://github.com/tschaub))
* [#12798](https://github.com/openlayers/openlayers/pull/12798) - More cleanup in the WebGL tile layer's dispose method ([@tschaub](https://github.com/tschaub))
* [#12795](https://github.com/openlayers/openlayers/pull/12795) - New tile source for the WMTS example ([@mike-000](https://github.com/mike-000))
* [#12793](https://github.com/openlayers/openlayers/pull/12793) - Add a method to set the map layers ([@tschaub](https://github.com/tschaub))
* [#12789](https://github.com/openlayers/openlayers/pull/12789) - Handle TileJSON urls in Mapbox Style document ([@ahocevar](https://github.com/ahocevar))
* [#12790](https://github.com/openlayers/openlayers/pull/12790) - Allow maps to be configured with a promise for view props ([@tschaub](https://github.com/tschaub))
* [#12777](https://github.com/openlayers/openlayers/pull/12777) - Fix offscreen-canvas example ([@ahocevar](https://github.com/ahocevar))
* [#12778](https://github.com/openlayers/openlayers/pull/12778) - Do not render vector tiles unless they are being used ([@ahocevar](https://github.com/ahocevar))
* [#12773](https://github.com/openlayers/openlayers/pull/12773) - Enable WebGL extensions when required ([@tschaub](https://github.com/tschaub))
* [#12774](https://github.com/openlayers/openlayers/pull/12774) - Fix text decluttering when segment length is zero ([@MoonE](https://github.com/MoonE))
* [#12770](https://github.com/openlayers/openlayers/pull/12770) - Use Uint8Array instead of Uint8ClampedArray for increased browser compatibility ([@tschaub](https://github.com/tschaub))
* [#12759](https://github.com/openlayers/openlayers/pull/12759) - #12758: Allow undefined to be passed to control setMap(). Also fix type of getMap() ([@jumpinjackie](https://github.com/jumpinjackie))
* [#12760](https://github.com/openlayers/openlayers/pull/12760) - Fix opacity handling for tile and vector layers ([@ahocevar](https://github.com/ahocevar))
* [#12764](https://github.com/openlayers/openlayers/pull/12764) - Fix ImageInformationResponse typedef ([@webwitcher](https://github.com/webwitcher))
* [#12769](https://github.com/openlayers/openlayers/pull/12769) - Remove extra closing anchor tag ([@tschaub](https://github.com/tschaub))
* [#12761](https://github.com/openlayers/openlayers/pull/12761) - Add Float Textures for GL Rendering / DataTiles ([@theduckylittle](https://github.com/theduckylittle))
* [#12740](https://github.com/openlayers/openlayers/pull/12740) - Various fixes for browser compatibility issues ([mike-000](https://github.com/search?q=mike-000&type=Users))
* [#12741](https://github.com/openlayers/openlayers/pull/12741) - Minimal documentation for GMLBase ([@mike-000](https://github.com/mike-000))
* [#12743](https://github.com/openlayers/openlayers/pull/12743) - Remove docs reference to unmanaged layer and Select ([@mike-000](https://github.com/mike-000))
* [#12734](https://github.com/openlayers/openlayers/pull/12734) - Continue supporting IE11 in examples and legacy build ([@ahocevar](https://github.com/ahocevar))
* [#12739](https://github.com/openlayers/openlayers/pull/12739) - Change canvas style from initial to unset ([@mike-000](https://github.com/mike-000))
* [#12731](https://github.com/openlayers/openlayers/pull/12731) - Handle resolution and tile loadingstrategy with user projection ([@ahocevar](https://github.com/ahocevar))
* [#12736](https://github.com/openlayers/openlayers/pull/12736) - OnSignatures return more specific type ([@simonseyock](https://github.com/simonseyock))
* [#12732](https://github.com/openlayers/openlayers/pull/12732) - Add <meta charset="utf-8"> to Quick Start ([@mike-000](https://github.com/mike-000))
* [#12728](https://github.com/openlayers/openlayers/pull/12728) - Release v6.7.0 ([@openlayers](https://github.com/openlayers))
<details>
<summary>Dependency Updates</summary>
* [#12784](https://github.com/openlayers/openlayers/pull/12784) - Bump webpack-dev-server from 4.2.0 to 4.2.1 ([@openlayers](https://github.com/openlayers))
* [#12783](https://github.com/openlayers/openlayers/pull/12783) - Bump marked from 3.0.3 to 3.0.4 ([@openlayers](https://github.com/openlayers))
* [#12782](https://github.com/openlayers/openlayers/pull/12782) - Bump webpack-sources from 3.2.0 to 3.2.1 ([@openlayers](https://github.com/openlayers))
* [#12781](https://github.com/openlayers/openlayers/pull/12781) - Bump webpack from 5.52.1 to 5.53.0 ([@openlayers](https://github.com/openlayers))
* [#12780](https://github.com/openlayers/openlayers/pull/12780) - Bump @babel/eslint-parser from 7.15.4 to 7.15.7 ([@openlayers](https://github.com/openlayers))
* [#12750](https://github.com/openlayers/openlayers/pull/12750) - Bump webpack-dev-server from 4.1.0 to 4.2.0 ([@openlayers](https://github.com/openlayers))
* [#12749](https://github.com/openlayers/openlayers/pull/12749) - Bump marked from 3.0.2 to 3.0.3 ([@openlayers](https://github.com/openlayers))
* [#12748](https://github.com/openlayers/openlayers/pull/12748) - Bump ol-mapbox-style from 6.4.1 to 6.4.2 ([@openlayers](https://github.com/openlayers))
* [#12747](https://github.com/openlayers/openlayers/pull/12747) - Bump terser-webpack-plugin from 5.2.3 to 5.2.4 ([@openlayers](https://github.com/openlayers))
* [#12746](https://github.com/openlayers/openlayers/pull/12746) - Bump @babel/preset-env from 7.15.4 to 7.15.6 ([@openlayers](https://github.com/openlayers))
* [#12745](https://github.com/openlayers/openlayers/pull/12745) - Bump webpack from 5.52.0 to 5.52.1 ([@openlayers](https://github.com/openlayers))
* [#12744](https://github.com/openlayers/openlayers/pull/12744) - Bump webpack-dev-middleware from 5.0.0 to 5.1.0 ([@openlayers](https://github.com/openlayers))
</details>

5
changelog/v6.8.1.md Normal file
View File

@@ -0,0 +1,5 @@
# 6.6.1
This is a patch release which updates `ol.css` to restore a legible control button size in applications that do not have a css `font-size` set for `button` elements.
* [#12811](https://github.com/openlayers/openlayers/pull/12811) - Controls inherit font size from parent ([@tschaub](https://github.com/tschaub))

View File

@@ -27,7 +27,8 @@
<a href="module-ol_layer_Tile-TileLayer.html">ol/layer/Tile</a><br>
<a href="module-ol_layer_Image-ImageLayer.html">ol/layer/Image</a><br>
<a href="module-ol_layer_Vector-VectorLayer.html">ol/layer/Vector</a><br>
<a href="module-ol_layer_VectorTile-VectorTileLayer.html">ol/layer/VectorTile</a>
<a href="module-ol_layer_VectorTile-VectorTileLayer.html">ol/layer/VectorTile</a><br>
<a href="module-ol_layer_WebGLTile-WebGLTileLayer.html">ol/layer/WebGLTile</a>
</div>
</div>
</div>
@@ -58,7 +59,7 @@
<div class="card h-100 bg-light">
<div class="card-body">
<h4 class="card-title">Sources and formats</h4>
<a href="module-ol_source_Tile-TileSource.html">Tile sources</a> for <a href="module-ol_layer_Tile-TileLayer.html">ol/layer/Tile</a>
<a href="module-ol_source_Tile-TileSource.html">Tile sources</a> for <a href="module-ol_layer_Tile-TileLayer.html">ol/layer/Tile</a> or <a href="module-ol_layer_WebGLTile-WebGLTileLayer.html">ol/layer/WebGLTile</a>
<br><a href="module-ol_source_Image-ImageSource.html">Image sources</a> for <a href="module-ol_layer_Image-ImageLayer.html">ol/layer/Image</a>
<br><a href="module-ol_source_Vector-VectorSource.html">Vector sources</a> for <a href="module-ol_layer_Vector-VectorLayer.html">ol/layer/Vector</a>
<br><a href="module-ol_source_VectorTile-VectorTile.html">Vector tile sources</a> for <a href="module-ol_layer_VectorTile-VectorTileLayer.html">ol/layer/VectorTile</a>
@@ -71,7 +72,7 @@
<div class="card h-100 bg-light">
<div class="card-body">
<h4 class="card-title">Projections</h4>
<p>All coordinates and extents need to be provided in view projection (default: EPSG:3857). To transform, use <a href="module-ol_proj.html#.transform">ol/proj#transform()</a> and <a href="module-ol_proj.html#.transformExtent">ol/proj#transformExtent()</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">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>
<a href="module-ol_proj.html">ol/proj</a>
</div>
</div>

View File

@@ -70,7 +70,7 @@
<?js if (!param.subparams) {?>
<td class="type">
<?js if (param.type && param.type.names) {?>
<?js= self.partial('type.tmpl', 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 if (typeof param.defaultvalue !== 'undefined') { ?>
(defaults to <?js= self.htmlsafe(param.defaultvalue) ?>)
<?js } ?>

View File

@@ -23,7 +23,7 @@
/* Strict Type-Checking Options */
"strict": false, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
"strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */

View File

@@ -1,37 +1,37 @@
import TerserPlugin from 'terser-webpack-plugin';
import path, {dirname} from 'path';
import {fileURLToPath} from 'url';
const baseDir = dirname(fileURLToPath(import.meta.url));
import path from 'path';
export default {
entry: './build/index.js',
entry: ['regenerator-runtime/runtime', './build/index.js'],
devtool: 'source-map',
mode: 'production',
target: ['web', 'es5'],
module: {
rules: [
{
test: /^((?!es2015-)[\s\S])*\.js$/,
test: /\.m?js$/,
use: {
loader: 'buble-loader',
loader: 'babel-loader',
options: {
transforms: {dangerousForOf: true},
presets: [
[
'@babel/preset-env',
{
targets: 'last 2 versions, not dead',
},
],
],
},
},
include: [
path.join(
baseDir,
'..',
'node_modules',
'@mapbox',
'mapbox-gl-style-spec'
),
],
},
],
},
resolve: {
fallback: {
fs: false,
http: false,
https: false,
},
alias: {
ol: path.resolve('./build/ol'),
},

View File

@@ -233,10 +233,6 @@ Cannot determine IIIF Image API version from provided image information JSON.
A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`.
### 63
Support for the `OES_element_index_uint` WebGL extension is mandatory for WebGL layers.
### 64
Layer opacity must be a number.

View File

@@ -18,6 +18,7 @@ Below you'll find a complete working example. Create a new file, copy in the co
<!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 {

View File

@@ -13,6 +13,7 @@
"jsts": false,
"JSZip": false,
"mapboxgl": false,
"NumpyLoader": false,
"saveAs": false,
"toastr": false,
"topojson": false,

View File

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

View File

@@ -0,0 +1,13 @@
---
layout: example.html
title: NDVI+NDWI from two 16-bit COGs
shortdesc: Calculating NDVI+NDWI as green and blue values.
docs: >
The GeoTIFF layer in this example calculates the Normalized Difference Vegetation Index (NDVI)
and Normalized Difference Water Index (NDWI) from two cloud-optimized Sentinel 2 GeoTIFFs: one
with 10 m resolution and red and a near infrared bands, and one with 60 m resolution and a short
wave infrared channel. The NDVI is shown as green, the NDWI as blue. The 4th band is the alpha
band, which gets added when a source has a `nodata` value configured.
tags: "cog, ndvi, ndwi, sentinel, geotiff"
---
<div id="map" class="map"></div>

View File

@@ -0,0 +1,60 @@
import GeoTIFF from '../src/ol/source/GeoTIFF.js';
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/WebGLTile.js';
const source = new GeoTIFF({
sources: [
{
url: 'https://s2downloads.eox.at/demo/Sentinel-2/3857/R10m.tif',
bands: [3, 4],
min: 0,
nodata: 0,
max: 65535,
},
{
url: 'https://s2downloads.eox.at/demo/Sentinel-2/3857/R60m.tif',
bands: [9],
min: 0,
nodata: 0,
max: 65535,
},
],
});
source.setAttributions(
"<a href='https://s2maps.eu'>Sentinel-2 cloudless</a> by <a href='https://eox.at/'>EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2019)"
);
const ndvi = [
'/',
['-', ['band', 2], ['band', 1]],
['+', ['band', 2], ['band', 1]],
];
const ndwi = [
'/',
['-', ['band', 3], ['band', 1]],
['+', ['band', 3], ['band', 1]],
];
const map = new Map({
target: 'map',
layers: [
new TileLayer({
style: {
color: [
'color',
// red: | NDVI - NDWI |
['*', 255, ['abs', ['-', ndvi, ndwi]]],
// green: NDVI
['*', 255, ndvi],
// blue: NDWI
['*', 255, ndwi],
// alpha
['band', 4],
],
},
source,
}),
],
view: source.getView(),
});

11
examples/cog-math.html Normal file
View File

@@ -0,0 +1,11 @@
---
layout: example.html
title: NDVI from a Sentinel 2 COG
shortdesc: Calculating NDVI and applying a custom color map.
docs: >
The GeoTIFF layer in this example draws from two Sentinel 2 sources: a red band and a near infrared band.
The layer style includes a `color` expression that calculates the Normalized Difference Vegetation Index (NDVI)
from values in the two bands. The `interpolate` expression is used to map NDVI values to colors.
tags: "cog, ndvi"
---
<div id="map" class="map"></div>

81
examples/cog-math.js Normal file
View File

@@ -0,0 +1,81 @@
import GeoTIFF from '../src/ol/source/GeoTIFF.js';
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/WebGLTile.js';
const source = new GeoTIFF({
sources: [
{
// visible red, band 1 in the style expression above
url: 'https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/2020/S2A_36QWD_20200701_0_L2A/B04.tif',
max: 10000,
},
{
// near infrared, band 2 in the style expression above
url: 'https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/2020/S2A_36QWD_20200701_0_L2A/B08.tif',
max: 10000,
},
],
});
const map = new Map({
target: 'map',
layers: [
new TileLayer({
style: {
color: [
'interpolate',
['linear'],
// calculate NDVI, bands come from the sources below
[
'/',
['-', ['band', 2], ['band', 1]],
['+', ['band', 2], ['band', 1]],
],
// color ramp for NDVI values, ranging from -1 to 1
-0.2,
[191, 191, 191],
-0.1,
[219, 219, 219],
0,
[255, 255, 224],
0.025,
[255, 250, 204],
0.05,
[237, 232, 181],
0.075,
[222, 217, 156],
0.1,
[204, 199, 130],
0.125,
[189, 184, 107],
0.15,
[176, 194, 97],
0.175,
[163, 204, 89],
0.2,
[145, 191, 82],
0.25,
[128, 179, 71],
0.3,
[112, 163, 64],
0.35,
[97, 150, 54],
0.4,
[79, 138, 46],
0.45,
[64, 125, 36],
0.5,
[48, 110, 28],
0.55,
[33, 97, 18],
0.6,
[15, 84, 10],
0.65,
[0, 69, 0],
],
},
source: source,
}),
],
view: source.getView(),
});

View File

@@ -0,0 +1,12 @@
---
layout: example.html
title: GeoTIFF with Overviews
shortdesc: Rendering a GeoTIFF with external overviews as a layer.
docs: >
In some cases, a GeoTIFF may have external overviews. This example uses the
`overviews` property to provide URLs for the external overviews. The example
composes a false color composite using shortwave infrared (B6), near infrared (B5),
and visible green (B3) bands from a Landsat 8 image.
tags: "cog"
---
<div id="map" class="map"></div>

49
examples/cog-overviews.js Normal file
View File

@@ -0,0 +1,49 @@
import GeoTIFF from '../src/ol/source/GeoTIFF.js';
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/WebGLTile.js';
// scale values in this range to 0 - 1
const min = 10000;
const max = 15000;
const base =
'https://landsat-pds.s3.amazonaws.com/c1/L8/139/045/LC08_L1TP_139045_20170304_20170316_01_T1/LC08_L1TP_139045_20170304_20170316_01_T1';
const source = new GeoTIFF({
sources: [
{
url: `${base}_B6.TIF`,
overviews: [`${base}_B6.TIF.ovr`],
min: min,
max: max,
nodata: 0,
},
{
url: `${base}_B5.TIF`,
overviews: [`${base}_B5.TIF.ovr`],
min: min,
max: max,
nodata: 0,
},
{
url: `${base}_B3.TIF`,
overviews: [`${base}_B3.TIF.ovr`],
min: min,
max: max,
nodata: 0,
},
],
});
const map = new Map({
target: 'map',
layers: [
new TileLayer({
style: {
saturation: -0.3,
},
source: source,
}),
],
view: source.getView(),
});

12
examples/cog-pyramid.html Normal file
View File

@@ -0,0 +1,12 @@
---
layout: example.html
title: GeoTIFF tile pyramid
shortdesc: Rendering a COG tile pyramid as layer group.
docs: >
Data from a Cloud Optimized GeoTIFF (COG) tile pyramid can be rendered as a set of layers. In this
example, a pyramid of 3-band GeoTIFFs is used to render RGB data. For each tile of the pyramid, a
separate layer is created on demand. The lowest resolution layer serves as preview while higher resolutions are
loading.
tags: "cog, tilepyramid, stac"
---
<div id="map" class="map"></div>

71
examples/cog-pyramid.js Normal file
View File

@@ -0,0 +1,71 @@
import GeoTIFF from '../src/ol/source/GeoTIFF.js';
import LayerGroup from '../src/ol/layer/Group.js';
import Map from '../src/ol/Map.js';
import TileGrid from '../src/ol/tilegrid/TileGrid.js';
import View from '../src/ol/View.js';
import WebGLTileLayer from '../src/ol/layer/WebGLTile.js';
import {getIntersection} from '../src/ol/extent.js';
// Metadata from https://s2downloads.eox.at/demo/EOxCloudless/2019/rgb/2019_EOxCloudless_rgb.json
// Tile grid of the GeoTIFF pyramid layout
const tileGrid = new TileGrid({
origin: [-180, 90],
resolutions: [0.703125, 0.3515625, 0.17578125, 8.7890625e-2, 4.39453125e-2],
tileSizes: [
[512, 256],
[1024, 512],
[2048, 1024],
[4096, 2048],
[4096, 4096],
],
});
const pyramid = new LayerGroup();
const layerForUrl = {};
const zs = tileGrid.getResolutions().length;
function useLayer(z, x, y) {
const url = `https://s2downloads.eox.at/demo/EOxCloudless/2019/rgb/${z}/${y}/${x}.tif`;
if (!(url in layerForUrl)) {
pyramid.getLayers().push(
new WebGLTileLayer({
minZoom: z,
maxZoom: z === 0 || z === zs - 1 ? undefined : z + 1,
extent: tileGrid.getTileCoordExtent([z, x, y]),
source: new GeoTIFF({
sources: [
{
url: url,
},
],
}),
})
);
layerForUrl[url] = true;
}
}
const map = new Map({
target: 'map',
layers: [pyramid],
view: new View({
projection: 'EPSG:4326',
center: [0, 0],
zoom: 0,
showFullExtent: true,
}),
});
// Add overview layer
useLayer(0, 0, 0);
// Add layer for specific extent on demand
map.on('moveend', () => {
const view = map.getView();
tileGrid.forEachTileCoord(
getIntersection([-180, -90, 180, 90], view.calculateExtent()),
tileGrid.getZForResolution(view.getResolution()),
([z, x, y]) => useLayer(z, x, y)
);
});

10
examples/cog.html Normal file
View File

@@ -0,0 +1,10 @@
---
layout: example.html
title: Cloud Optimized GeoTIFF (COG)
shortdesc: Rendering a COG as a tiled layer.
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.
tags: "cog"
---
<div id="map" class="map"></div>

21
examples/cog.js Normal file
View File

@@ -0,0 +1,21 @@
import GeoTIFF from '../src/ol/source/GeoTIFF.js';
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/WebGLTile.js';
const source = new GeoTIFF({
sources: [
{
url: 'https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/2020/S2A_36QWD_20200701_0_L2A/TCI.tif',
},
],
});
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: source,
}),
],
view: source.getView(),
});

View File

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

View File

@@ -7,7 +7,7 @@ docs: >
Note that the built in interaction `ol/interaction/Translate` might be a better option for moving features.
tags: "drag, feature, vector, editing, custom, interaction"
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ
value: Your Mapbox access token from https://mapbox.com/ here
---
<div id="map" class="map"></div>

View File

@@ -131,7 +131,7 @@ const polygonFeature = new Feature(
);
const key =
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q';
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ';
const map = new Map({
interactions: defaultInteractions().extend([new Drag()]),

9
examples/data-tiles.html Normal file
View File

@@ -0,0 +1,9 @@
---
layout: example.html
title: Data Tiles
shortdesc: Generating tile data from scratch.
docs: >
This example generates RGBA tile data from scratch.
tags: "data tiles"
---
<div id="map" class="map"></div>

46
examples/data-tiles.js Normal file
View File

@@ -0,0 +1,46 @@
import DataTile from '../src/ol/source/DataTile.js';
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/WebGLTile.js';
import View from '../src/ol/View.js';
const size = 256;
const canvas = document.createElement('canvas');
canvas.width = size;
canvas.height = size;
const context = canvas.getContext('2d');
context.strokeStyle = 'white';
context.textAlign = 'center';
context.font = '24px sans-serif';
const lineHeight = 30;
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new DataTile({
loader: function (z, x, y) {
const half = size / 2;
context.clearRect(0, 0, size, size);
context.fillStyle = 'rgba(100, 100, 100, 0.5)';
context.fillRect(0, 0, size, size);
context.fillStyle = 'black';
context.fillText(`z: ${z}`, half, half - lineHeight);
context.fillText(`x: ${x}`, half, half);
context.fillText(`y: ${y}`, half, half + lineHeight);
context.strokeRect(0, 0, size, size);
const data = context.getImageData(0, 0, size, size).data;
// converting to Uint8Array for increased browser compatibility
return Promise.resolve(new Uint8Array(data.buffer));
},
// disable opacity transition to avoid overlapping labels during tile loading
transition: 0,
}),
}),
],
view: new View({
center: [0, 0],
zoom: 0,
}),
});

View File

@@ -56,10 +56,12 @@ imagery.on('prerender', function (evt) {
const control = document.getElementById('opacity');
const output = document.getElementById('output');
control.addEventListener('input', function () {
const listener = function () {
output.innerText = control.value;
imagery.setOpacity(control.value / 100);
});
};
control.addEventListener('input', listener);
control.addEventListener('change', listener);
output.innerText = control.value;
imagery.setOpacity(control.value / 100);

View File

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

View File

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

View File

@@ -179,8 +179,9 @@ const featureOverlay = new VectorLayer({
}),
});
document.getElementById('time').addEventListener('input', function () {
const value = parseInt(this.value, 10) / 100;
const control = document.getElementById('time');
const listener = function () {
const value = parseInt(control.value, 10) / 100;
const m = time.start + time.duration * value;
vectorSource.forEachFeature(function (feature) {
const geometry =
@@ -198,4 +199,6 @@ document.getElementById('time').addEventListener('input', function () {
}
});
map.render();
});
};
control.addEventListener('input', listener);
control.addEventListener('change', listener);

View File

@@ -8,7 +8,7 @@ docs: >
to limit rendering based on an extent (approximate country bounds).
tags: "extent, tilejson"
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ
value: Your Mapbox access token from https://mapbox.com/ here
---
<div id="map" class="map"></div>

View File

@@ -16,7 +16,7 @@ const extents = {
};
const key =
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q';
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ';
const base = new TileLayer({
source: new TileJSON({

View File

@@ -8,7 +8,7 @@ tags: "tilejson, input, bind, group, layergroup"
resources:
- https://code.jquery.com/jquery-3.5.1.min.js
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ
value: Your Mapbox access token from https://mapbox.com/ here
---
<div id="map" class="map"></div>

View File

@@ -6,7 +6,7 @@ import {Group as LayerGroup, Tile as TileLayer} from '../src/ol/layer.js';
import {fromLonLat} from '../src/ol/proj.js';
const key =
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q';
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ';
const map = new Map({
layers: [
@@ -49,7 +49,7 @@ function bindInputs(layerid, layer) {
visibilityInput.prop('checked', layer.getVisible());
const opacityInput = $(layerid + ' input.opacity');
opacityInput.on('input', function () {
opacityInput.on('input change', function () {
layer.setOpacity(parseFloat(this.value));
});
opacityInput.val(String(layer.getOpacity()));

View File

@@ -57,10 +57,8 @@ aerial.on('postrender', function (event) {
ctx.restore();
});
swipe.addEventListener(
'input',
function () {
map.render();
},
false
);
const listener = function () {
map.render();
};
swipe.addEventListener('input', listener);
swipe.addEventListener('change', listener);

View File

@@ -4,3 +4,13 @@
top: auto;
right: auto;
}
.map:-webkit-full-screen {
height: 100%;
margin: 0;
}
.map:-ms-fullscreen {
height: 100%;
}
.map:fullscreen {
height: 100%;
}

View File

@@ -9,7 +9,7 @@ docs: >
layers (provided they all share the same source).
tags: "mapbox, studio, vector, tiles"
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ
value: Your Mapbox access token from https://mapbox.com/ here
---
<div id="map" class="map"></div>

View File

@@ -8,7 +8,7 @@ const map = new Map({
new MapboxVector({
styleUrl: 'mapbox://styles/mapbox/bright-v9',
accessToken:
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q',
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ',
}),
],
view: new View({

View File

@@ -4,11 +4,11 @@ title: Advanced Mapbox Vector Tiles
shortdesc: Example of a Mapbox vector tiles map with custom tile grid.
docs: >
A vector tiles map which reuses the same source tiles for subsequent zoom levels to save bandwidth on mobile devices. **Note**: No map will be visible when the access token has expired.
tags: "mapbox, vector, tiles, mobile"
tags: "mapbox, vector, tiles, mobile, grid"
resources:
- resources/mapbox-streets-v6-style.js
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ
value: Your Mapbox access token from https://mapbox.com/ here
---
<div id="map" class="map"></div>

View File

@@ -8,7 +8,7 @@ import {Fill, Icon, Stroke, Style, Text} from '../src/ol/style.js';
import {get as getProjection} from '../src/ol/proj.js';
const key =
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q';
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ';
// Calculation of resolutions that match zoom levels 1, 3, 5, 7, 9, 11, 13, 15.
const resolutions = [];

View File

@@ -8,7 +8,7 @@ tags: "simple, mapbox, vector, tiles"
resources:
- resources/mapbox-streets-v6-style.js
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ
value: Your Mapbox access token from https://mapbox.com/ here
---
<div id="map" class="map"></div>

View File

@@ -6,7 +6,7 @@ import View from '../src/ol/View.js';
import {Fill, Icon, Stroke, Style, Text} from '../src/ol/style.js';
const key =
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q';
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ';
const map = new Map({
layers: [

View File

@@ -8,7 +8,7 @@ docs: >
<p>The rendering of the layers are here controlled using minResolution and maxResolution options.</p>
tags: "minResolution, maxResolution, resolution"
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ
value: Your Mapbox access token from https://mapbox.com/ here
---
<div id="map" class="map"></div>

View File

@@ -5,7 +5,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
const key =
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q';
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ';
/**
* Create the map.

3
examples/numpytile.css Normal file
View File

@@ -0,0 +1,3 @@
input[type="range"] {
vertical-align: text-bottom;
}

22
examples/numpytile.html Normal file
View File

@@ -0,0 +1,22 @@
---
layout: example.html
title: Rendering 16-bit NumpyTiles
shortdesc: Renders a multi-byte depth source image directly using WebGL.
docs: >
This example uses a <code>ol/source/DataTile</code> source to load multi-byte raster data in the
<a href="https://github.com/planetlabs/numpytiles-spec/">NumpyTile</a> format.
The source is rendered with a <code>ol/layer/WebGLTile</code> layer. Adjusting the sliders above
performs a contrast stretch by adjusting the style variables set on the layer.
tags: "numpytiles, webgl"
resources:
- https://unpkg.com/@planet/ol-numpytiles@2.0.2/umd/NumpyLoader.js
---
<div id="map" class="map"></div>
<div>
<h5>Contrast stretch</h5>
<ul>
<li>Min <input type="range" min="1000" max="10000" id="input-min"/> <span id="output-min"></span></li>
<li>Max <input type="range" min="10000" max="50000" id="input-max"/> <span id="output-max"></span></li>
</ul>
</div>

109
examples/numpytile.js Normal file
View File

@@ -0,0 +1,109 @@
import DataTileSource from '../src/ol/source/DataTile.js';
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/WebGLTile.js';
import View from '../src/ol/View.js';
import {fromLonLat} from '../src/ol/proj.js';
// 16-bit COG
// Which will be served as NumpyTiles.
const COG =
'https://storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2_analytic.tif';
function numpyTileLoader(z, x, y) {
const url = `https://api.cogeo.xyz/cog/tiles/WebMercatorQuad/${z}/${x}/${y}@1x?format=npy&url=${encodeURIComponent(
COG
)}`;
return fetch(url)
.then((r) => r.arrayBuffer())
.then((buffer) => NumpyLoader.fromArrayBuffer(buffer))
.then((numpyData) => {
// flatten the numpy data
const dataTile = new Float32Array(256 * 256 * 5);
const bandSize = 256 * 256;
for (let x = 0; x < 256; x++) {
for (let y = 0; y < 256; y++) {
const px = x + y * 256;
dataTile[px * 5 + 0] = numpyData.data[y * 256 + x];
dataTile[px * 5 + 1] = numpyData.data[bandSize + y * 256 + x];
dataTile[px * 5 + 2] = numpyData.data[bandSize * 2 + y * 256 + x];
dataTile[px * 5 + 3] = numpyData.data[bandSize * 3 + y * 256 + x];
dataTile[px * 5 + 4] =
numpyData.data[bandSize * 4 + y * 256 + x] > 0 ? 1.0 : 0;
}
}
return dataTile;
});
}
const interpolateBand = (bandIdx) => [
'interpolate',
['linear'],
['band', bandIdx],
['var', 'bMin'],
0,
['var', 'bMax'],
1,
];
const initialMin = 3000;
const initialMax = 18000;
const numpyLayer = new TileLayer({
style: {
color: [
'array',
interpolateBand(3),
interpolateBand(2),
interpolateBand(1),
['band', 5],
],
variables: {
'bMin': initialMin,
'bMax': initialMax,
},
},
source: new DataTileSource({
loader: numpyTileLoader,
bandCount: 5,
}),
});
const map = new Map({
target: 'map',
layers: [numpyLayer],
view: new View({
center: fromLonLat([172.933, 1.3567]),
zoom: 15,
}),
});
const inputMin = document.getElementById('input-min');
const inputMax = document.getElementById('input-max');
const outputMin = document.getElementById('output-min');
const outputMax = document.getElementById('output-max');
const handleMin = (evt) => {
numpyLayer.updateStyleVariables({
'bMin': parseFloat(evt.target.value),
'bMax': parseFloat(inputMax.value),
});
outputMin.innerText = evt.target.value;
};
inputMin.addEventListener('input', handleMin);
inputMin.addEventListener('change', handleMin);
const handleMax = (evt) => {
numpyLayer.updateStyleVariables({
'bMin': parseFloat(inputMin.value),
'bMax': parseFloat(evt.target.value),
});
outputMax.innerText = evt.target.value;
};
inputMax.addEventListener('input', handleMax);
inputMax.addEventListener('change', handleMax);
inputMin.value = initialMin;
inputMax.value = initialMax;
outputMin.innerText = initialMin;
outputMax.innerText = initialMax;

View File

@@ -92,7 +92,7 @@ const map = new Map({
],
target: 'map',
view: new View({
resolutions: createXYZ({tileSize: 512}).getResolutions89,
resolutions: createXYZ({tileSize: 512}).getResolutions(),
center: [0, 0],
zoom: 2,
}),

View File

@@ -88,6 +88,9 @@ function loadStyles() {
this.context = context;
this.container = {
firstElementChild: canvas,
style: {
opacity: layer.getOpacity(),
},
};
rendererTransform = transform;
};

View File

@@ -0,0 +1,11 @@
---
layout: example.html
title: OGC Map Tiles (Geographic)
shortdesc: Rendering map tiles from an OGC API Tiles service.
docs: >
The <a href="https://ogcapi.ogc.org/tiles/">OGC API Tiles</a> specification describes how a service can provide map tiles. Because the specification
has not yet been finalized, the <code>OGCMapTile</code> source is not yet part of the stable API.
tags: "ogc"
experimental: true
---
<div id="map" class="map"></div>

View File

@@ -0,0 +1,20 @@
import Map from '../src/ol/Map.js';
import OGCMapTile from '../src/ol/source/OGCMapTile.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new OGCMapTile({
url: 'https://maps.ecere.com/ogcapi/collections/blueMarble/map/tiles/WorldCRS84Quad',
}),
}),
],
view: new View({
projection: 'EPSG:4326',
center: [0, 0],
zoom: 1,
}),
});

View File

@@ -0,0 +1,11 @@
---
layout: example.html
title: OGC Map Tiles
shortdesc: Rendering map tiles from an OGC API Tiles service.
docs: >
The <a href="https://ogcapi.ogc.org/tiles/">OGC API Tiles</a> specification describes how a service can provide map tiles. Because the specification
has not yet been finalized, the <code>OGCMapTile</code> source is not yet part of the stable API.
tags: "ogc"
experimental: true
---
<div id="map" class="map"></div>

19
examples/ogc-map-tiles.js Normal file
View File

@@ -0,0 +1,19 @@
import Map from '../src/ol/Map.js';
import OGCMapTile from '../src/ol/source/OGCMapTile.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new OGCMapTile({
url: 'https://maps.ecere.com/ogcapi/collections/blueMarble/map/tiles/WebMercatorQuad',
}),
}),
],
view: new View({
center: [0, 0],
zoom: 1,
}),
});

View File

@@ -0,0 +1,11 @@
---
layout: example.html
title: OGC Vector Tiles
shortdesc: Rendering vector tiles from an OGC API Tiles service.
docs: >
The <a href="https://ogcapi.ogc.org/tiles/">OGC API Tiles</a> specification describes how a service can provide vector tiles. Because the specification
has not yet been finalized, the <code>OGCVectorTile</code> source is not yet part of the stable API.
tags: "ogc, vector"
experimental: true
---
<div id="map" class="map"></div>

View File

@@ -0,0 +1,21 @@
import MVT from '../src/ol/format/MVT.js';
import Map from '../src/ol/Map.js';
import OGCVectorTile from '../src/ol/source/OGCVectorTile.js';
import VectorTileLayer from '../src/ol/layer/VectorTile.js';
import View from '../src/ol/View.js';
const map = new Map({
target: 'map',
layers: [
new VectorTileLayer({
source: new OGCVectorTile({
url: 'https://maps.ecere.com/ogcapi/collections/NaturalEarth:cultural:ne_10m_admin_0_countries/tiles/WebMercatorQuad',
format: new MVT(),
}),
}),
],
view: new View({
center: [0, 0],
zoom: 1,
}),
});

View File

@@ -8,7 +8,7 @@ docs: >
Unlike the <a href="export-pdf.html">Export PDF example</a> the on screen map is only used to set the center and rotation.
The extent printed depends on the scale and page size. To print the scale bar and attributions the example uses the
<a href="https://html2canvas.hertzen.com/" target="_blank">html2canvas</a> library.
tags: "print, printing, scale, scaleline, export, pdf"
tags: "print, printing, scale, scaleline, export, pdf, grid"
resources:
- https://html2canvas.hertzen.com/dist/html2canvas.min.js
- https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.3.1/jspdf.umd.min.js

View File

@@ -5,7 +5,7 @@ import XYZ from '../src/ol/source/XYZ.js';
import {Image as ImageLayer, Tile as TileLayer} from '../src/ol/layer.js';
const minVgi = 0;
const maxVgi = 0.25;
const maxVgi = 0.5;
const bins = 10;
/**
@@ -87,7 +87,7 @@ const raster = new RasterSource({
summarize: summarize,
},
});
raster.set('threshold', 0.1);
raster.set('threshold', 0.25);
function createCounts(min, max, num) {
const values = new Array(num);

View File

@@ -137,7 +137,9 @@ function updateControlValue() {
}
updateControlValue();
thresholdControl.addEventListener('input', function () {
const listener = function () {
updateControlValue();
raster.changed();
});
};
thresholdControl.addEventListener('input', listener);
thresholdControl.addEventListener('change', listener);

View File

@@ -4,7 +4,7 @@ title: Raster Reprojection
shortdesc: Demonstrates client-side raster reprojection between various projections.
docs: >
This example shows client-side raster reprojection between various projections.
tags: "reprojection, projection, proj4js, osm, wms, wmts, hidpi"
tags: "reprojection, projection, proj4js, osm, wms, wmts, hidpi, grid"
---
<div id="map" class="map"></div>
<form class="form-inline">

View File

@@ -0,0 +1,21 @@
if (typeof Promise !== 'undefined' && !Promise.allSettled && Array.from) {
Promise.allSettled =
function (promises) {
return Promise.all(
Array.from(
promises,
function (p) {
return p.then (
function (value) {
return {status: 'fulfilled', value: value};
}
).catch(
function (reason) {
return {status: 'rejected', reason: reason};
}
);
}
)
)
};
}

View File

@@ -122,13 +122,15 @@ ol.inline>li {
background: url(map-background.jpg) repeat;
margin-bottom: 10px;
}
.ol-control {
line-height: normal;
}
.ol-attribution.ol-logo-only,
.ol-attribution.ol-uncollapsible {
max-width: calc(100% - 3em);
}
.ol-attribution ul {
font-size: 14px;
}
.iframe-info iframe {
width: 100%;
}

View File

@@ -5,7 +5,7 @@ shortdesc: Updating a tile source by changing the URL.
docs: >
You can call <code>source.setUrl()</code> to update the URL for a tile source. Note that when you change the URL for a tile source, existing tiles will not be replaced until new tiles are loaded. If you are interested instead in clearing currently rendered tiles, you can call the <code>source.refresh()</code> method. Alternatively, you can use two separate sources if you want to remove rendered tiles and start over loading new tiles.
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ
value: Your Mapbox access token from https://mapbox.com/ here
---
<div id="map" class="map"></div>

View File

@@ -4,7 +4,7 @@ import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
const key =
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q';
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ';
const baseUrl = 'https://{a-c}.tiles.mapbox.com/v4';
const urls = [
baseUrl + '/mapbox.blue-marble-topo-jan/{z}/{x}/{y}.png?access_token=' + key,

View File

@@ -67,10 +67,12 @@ const map = new Map({
const control = document.getElementById('level');
const output = document.getElementById('output');
control.addEventListener('input', function () {
const listener = function () {
output.innerText = control.value;
raster.changed();
});
};
control.addEventListener('input', listener);
control.addEventListener('change', listener);
output.innerText = control.value;
raster.on('beforeoperations', function (event) {

View File

@@ -3,7 +3,7 @@ layout: example.html
title: Select Features
shortdesc: Example of using the Select interaction.
docs: >
Choose between <code>Single-click</code>, <code>Click</code>, <code>Hover</code> and <code>Alt+Click</code> as the event type for selection in the combobox below. When using <code>Single-click</code> or <code>Click</code> you can hold do <code>Shift</code> key to toggle the feature in the selection.</p>
Choose between <code>Single-click</code>, <code>Click</code>, <code>Hover</code> and <code>Alt+Click</code> as the event type for selection in the combobox below. When using <code>Single-click</code> or <code>Click</code> you can hold the <code>Shift</code> key to toggle the feature in the selection.</p>
<p>Note: when <code>Single-click</code> is used double-clicks won't select features. This in contrast to <code>Click</code>, where a double-click will both select the feature and zoom the map (because of the <code>DoubleClickZoom</code> interaction). Note that <code>Single-click</code> is less responsive than <code>Click</code> because of the delay it uses to detect double-clicks.</p>
<p>In this example, a listener is registered for the Select interaction's <code>select</code> event in order to update the selection status above.
tags: "select, vector"

View File

@@ -6,7 +6,7 @@ docs: >
This example will display a tiled MaxBox layer semi-transparently over an OSM background. The OSM layer is changed to black and white by using a CSS filter.
tags: "transparent, osm, tilejson, css"
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ
value: Your Mapbox access token from https://mapbox.com/ here
---
<div id="map" class="map"></div>

View File

@@ -6,7 +6,7 @@ import View from '../src/ol/View.js';
import {fromLonLat} from '../src/ol/proj.js';
const key =
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q';
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ';
const map = new Map({
layers: [

View File

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

View File

@@ -69,6 +69,7 @@
<link rel="stylesheet" href="./resources/layout.css" type="text/css">
<script src="https://unpkg.com/elm-pep"></script>
<script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL,TextDecoder,Number.isInteger"></script>
<script src="./resources/Promise.allSettled.js"></script>
{{{ extraHead.local }}}
{{{ css.tag }}}
<title>{{ title }}</title>

View File

@@ -10,7 +10,7 @@ docs: >
renders a tile loading progress bar at the bottom of the map.</p>
tags: "tile, events, loading"
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ
value: Your Mapbox access token from https://mapbox.com/ here
---
<div class="wrapper">

View File

@@ -3,7 +3,9 @@ layout: example.html
title: Translate Features
shortdesc: Example of a translate features interaction.
docs: >
This example demonstrates how the translate and select interactions can be used together. Zoom in to an area of interest and click to select a feature. Then drag the feature around to move it elsewhere on the map.
This example demonstrates how the translate and select interactions can be used together.
Zoom in to an area of interest and click to select a feature or hold the <code>Shift</code> key and select multiple features.
Then drag the features around to move them elsewhere on the map.
tags: "drag, translate, feature, vector, editing"
---
<div id="map" class="map"></div>

View File

@@ -7,7 +7,7 @@ docs: >
Tiles made with <a href="https://tilemill-project.github.io/tilemill/">TileMill</a>. Hosting on <a href="https://www.mapbox.com/">mapbox.com</a> or with open-source <a href="https://github.com/maptiler/tileserver-php">TileServer</a>.
tags: "utfgrid, tilejson"
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ
value: Your Mapbox access token from https://mapbox.com/ here
---
<div id="map" class="map"></div>

View File

@@ -6,7 +6,7 @@ import UTFGrid from '../src/ol/source/UTFGrid.js';
import View from '../src/ol/View.js';
const key =
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q';
'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2t0cGdwMHVnMGdlbzMxbDhwazBic2xrNSJ9.WbcTL9uj8JPAsnT9mgb7oQ';
const mapLayer = new TileLayer({
source: new TileJSON({

View File

@@ -5,7 +5,7 @@ shortdesc: Example showing vector tiles in EPSG:4326 (styled using ol-mapbox-sty
docs: >
Example showing vector tiles in EPSG:4326 (styled using `ol-mapbox-style`) loaded from maptiler.com.
**Note**: Make sure to get your own API key at https://www.maptiler.com/cloud/ when using this example. No map will be visible when the API key has expired.
tags: "vector tiles, epsg4326, mapbox style, ol-mapbox-style, maptiler"
tags: "vector tiles, epsg4326, mapbox style, ol-mapbox-style, maptiler, grid"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API key at https://www.maptiler.com/cloud/

View File

@@ -0,0 +1,16 @@
---
layout: example.html
title: WFS with geographic coordinates
shortdesc: Example of using WFS with a Tile strategy.
docs: >
This example loads new features from GeoServer WFS with a tile based loading strategy.
Calling the <code>useGeographic</code> function in the <code>'ol/proj'</code> module
makes it so the map view uses geographic coordinates (even if the view projection is
not geographic).
tags: "geographic, vector, WFS, tile, strategy, loading, server, maptiler"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API key at https://www.maptiler.com/cloud/
experimental: true
---
<div id="map" class="map"></div>

View File

@@ -0,0 +1,60 @@
import GeoJSON from '../src/ol/format/GeoJSON.js';
import Map from '../src/ol/Map.js';
import VectorSource from '../src/ol/source/Vector.js';
import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
import {Stroke, Style} from '../src/ol/style.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
import {createXYZ} from '../src/ol/tilegrid.js';
import {tile} from '../src/ol/loadingstrategy.js';
import {useGeographic} from '../src/ol/proj.js';
useGeographic();
const vectorSource = new VectorSource({
format: new GeoJSON(),
url: function (extent) {
return (
'https://ahocevar.com/geoserver/wfs?service=WFS&' +
'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +
'outputFormat=application/json&srsname=EPSG:4326&' +
'bbox=' +
extent.join(',') +
',EPSG:4326'
);
},
strategy: tile(createXYZ({tileSize: 512})),
});
const vector = new VectorLayer({
source: vectorSource,
style: new Style({
stroke: new Stroke({
color: 'rgba(0, 0, 255, 1.0)',
width: 2,
}),
}),
});
const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB';
const attributions =
'<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> ' +
'<a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>';
const raster = new TileLayer({
source: new XYZ({
attributions: attributions,
url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key,
maxZoom: 20,
}),
});
const map = new Map({
layers: [raster, vector],
target: document.getElementById('map'),
view: new View({
center: [-80.0298, 43.4578],
maxZoom: 19,
zoom: 12,
}),
});

View File

@@ -0,0 +1,13 @@
#level {
display: inline-block;
width: 150px;
vertical-align: text-bottom;
}
a.location {
cursor: pointer;
}
#map {
background: #8bd4ff;
}

View File

@@ -0,0 +1,37 @@
---
layout: example.html
title: Sea Level (with WebGL)
shortdesc: Render sea level at different elevations
docs: >
<p>
The <code>style</code> property of a WebGL tile layer accepts a <code>color</code> expression that
can be used to modify pixel values before rendering. Here, RGB tiles representing elevation
data are loaded and rendered so that values at or below sea level are blue, and values
above sea level are transparent. The <code>color</code> expression operates on normalized pixel
values ranging from 0 to 1. The <code>band</code> operator is used to select normalized values
from a single band.
</p><p>
After converting the normalized RGB values to elevation, the <code>case</code> expression
is used to pick colors to apply at a given elevation. Instead of using constant
numeric values as the stops in the colors array, the <code>var</code> operator allows you to
use a value that can be modified by your application. When the user drags the
sea level slider, the <code>layer.updateStyleVariables()</code> function is called to update
the <code>level</code> style variable with the value from the slider.
</p>
tags: "webgl, math, flood"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API key at https://www.maptiler.com/cloud/
---
<div id="map" class="map"></div>
<label>
Sea level
<input id="level" type="range" min="0" max="100" value="1"/>
+<span id="output"></span> m
</label>
<br>
Go to
<a class="location" data-center="-122.3267,37.8377" data-zoom="11">San Francisco</a>,
<a class="location" data-center="-73.9338,40.6861" data-zoom="11">New York</a>,
<a class="location" data-center="72.9481,18.9929" data-zoom="11">Mumbai</a>, or
<a class="location" data-center="120.831,31.160" data-zoom="9">Shanghai</a>

View File

@@ -0,0 +1,91 @@
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/WebGLTile.js';
import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
import {fromLonLat} from '../src/ol/proj.js';
const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB';
const attributions =
'<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> ' +
'<a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>';
// band math operates on normalized values from 0-1
// so we scale by 255 to align with the elevation formula
// from https://cloud.maptiler.com/tiles/terrain-rgb/
const elevation = [
'+',
-10000,
[
'*',
0.1 * 255,
[
'+',
['*', 256 * 256, ['band', 1]],
['+', ['*', 256, ['band', 2]], ['band', 3]],
],
],
];
const layer = new TileLayer({
opacity: 0.6,
source: new XYZ({
url:
'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key,
maxZoom: 10,
tileSize: 512,
crossOrigin: 'anonymous',
}),
style: {
variables: {
level: 0,
},
color: [
'case',
// use the `level` style variable to determine the color
['<=', elevation, ['var', 'level']],
[139, 212, 255, 1],
[139, 212, 255, 0],
],
},
});
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new XYZ({
url: 'https://api.maptiler.com/maps/streets/{z}/{x}/{y}.png?key=' + key,
attributions: attributions,
crossOrigin: 'anonymous',
tileSize: 512,
}),
}),
layer,
],
view: new View({
center: fromLonLat([-122.3267, 37.8377]),
zoom: 11,
}),
});
const control = document.getElementById('level');
const output = document.getElementById('output');
const listener = function () {
output.innerText = control.value;
layer.updateStyleVariables({level: parseFloat(control.value)});
};
control.addEventListener('input', listener);
control.addEventListener('change', listener);
output.innerText = control.value;
const locations = document.getElementsByClassName('location');
for (let i = 0, ii = locations.length; i < ii; ++i) {
locations[i].addEventListener('click', relocate);
}
function relocate(event) {
const data = event.target.dataset;
const view = map.getView();
view.setCenter(fromLonLat(data.center.split(',').map(Number)));
view.setZoom(Number(data.zoom));
}

View File

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

View File

@@ -0,0 +1,32 @@
---
layout: example.html
title: Shaded Relief (with WebGL)
shortdesc: Calculate shaded relief from elevation data
docs: >
<p>
For the shaded relief, a single tiled source of elevation data is used as input.
The shaded relief is calculated by the layer's <code>style</code> with a <code>color</code>
expression. The style variables are updated when the user drags one of the sliders. The
<code>band</code> operator is used to sample data from neighboring pixels for calculating slope and
aspect, which is done with the <code>['band', bandIndex, xOffset, yOffset]</code> syntax.
</p>
tags: "webgl, shaded relief"
---
<div id="map" class="map"></div>
<table class="controls">
<tr>
<td><label for="vert">vertical exaggeration:</label></td>
<td><input id="vert" type="range" min="1" max="5" value="1"/></td>
<td><span id="vertOut"></span> x</td>
</tr>
<tr>
<td><label for="sunEl">sun elevation:</label></td>
<td><input id="sunEl" type="range" min="0" max="90" value="45"/></td>
<td><span id="sunElOut"></span> °</td>
</tr>
<tr>
<td><label for="sunAz">sun azimuth:</label></td>
<td><input id="sunAz" type="range" min="0" max="360" value="45"/></td>
<td><span id="sunAzOut"></span> °</td>
</tr>
</table>

View File

@@ -0,0 +1,93 @@
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {OSM, XYZ} from '../src/ol/source.js';
import {WebGLTile as TileLayer} from '../src/ol/layer.js';
const variables = {};
// The method used to extract elevations from the DEM.
// In this case the format used is
// red + green * 2 + blue * 3
//
// Other frequently used methods include the Mapbox format
// (red * 256 * 256 + green * 256 + blue) * 0.1 - 10000
// and the Terrarium format
// (red * 256 + green + blue / 256) - 32768
function elevation(xOffset, yOffset) {
return [
'+',
['*', 256, ['band', 1, xOffset, yOffset]],
[
'+',
['*', 2 * 256, ['band', 2, xOffset, yOffset]],
['*', 3 * 256, ['band', 3, xOffset, yOffset]],
],
];
}
// Generates a shaded relief image given elevation data. Uses a 3x3
// neighborhood for determining slope and aspect.
const dp = ['*', 2, ['resolution']];
const z0x = ['*', ['var', 'vert'], elevation(-1, 0)];
const z1x = ['*', ['var', 'vert'], elevation(1, 0)];
const dzdx = ['/', ['-', z1x, z0x], dp];
const z0y = ['*', ['var', 'vert'], elevation(0, -1)];
const z1y = ['*', ['var', 'vert'], elevation(0, 1)];
const dzdy = ['/', ['-', z1y, z0y], dp];
const slope = ['atan', ['^', ['+', ['^', dzdx, 2], ['^', dzdy, 2]], 0.5]];
const aspect = ['clamp', ['atan', ['-', 0, dzdx], dzdy], -Math.PI, Math.PI];
const sunEl = ['*', Math.PI / 180, ['var', 'sunEl']];
const sunAz = ['*', Math.PI / 180, ['var', 'sunAz']];
const cosIncidence = [
'+',
['*', ['sin', sunEl], ['cos', slope]],
['*', ['*', ['cos', sunEl], ['sin', slope]], ['cos', ['-', sunAz, aspect]]],
];
const scaled = ['*', 255, cosIncidence];
const shadedRelief = new TileLayer({
opacity: 0.3,
source: new XYZ({
url: 'https://{a-d}.tiles.mapbox.com/v3/aj.sf-dem/{z}/{x}/{y}.png',
crossOrigin: 'anonymous',
}),
style: {
variables: variables,
color: ['color', scaled, scaled, scaled],
},
});
const controlIds = ['vert', 'sunEl', 'sunAz'];
controlIds.forEach(function (id) {
const control = document.getElementById(id);
const output = document.getElementById(id + 'Out');
function updateValues() {
output.innerText = control.value;
variables[id] = Number(control.value);
}
updateValues();
const listener = function () {
updateValues();
shadedRelief.updateStyleVariables(variables);
};
control.addEventListener('input', listener);
control.addEventListener('change', listener);
});
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new OSM(),
}),
shadedRelief,
],
view: new View({
extent: [-13675026, 4439648, -13580856, 4580292],
center: [-13615645, 4497969],
minZoom: 10,
maxZoom: 16,
zoom: 13,
}),
});

View File

@@ -0,0 +1,4 @@
#controls {
display: flex;
justify-content: space-around;
}

View File

@@ -0,0 +1,31 @@
---
layout: example.html
title: WebGL Tile Layer Styles
shortdesc: Styling raster tiles with WebGL.
docs: >
The `style` property of a WebGL tile layer can be used to adjust properties like
`exposure`, `contrast`, and `saturation`. Typically those values would be set to
numeric constants to apply a filter to imagery. In this example, the style properties
are set to variables that can be updated based on application state. Adjusting the
sliders results in a call to `layer.updateStyleVariables()` to use new values for the
associated style properties.
tags: "webgl, style"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API key at https://www.maptiler.com/cloud/
---
<div id="map" class="map"></div>
<div id="controls">
<label>
<input id="exposure" type="range" min="-0.5" max="0.5" step="0.01">
<br>exposure <span id="exposure-value"></span>
</label>
<label>
<input id="contrast" type="range" min="-0.5" max="0.5" step="0.01">
<br>contrast <span id="contrast-value"></span>
</label>
<label>
<input id="saturation" type="range" min="-0.5" max="0.5" step="0.01">
<br>saturation <span id="saturation-value"></span>
</label>
</div>

View File

@@ -0,0 +1,57 @@
import Map from '../src/ol/Map.js';
import TileLayer from '../src/ol/layer/WebGLTile.js';
import View from '../src/ol/View.js';
import XYZ from '../src/ol/source/XYZ.js';
const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB';
const attributions =
'<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> ' +
'<a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>';
const variables = {
exposure: 0,
contrast: 0,
saturation: 0,
};
const layer = new TileLayer({
style: {
exposure: ['var', 'exposure'],
contrast: ['var', 'contrast'],
saturation: ['var', 'saturation'],
variables: variables,
},
source: new XYZ({
crossOrigin: 'anonymous', // TODO: determine if we can avoid this
attributions: attributions,
url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key,
maxZoom: 20,
}),
});
const map = new Map({
target: 'map',
layers: [layer],
view: new View({
center: [0, 0],
zoom: 0,
}),
});
let variable;
for (variable in variables) {
const name = variable;
const element = document.getElementById(name);
const value = variables[name];
element.value = value.toString();
document.getElementById(name + '-value').innerText = value.toFixed(2);
const listener = function (event) {
const value = parseFloat(event.target.value);
document.getElementById(name + '-value').innerText = value.toFixed(2);
const updates = {};
updates[name] = value;
layer.updateStyleVariables(updates);
};
element.addEventListener('input', listener);
element.addEventListener('change', listener);
}

View File

@@ -0,0 +1,9 @@
---
layout: example.html
title: WebGL Tiles
shortdesc: Rendering raster data with WebGL.
docs: >
This example uses WebGL to raster tiles on a map.
tags: "webgl, osm"
---
<div id="map" class="map"></div>

17
examples/webgl-tiles.js Normal file
View File

@@ -0,0 +1,17 @@
import Map from '../src/ol/Map.js';
import OSM from '../src/ol/source/OSM.js';
import TileLayer from '../src/ol/layer/WebGLTile.js';
import View from '../src/ol/View.js';
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new OSM(),
}),
],
view: new View({
center: [0, 0],
zoom: 0,
}),
});

View File

@@ -18,7 +18,7 @@ export default {
.filter((name) => /^(?!index).*\.html$/.test(name))
.map((name) => name.replace(/\.html$/, ''))
.forEach((example) => {
entry[example] = `./${example}.js`;
entry[example] = ['regenerator-runtime/runtime', `./${example}.js`];
});
return entry;
},
@@ -28,25 +28,13 @@ export default {
{
test: /^((?!es2015-)[\s\S])*\.js$/,
use: {
loader: 'buble-loader',
loader: 'babel-loader',
options: {
transforms: {
dangerousForOf: true,
},
presets: [
['@babel/preset-env', {targets: 'last 2 versions, not dead'}],
],
},
},
include: [
path.join(baseDir, '..', '..', 'src'),
path.join(baseDir, '..'),
path.join(
baseDir,
'..',
'..',
'node_modules',
'@mapbox',
'mapbox-gl-style-spec'
),
],
},
{
test: /\.js$/,
@@ -63,10 +51,6 @@ export default {
// Do not minify examples that inject code into workers
exclude: [/(color-manipulation|region-growing|raster)\.js/],
extractComments: false,
terserOptions: {
// Mangle private members convention with underscore suffix
mangle: {properties: {regex: /_$/}},
},
}),
],
runtimeChunk: {
@@ -101,6 +85,8 @@ export default {
resolve: {
fallback: {
fs: false,
http: false,
https: false,
},
alias: {
// allow imports from 'ol/module' instead of specifiying the source path

View File

@@ -1,5 +1,6 @@
import assert from 'assert';
import frontMatter from 'front-matter';
import fs from 'fs';
import fse from 'fs-extra';
import handlebars from 'handlebars';
import marked from 'marked';
@@ -17,6 +18,11 @@ const isTemplateJs =
/\/(jquery(-\d+\.\d+\.\d+)?|(bootstrap(\.bundle)?))(\.min)?\.js(\?.*)?$/;
const isTemplateCss = /\/bootstrap(\.min)?\.css(\?.*)?$/;
const exampleDirContents = fs
.readdirSync(path.join(baseDir, '..'))
.filter((name) => /^(?!index).*\.html$/.test(name))
.map((name) => name.replace(/\.html$/, ''));
let cachedPackageInfo = null;
async function getPackageInfo() {
if (cachedPackageInfo) {
@@ -188,7 +194,7 @@ export default class ExampleBuilder {
}
const name = filename.replace(/\.js$/, '');
if (name === 'index' || name === this.common) {
if (!exampleDirContents.includes(name)) {
continue;
}

View File

@@ -9,7 +9,12 @@ module.exports = function loader() {
build(this.resource, {minify})
.then((chunk) => {
for (const filePath in chunk.modules) {
this.addDependency(filePath);
try {
const dependency = require.resolve(filePath);
this.addDependency(dependency);
} catch (e) {
// empty catch block
}
}
callback(null, chunk.code);
})

View File

@@ -1,9 +1,9 @@
---
layout: example.html
title: WMS 512x256 Tiles
shortdesc: Example of a WMS layer with 512x256px tiles.
shortdesc: Example of a WMS layer with a custom grid with 512x256px tiles.
docs: >
WMS can serve arbitrary tile sizes. This example uses a custom tile grid with non-square tiles.
tags: "wms, tile, non-square"
tags: "wms, tile, non-square, grid"
---
<div id="map" class="map"></div>

View File

@@ -4,7 +4,7 @@ title: WMTS Tile Transitions
shortdesc: Example of smooth tile transitions when changing the dimension of a WMTS layer.
docs: >
Demonstrates smooth reloading of layers when changing a dimension continuously. The demonstration layer is a global sea-level computation (flooding computation from <a href="https://scalgo.com/">SCALGO</a>, underlying data from <a href="https://cgiarcsi.community/data/srtm-90m-digital-elevation-database-v4-1">CGIAR-CSI SRTM</a>) where cells that are flooded if the sea-level rises to more than <em>x</em> m are colored blue. The user selects the sea-level dimension using a slider.
tags: "wmts, parameter, transition"
tags: "wmts, parameter, transition, grid"
---
<div id="map" class="map"></div>
<label>

View File

@@ -61,13 +61,11 @@ const map = new Map({
],
});
const updateSourceDimension = function (source, sliderVal) {
source.updateDimensions({'threshold': sliderVal});
document.getElementById('theinfo').innerHTML = sliderVal + ' meters';
const slider = document.getElementById('slider');
const updateSourceDimension = function () {
wmtsSource.updateDimensions({'threshold': slider.value});
document.getElementById('theinfo').innerHTML = slider.value + ' meters';
};
updateSourceDimension(wmtsSource, 10);
document.getElementById('slider').addEventListener('input', function () {
updateSourceDimension(wmtsSource, this.value);
});
slider.addEventListener('input', updateSourceDimension);
slider.addEventListener('change', updateSourceDimension);
updateSourceDimension();

View File

@@ -9,6 +9,6 @@ docs: >
and
[Documentation de loffre de données et services de lIGN](https://geoservices.ign.fr/documentation/diffusion/documentation-offre.html)
(french).
tags: "french, ign, geoportail, wmts"
tags: "french, ign, geoportail, wmts, grid"
---
<div id="map" class="map"></div>

View File

@@ -4,6 +4,6 @@ title: WMTS
shortdesc: Example of a WMTS source.
docs: >
This example shows how to manually create the configuration for accessing a WMTS. The [WMTS Layer from capabilities example](wmts-layer-from-capabilities.html) shows how to create the configuration from a GetCapabilities response.
tags: "wmts"
tags: "wmts, grid"
---
<div id="map" class="map"></div>

View File

@@ -10,9 +10,9 @@ import {getTopLeft, getWidth} from '../src/ol/extent.js';
const projection = getProjection('EPSG:3857');
const projectionExtent = projection.getExtent();
const size = getWidth(projectionExtent) / 256;
const resolutions = new Array(14);
const matrixIds = new Array(14);
for (let z = 0; z < 14; ++z) {
const resolutions = new Array(19);
const matrixIds = new Array(19);
for (let z = 0; z < 19; ++z) {
// generate resolutions and matrixIds arrays for this WMTS
resolutions[z] = size / Math.pow(2, z);
matrixIds[z] = z;
@@ -22,19 +22,16 @@ const map = new Map({
layers: [
new TileLayer({
source: new OSM(),
opacity: 0.7,
}),
new TileLayer({
opacity: 0.7,
source: new WMTS({
attributions:
'Tiles © <a href="https://services.arcgisonline.com/arcgis/rest/' +
'services/Demographics/USA_Population_Density/MapServer/">ArcGIS</a>',
url:
'https://services.arcgisonline.com/arcgis/rest/' +
'services/Demographics/USA_Population_Density/MapServer/WMTS/',
layer: '0',
matrixSet: 'EPSG:3857',
'Tiles © <a href="https://mrdata.usgs.gov/geology/state/"' +
' target="_blank">USGS</a>',
url: 'https://mrdata.usgs.gov/mapcache/wmts',
layer: 'sgmc2',
matrixSet: 'GoogleMapsCompatible',
format: 'image/png',
projection: projection,
tileGrid: new WMTSTileGrid({

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