Use the preferred URL for tile.openstreetmap.org, the old aliases are no longer recommended now that tile supports HTTP/2 + HTTP/3.
Signed-off-by: Grant Slater <git@firefishy.com>
- The parsed minutes had the wrong sign when the offset is negative.
- When calculating the local time, the minutes should be subtracted instead of added
- Fix a data error in the kml, a fullstop was used instead of a colon.
- es2015-custom-element needs css variables declared in :host
- external-map-map still does not work when editing in codesandbox,
though that neither worked before.
- The href will always start with path as it is sliced starting from 0
Not sure if it is possible that window locatin does not have a slash
unless its some about:-page.
- Should be possible to query for the file name directly without regex,
if the filename contains special regex characters it may behave
unexpectedly
I guess the intention was to only serch for nodes contained in the
2nd parameter. That should have been `node.querySelector('...')`
but it doesn't matter in the test environment.
A u_pixelRatio uniform was added to be used in the shaders. this is necessary
since we're relying on the builtin gl_FragCoord vector, which will be scaled
relative to the u_sizePx uniform in case of a device pixel ratio != 1.
Also added tests for computed uniform values, instead of just testing
that they were indeed set.
This relies on a mixed geometry batch and separate batch renderers (lines,
points and polygons). A different shader program is used for each of these
geometries, and three rendering passes are made.
Should load slightly faster now by adding the source only after all
features are available, this avoids dispatching the addfeature event
for each of the 80000 features.
Use webgl tile layer for the background so the canvas can be shared
between both layers.
Allows to specify for each image style, whether the image
should be decluttered, always drawn but still serving as
obstacle, or drawn without being an obstacle for other
images/texts.
The layer must still have declutter = true set for this
property to have any effect.
WebGLPointsLayer renderFrame and renderHitDetection will now draw
multiple worlds if the source and projection support wrapX.
Hit detection needs additional improvement. It stops working after
more than one wrap around the world. If 0 is the middle world, then
the hit detection works for worlds -1, 0, and -1, but not for worlds
> 2 or < -2.
The example has hit detection enabled, demonstrated with a colour
change on hover for the circle styles. When moving the mouse, the hit
detection is unreliable and flickers on/off. This needs improvement.
The webgl-points renderer test has been updated.
isInFullscreen_ was not initialized in the constructor when setClassName_
is called.
- Only remove the unnecessary classes when state changes instead of removing
all and then adding the necessary classes again
When the FullScreen icon is first rendered, the button within it is not having the inactive classname set. The class name is set on toggling fullscreen on/off - just not being set on render.
Calculate unrotated width and height from frame size and resolution
Check for changes in resolution as well as extent when rendered extent fits inside frame
When parsing GML then conversion of properties containing XML attributes
to objects with a _content_ property must occur before the handling of
multiple attributes (conversion/adding to an array), as otherwise the
_content_ property and attributes are set on the array and not on the
array element.
Prior to this change, only multiple properties without attributes could
be correctly parsed.
Example problemeatic GML section:
<Link xlink:href="http://example.com/a"/>
<Link xlink:href="http://example.com/b"/>
Resulting property as JSON extract after this change:
{
"Link": [
{
"_content_": undefined,
"xlink:href": "http://example.com/a",
},
{
"_content_": undefined,
"xlink:href": "http://example.com/b"
}
]
}
Prior to this change, the _content_ property and the properties for the
XML attributes would be set on the resulting JS Array object, with
previous entries being represented as nested arrays.
[forking](https://github.com/openlayers/openlayers/fork) the OpenLayers repository.
[forking](https://github.com/openlayers/openlayers/fork) the OpenLayers repository.
### Development dependencies
### Development dependencies
@@ -26,6 +26,28 @@ To run the examples you first need to start the dev server:
Then, load <http://localhost:8080/> in your browser.
Then, load <http://localhost:8080/> in your browser.
## Linking Package
The `ol` package is published from the `build/ol` folder of the `openlayers` repo.
After you've cloned the `openlayers` repo locally run the `npm build-package` to prepare the build then use the `npm link` command to connect it your project.
Below is an example of how to build and link it to "sample-project"
See the following examples for more detail on bundling OpenLayers with your application:
See the following examples for more detail on bundling OpenLayers with your application:
* Using [Vite](https://github.com/openlayers/ol-vite)
* Using [Rollup](https://github.com/openlayers/ol-rollup)
* Using [Rollup](https://github.com/openlayers/ol-rollup)
* Using [Webpack](https://github.com/openlayers/ol-webpack)
* Using [webpack](https://github.com/openlayers/ol-webpack)
* Using [Parcel](https://github.com/openlayers/ol-parcel)
* Using [Parcel](https://github.com/openlayers/ol-parcel)
* Using [Browserify](https://github.com/openlayers/ol-browserify)
For more detail on quick prototyping without the use of a Node.js based setup, see the [Skypack](https://github.com/openlayers/ol-skypack) example.
## Sponsors
## Sponsors
@@ -80,29 +82,13 @@ OpenLayers appreciates contributions of all kinds. We especially want to thank
See our [GitHub sponsors page](https://github.com/sponsors/openlayers) or [Open Collective](https://opencollective.com/openlayers/contribute/sponsors-214/checkout) if you too are interested in becoming a regular sponsor.
See our [GitHub sponsors page](https://github.com/sponsors/openlayers) or [Open Collective](https://opencollective.com/openlayers/contribute/sponsors-214/checkout) if you too are interested in becoming a regular sponsor.
## ES Modules
The `ol` package contains a `src/` folder with the sources, authored as [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules). To use these untranspiled sources, either import modules from `ol/src` instead of `ol`, or configure your bundler with an alias pointing to `ol/src` for the `ol` package.
## TypeScript support
## TypeScript support
The [ol package](https://npmjs.com/package/ol) includes auto-generated TypeScript declarations as `*.d.ts` files.
The [ol package](https://npmjs.com/package/ol) includes auto-generated TypeScript declarations as `*.d.ts` files.
## Supported Browsers
## Supported Browsers
OpenLayers runs on all modern browsers that support [HTML5](https://html.spec.whatwg.org/multipage/) and [ECMAScript 5](https://262.ecma-international.org/5.1/). This includes Chrome, Firefox, Safari and Edge.
OpenLayers runs on all modern browsers (with greater than 1% global usage). This includes Chrome, Firefox, Safari and Edge. For older browsers, [polyfills](https://polyfill.io/) will likely need to be added.
For older browsers and platforms (Internet Explorer, Android 4.x, iOS v12 and older, Safari v12 and older), polyfills may be needed for the following browser features:
* [`fetch`](https://caniuse.com/fetch): Available from [polyfill.io](https://polyfill.io/).
* [`requestAnimationFrame`](https://caniuse.com/requestanimationframe): Available from [polyfill.io](https://polyfill.io/).
* [`element.prototype.classList` (`add`/`remove`)](https://caniuse.com/classlist): Available from [polyfill.io](https://polyfill.io/).
* [`URL` API](https://caniuse.com/url): Available from [polyfill.io](https://polyfill.io/).
* [`TextDecoder`](https://caniuse.com/textencoder): Available from [polyfill.io](https://polyfill.io/).
* [`Number.isInteger`](https://caniuse.com/isInteger): Available from [polyfill.io](https://polyfill.io/).
* [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.
If you have been using the full (or legacy) build of the library, note that the location of these scripts is changing for this and future releases. The previous locations were not stable, and although we do not recommend linking to the full build for production applications, there are many instances of this that were breaking due to changing URLs. See the [download page](https://openlayers.org/download/) for details on the new versioned URLs for the full build.
#### Deprecation of `ol/AssertionError` and error codes
Future versions will no longer throw `ol/AssertionError` with an error `code`. Instead, they will throw `Error` with just the error message.
#### Updating parameters in `ol/source/ImageWMS` and `ol/source/TileWMS`
The `updateParams()` method will be the only way to update parameters. Changes made directly to the `params` object passed as a constructor option will have no effect.
### 7.0.0
#### Removal of deprecated properties and methods
* The `tilePixelRatio` has been removed from the `DataTile` source.
* The `imageSmoothing` option has been removed from sources.
* The `undefinedHTML` option has been removed from the `MousePosition` control.
* The `forEachLayerAtPixel` method has been removed from the `Map` class.
* Deprecated options have been removed from the `Overlay` component.
* The `labelCache` has been removed from the `ol/render/canvas.js` module.
#### Internet Explorer is no longer supported
Please see https://docs.microsoft.com/en-us/lifecycle/announcements/internet-explorer-11-end-of-support.
#### ol/coordinate.js
The `toStringHDMS` function from the `ol/coordinate.js` module now formats longitude, latitude pairs so that the minutes and seconds are omitted if they are zero. This changes the values displayed on graticules.
#### ol/layer/Graticule
The default `intervals` now align with integer minutes and seconds better suited to the default label formatter. If formatting in decimal degrees you may wish to specify custom `intervals` suited to that format.
#### ol/Collection
Inserting with `setAt` or `insertAt` beyond the current length used to create a sparse Collection with `undefined` inserted for any missing indexes. This will now throw an error instead.
#### ol/control/MousePosition
The control will now by default keep displaying the last mouse position when the mouse leaves the viewport. With `placeholder: ' '` you can keep the old behaviour. The `placeholder` option no longer accepts `false` as a valid value, instead simply omit the option. The `undefinedHTML` option has been removed. You should use `placeholder` instead.
#### ol/PluggableMap
The `PluggableMap` class has been removed. If you want to create a custom map class, extend the `Map` class instead.
#### ol/style/Icon and ol/style/RegularShape
`ol/style/Image` and subclasses `displacement` is no longer scaled with the image. If you previously expected this unintended behavior you should now increase the displacement when setting the scale.
### 6.15.0
#### Deprecated `tilePixelRatio` option for data tile sources.
If you were previously trying to scale data tiles using the `tilePixelRatio` property for data tile sources (this is rare), you should now use the explicit `tileSize` and `tileGrid` properties. The source's `tileSize` represents the source tile dimensions and the tile grid's `tileSize` represents the desired rendered dimensions.
#### Fixed coordinate dimension handling in `ol/proj`'s `addCoordinateTransforms`
The `forward` and `inverse` functions passed to `addCooordinateTransforms` now receive a coordinate with all dimensions of the original coordinate, not just two. If you previosly had coordinates with more than two dimensions and added a transform like
This change only affects users that were using the non-API string enums
* ol/OverlayPositioning
* ol/extent/Corner
* ol/format/FormatType
* ol/geom/GeometryType
* ol/source/State
* ol/source/WMSServerType
* ol/source/WMTSRequestEncoding
Instead of these, use the respective `string`s, which are now typesafe by means of union types.
### v6.14.0
No special changes are required when upgrading to the 6.14.0 release.
### v6.13.0
#### New `layer.getData()` method
Raster layers (static images, image tiles, data tiles) have a new `layer.getData(pixel)` method that returns the pixel data at the provided location. The return value depends on the underlying source data type. For example, a GeoTIFF may return a `Float32Array` with one value per band, while a PNG rendered from a tile layer will return a `Uint8ClampedArray` of RGBA values.
If you were previously using the `map.forEachLayerAtPixel()` method, you should use the new `layer.getData()` method instead. The old method returns composite pixel values from multiple layers and is limited to RGBA values. The new method doesn't suffer from these shortcomings and is more performant.
The `map.forEachLayerAtPixel()` method has been deprecated. It will be removed (or its behavior may change) in the next major release. Please use the `layer.getData()` method instead.
### v6.12.0
No special changes are required when upgrading to the 6.12.0 release.
### v6.11.0
No special changes are required when upgrading to the 6.11.0 release.
### v6.10.0
#### New `interpolate` option for sources
Sources now have an `interpolate` option. This option controls whether data from the source is interpolated when resampling.
For `ol/source/DataTile` sources, the default is `interpolate: false`. This means that when a data tile source is used with a WebGL tile layer renderer, your style expression will have access to pixel values in the data tiles without interpolation. If this option is set to true, linear interpolation will be used when over- or under-sampling the data.
#### Deprecation of the `imageSmoothing` option for sources
The `imageSmoothing` option for sources has been deprecated and will be removed in the next major release. Use the `interpolate` option instead.
```js
// if you were using `imageSmoothing`
constbefore=newTileSource({
imageSmoothing:false
});
// use the `interpolate` option instead
constafter=newTileSource({
interpolate:false
});
```
### v6.9.0
There should be nothing special required when upgrading from v6.8 to v6.9.
### v6.8.0
### v6.8.0
There should be nothing special required when upgrading from v6.7 to v6.8.
There should be nothing special required when upgrading from v6.7 to v6.8.
Just in time for the new year, the 6.10 release brings another great batch of features and fixes for your OpenLayers applications.
#### WebGL rendering
You can now update the style for your WebGL tile layers with `layer.setStyle()`. Keep in mind that it is more efficient to use style variables if you want to adjust styling on every render frame. However, in cases where you want to completely reconfigure the style, you can use the new `layer.setStyle()` method.
* A new `palette` operator was added that allows styling raster data based on a colormap.
* The `band` operator accepts expressions for the band number (in addition to numeric literals) – allowing for bands to be set by user provided style variables, for example.
* Tile layers now dispatch `prerender`, `postrender`, `precompose` and `postcompose` events with access to the WebGL rendering context.
* Layers that are adjacent to one another now share a single canvas element and rendering context – allowing for more layers in your maps before exhausting the browser's context limit.
#### Vector tiles
The Mapbox vector layer now works more easily with other vector tile providers. In addition, vector tile layers can now be configured with a background color.
#### New `interpolate` option for sources
Sources now have an `interpolate` option. This option controls whether data from the source is interpolated when resampling.
For `ol/source/DataTile` sources, the default is `interpolate: false`. This means that when a data tile source is used with a WebGL tile layer renderer, your style expression will have access to pixel values in the data tiles without interpolation. If this option is set to true, linear interpolation will be used when over- or under-sampling the data.
#### Deprecation of the `imageSmoothing` option for sources
The `imageSmoothing` option for sources has been deprecated and will be removed in the next major release. Use the `interpolate` option instead.
```js
// if you were using `imageSmoothing`
constbefore=newTileSource({
imageSmoothing:false
});
// use the `interpolate` option instead
constafter=newTileSource({
interpolate:false
});
```
#### List of all changes
See below for more features and fixes.
* [#13155](https://github.com/openlayers/openlayers/pull/13155) - Allow interpolation to be configured for data tile sources ([@tschaub](https://github.com/tschaub))
* [#13165](https://github.com/openlayers/openlayers/pull/13165) - Do not exceed maximum call stack when parsing TopoJSON ([@ahocevar](https://github.com/ahocevar))
* [#13158](https://github.com/openlayers/openlayers/pull/13158) - Add example for dynamic clusters ([@ahocevar](https://github.com/ahocevar))
* [#13156](https://github.com/openlayers/openlayers/pull/13156) - Ensure that tile range covers all pixels ([@tschaub](https://github.com/tschaub))
* [#13154](https://github.com/openlayers/openlayers/pull/13154) - Update Export Map example to handle WebGL ([@mike-000](https://github.com/mike-000))
* [#13147](https://github.com/openlayers/openlayers/pull/13147) - Support rendering with a palette in WebGL ([@tschaub](https://github.com/tschaub))
* [#13142](https://github.com/openlayers/openlayers/pull/13142) - Include transpacific flights in Flight Animation example ([@mike-000](https://github.com/mike-000))
* [#13150](https://github.com/openlayers/openlayers/pull/13150) - Include layer opacity in Heatmap shader ([@mike-000](https://github.com/mike-000))
* [#13149](https://github.com/openlayers/openlayers/pull/13149) - Add layer also for programmatically selected features ([@ahocevar](https://github.com/ahocevar))
* [#13151](https://github.com/openlayers/openlayers/pull/13151) - Avoid error accessing attributes when context is lost ([@mike-000](https://github.com/mike-000))
* [#13144](https://github.com/openlayers/openlayers/pull/13144) - Replace deprecated syntax in example ([@mike-000](https://github.com/mike-000))
* [#13131](https://github.com/openlayers/openlayers/pull/13131) - Unset canvas css in stylesheet ([@ahocevar](https://github.com/ahocevar))
* [#13130](https://github.com/openlayers/openlayers/pull/13130) - Allow WebGL tile layers to be constructed without a source ([@tschaub](https://github.com/tschaub))
* [#13126](https://github.com/openlayers/openlayers/pull/13126) - Preserve the drawing buffer by default for WebGL layers ([@tschaub](https://github.com/tschaub))
* [#13127](https://github.com/openlayers/openlayers/pull/13127) - Fix for range slider on IE ([@mike-000](https://github.com/mike-000))
* [#13095](https://github.com/openlayers/openlayers/pull/13095) - Render is only complete when no tiles are queued ([@ahocevar](https://github.com/ahocevar))
* [#13102](https://github.com/openlayers/openlayers/pull/13102) - update line-arrows example ([@jipexu](https://github.com/jipexu))
* [#13119](https://github.com/openlayers/openlayers/pull/13119) - Dispatch precompose and postcompose events for WebGL layers ([@tschaub](https://github.com/tschaub))
* [#13118](https://github.com/openlayers/openlayers/pull/13118) - Add a layer opacity example ([@tschaub](https://github.com/tschaub))
* [#13115](https://github.com/openlayers/openlayers/pull/13115) - Lazily create resources for worker ([@tschaub](https://github.com/tschaub))
* [#13103](https://github.com/openlayers/openlayers/pull/13103) - Assume limited precision when rounding ([@tschaub](https://github.com/tschaub))
* [#13097](https://github.com/openlayers/openlayers/pull/13097) - Use correct terrain-rgb tile size and update max zoom ([@mike-000](https://github.com/mike-000))
* [#13101](https://github.com/openlayers/openlayers/pull/13101) - Fix View set center to undefined ([@M393](https://github.com/M393))
* [#13083](https://github.com/openlayers/openlayers/pull/13083) - Support expressions for band arguments ([@tschaub](https://github.com/tschaub))
* [#13084](https://github.com/openlayers/openlayers/pull/13084) - Normalize relative sprite and glyph urls for style url ([@ahocevar](https://github.com/ahocevar))
* [#13020](https://github.com/openlayers/openlayers/pull/13020) - Allow WebGL tile layer style to be updated ([@tschaub](https://github.com/tschaub))
* [#13073](https://github.com/openlayers/openlayers/pull/13073) - Fall back to standard load handling when decode fails ([@ahocevar](https://github.com/ahocevar))
* [#13077](https://github.com/openlayers/openlayers/pull/13077) - update draw and modify features example ([@jipexu](https://github.com/jipexu))
* [#13069](https://github.com/openlayers/openlayers/pull/13069) - Normalize based on GDAL stats metadata ([@tschaub](https://github.com/tschaub))
* [#13070](https://github.com/openlayers/openlayers/pull/13070) - Use source minzoom if not configured otherwise ([@ahocevar](https://github.com/ahocevar))
* [#13065](https://github.com/openlayers/openlayers/pull/13065) - Fix typo in example ([@jipexu](https://github.com/jipexu))
* [#13060](https://github.com/openlayers/openlayers/pull/13060) - Avoid fetching data outside the grid extent ([@tschaub](https://github.com/tschaub))
* [#13054](https://github.com/openlayers/openlayers/pull/13054) - Updates for newer version of the OGC API spec draft ([@ahocevar](https://github.com/ahocevar))
* [#13045](https://github.com/openlayers/openlayers/pull/13045) - Fix tiles and background handling ([@ahocevar](https://github.com/ahocevar))
* [#13030](https://github.com/openlayers/openlayers/pull/13030) - Correctly set popover position in geographic example ([@MoonE](https://github.com/MoonE))
* [#13031](https://github.com/openlayers/openlayers/pull/13031) - Allow data tile source loader to return a value or a promise ([@tschaub](https://github.com/tschaub))
* [#13027](https://github.com/openlayers/openlayers/pull/13027) - Restore the security scan workflow ([@openlayers](https://github.com/openlayers))
* [#13025](https://github.com/openlayers/openlayers/pull/13025) - Add background to MapboxVector layer ([@ahocevar](https://github.com/ahocevar))
* [#13013](https://github.com/openlayers/openlayers/pull/13013) - Use appropriate UNPACK_ALIGNMENT for data textures ([@mike-000](https://github.com/mike-000))
* [#13021](https://github.com/openlayers/openlayers/pull/13021) - Add the renderer type to generic layer template variables ([@tschaub](https://github.com/tschaub))
* [#13022](https://github.com/openlayers/openlayers/pull/13022) - Update the security scan task ([@tschaub](https://github.com/tschaub))
* [#13015](https://github.com/openlayers/openlayers/pull/13015) - Additional types for WebGL renderer, sources, and tiles ([@tschaub](https://github.com/tschaub))
* [#12976](https://github.com/openlayers/openlayers/pull/12976) - Handle ReprojTile in ol/layer/WebGLTile ([@mike-000](https://github.com/mike-000))
* [#13011](https://github.com/openlayers/openlayers/pull/13011) - Use registry URL when publishing ([@tschaub](https://github.com/tschaub))
* [#13009](https://github.com/openlayers/openlayers/pull/13009) - Use workflow_run event to deploy pull request previews ([@tschaub](https://github.com/tschaub))
* [#12965](https://github.com/openlayers/openlayers/pull/12965) - Allow canvas reuse for WebGL layers ([@tschaub](https://github.com/tschaub))
* [#12999](https://github.com/openlayers/openlayers/pull/12999) - Fix style related apidoc issues ([@MoonE](https://github.com/MoonE))
* [#12978](https://github.com/openlayers/openlayers/pull/12978) - Add null to style jsdoc of VectorImage ([@EvertEt](https://github.com/EvertEt))
* [#12997](https://github.com/openlayers/openlayers/pull/12997) - Lazily create the WebGL helper ([@tschaub](https://github.com/tschaub))
* [#12996](https://github.com/openlayers/openlayers/pull/12996) - Align labels with the Select elements in the Raster Reprojection example ([@mike-000](https://github.com/mike-000))
* [#12994](https://github.com/openlayers/openlayers/pull/12994) - Add a map property to layers ([@tschaub](https://github.com/tschaub))
* [#12987](https://github.com/openlayers/openlayers/pull/12987) - Browser test config update ([@tschaub](https://github.com/tschaub))
* [#12939](https://github.com/openlayers/openlayers/pull/12939) - Example that demonstrates a color expression using variables ([@tschaub](https://github.com/tschaub))
* [#12962](https://github.com/openlayers/openlayers/pull/12962) - No context sharing when layer opacity is set ([@ahocevar](https://github.com/ahocevar))
* [#12958](https://github.com/openlayers/openlayers/pull/12958) - Reuse temporary canvas in getDataAtPixel() ([@mike-000](https://github.com/mike-000))
* [#12893](https://github.com/openlayers/openlayers/pull/12893) - Allow map target to be an external window ([@andrewcoder002](https://github.com/andrewcoder002))
* [#12955](https://github.com/openlayers/openlayers/pull/12955) - Make MapboxVector layer work in more access key scenarios ([@ahocevar](https://github.com/ahocevar))
* [#12933](https://github.com/openlayers/openlayers/pull/12933) - Include WebGL context in render events for WebGL layers ([@tschaub](https://github.com/tschaub))
* [#12917](https://github.com/openlayers/openlayers/pull/12917) - Make removeFeature consistent with other remove methods ([@mike-000](https://github.com/mike-000))
* [#12918](https://github.com/openlayers/openlayers/pull/12918) - Add setDisplacement method to ol/style/Image and subclasses ([@mike-000](https://github.com/mike-000))
* [#12930](https://github.com/openlayers/openlayers/pull/12930) - Fix flaky view animation test ([@MoonE](https://github.com/MoonE))
* [#12915](https://github.com/openlayers/openlayers/pull/12915) - Test the new pull request deploy previews ([@tschaub](https://github.com/tschaub))
* [#12916](https://github.com/openlayers/openlayers/pull/12916) - Updates to deploy-preview job ([@openlayers](https://github.com/openlayers))
* [#12914](https://github.com/openlayers/openlayers/pull/12914) - Build site preview as a GitHub action ([@tschaub](https://github.com/tschaub))
* [#12891](https://github.com/openlayers/openlayers/pull/12891) - Restore browser compatibility where possible ([@mike-000](https://github.com/mike-000))
* [#12899](https://github.com/openlayers/openlayers/pull/12899) - Update docs to mention Vite ([@tschaub](https://github.com/tschaub))
* [#13162](https://github.com/openlayers/openlayers/pull/13162) - Bump yargs from 17.3.0 to 17.3.1 ([@openlayers](https://github.com/openlayers))
* [#13163](https://github.com/openlayers/openlayers/pull/13163) - Bump rollup from 2.61.1 to 2.62.0 ([@openlayers](https://github.com/openlayers))
* [#13161](https://github.com/openlayers/openlayers/pull/13161) - Bump webpack-dev-server from 4.6.0 to 4.7.1 ([@openlayers](https://github.com/openlayers))
* [#13160](https://github.com/openlayers/openlayers/pull/13160) - Bump puppeteer from 13.0.0 to 13.0.1 ([@openlayers](https://github.com/openlayers))
* [#13140](https://github.com/openlayers/openlayers/pull/13140) - Bump @rollup/plugin-node-resolve from 13.0.6 to 13.1.1 ([@openlayers](https://github.com/openlayers))
* [#13132](https://github.com/openlayers/openlayers/pull/13132) - Bump copy-webpack-plugin from 10.1.0 to 10.2.0 ([@openlayers](https://github.com/openlayers))
* [#13141](https://github.com/openlayers/openlayers/pull/13141) - Bump webpack-dev-middleware from 5.2.2 to 5.3.0 ([@openlayers](https://github.com/openlayers))
* [#13133](https://github.com/openlayers/openlayers/pull/13133) - Bump eslint from 8.4.1 to 8.5.0 ([@openlayers](https://github.com/openlayers))
* [#13139](https://github.com/openlayers/openlayers/pull/13139) - Bump @babel/core from 7.16.0 to 7.16.5 ([@openlayers](https://github.com/openlayers))
* [#13136](https://github.com/openlayers/openlayers/pull/13136) - Bump @babel/preset-env from 7.16.4 to 7.16.5 ([@openlayers](https://github.com/openlayers))
* [#13137](https://github.com/openlayers/openlayers/pull/13137) - Bump express from 4.17.1 to 4.17.2 ([@openlayers](https://github.com/openlayers))
* [#13138](https://github.com/openlayers/openlayers/pull/13138) - Bump ol-mapbox-style from 6.7.0 to 6.8.1 ([@openlayers](https://github.com/openlayers))
* [#13134](https://github.com/openlayers/openlayers/pull/13134) - Bump marked from 4.0.7 to 4.0.8 ([@openlayers](https://github.com/openlayers))
* [#13106](https://github.com/openlayers/openlayers/pull/13106) - Bump webpack from 5.64.4 to 5.65.0 ([@openlayers](https://github.com/openlayers))
* [#13108](https://github.com/openlayers/openlayers/pull/13108) - Bump rollup from 2.60.2 to 2.61.1 ([@openlayers](https://github.com/openlayers))
* [#13107](https://github.com/openlayers/openlayers/pull/13107) - Bump copy-webpack-plugin from 10.0.0 to 10.1.0 ([@openlayers](https://github.com/openlayers))
* [#13105](https://github.com/openlayers/openlayers/pull/13105) - Bump eslint from 8.4.0 to 8.4.1 ([@openlayers](https://github.com/openlayers))
* [#13109](https://github.com/openlayers/openlayers/pull/13109) - Bump marked from 4.0.6 to 4.0.7 ([@openlayers](https://github.com/openlayers))
* [#13110](https://github.com/openlayers/openlayers/pull/13110) - Bump puppeteer from 12.0.1 to 13.0.0 ([@openlayers](https://github.com/openlayers))
* [#13111](https://github.com/openlayers/openlayers/pull/13111) - Bump clean-css-cli from 5.4.2 to 5.5.0 ([@openlayers](https://github.com/openlayers))
* [#13091](https://github.com/openlayers/openlayers/pull/13091) - Bump rollup from 2.60.1 to 2.60.2 ([@openlayers](https://github.com/openlayers))
* [#13089](https://github.com/openlayers/openlayers/pull/13089) - Bump eslint from 8.3.0 to 8.4.0 ([@openlayers](https://github.com/openlayers))
* [#13090](https://github.com/openlayers/openlayers/pull/13090) - Bump marked from 4.0.5 to 4.0.6 ([@openlayers](https://github.com/openlayers))
* [#13093](https://github.com/openlayers/openlayers/pull/13093) - Bump yargs from 17.2.1 to 17.3.0 ([@openlayers](https://github.com/openlayers))
* [#13092](https://github.com/openlayers/openlayers/pull/13092) - Bump puppeteer from 12.0.0 to 12.0.1 ([@openlayers](https://github.com/openlayers))
* [#13088](https://github.com/openlayers/openlayers/pull/13088) - Bump geotiff from 1.0.8 to 1.0.9 ([@openlayers](https://github.com/openlayers))
* [#13057](https://github.com/openlayers/openlayers/pull/13057) - Bump puppeteer from 11.0.0 to 12.0.0 ([@openlayers](https://github.com/openlayers))
* [#13055](https://github.com/openlayers/openlayers/pull/13055) - Bump webpack from 5.64.2 to 5.64.4 ([@openlayers](https://github.com/openlayers))
* [#13056](https://github.com/openlayers/openlayers/pull/13056) - Bump webpack-dev-server from 4.5.0 to 4.6.0 ([@openlayers](https://github.com/openlayers))
* [#13058](https://github.com/openlayers/openlayers/pull/13058) - Bump marked from 4.0.4 to 4.0.5 ([@openlayers](https://github.com/openlayers))
* [#13032](https://github.com/openlayers/openlayers/pull/13032) - Bump webpack from 5.64.0 to 5.64.2 ([@openlayers](https://github.com/openlayers))
* [#13033](https://github.com/openlayers/openlayers/pull/13033) - Bump webpack-sources from 3.2.1 to 3.2.2 ([@openlayers](https://github.com/openlayers))
* [#13034](https://github.com/openlayers/openlayers/pull/13034) - Bump rollup from 2.60.0 to 2.60.1 ([@openlayers](https://github.com/openlayers))
* [#13035](https://github.com/openlayers/openlayers/pull/13035) - Bump copy-webpack-plugin from 9.1.0 to 10.0.0 ([@openlayers](https://github.com/openlayers))
* [#13036](https://github.com/openlayers/openlayers/pull/13036) - Bump webpack-dev-middleware from 5.2.1 to 5.2.2 ([@openlayers](https://github.com/openlayers))
* [#13037](https://github.com/openlayers/openlayers/pull/13037) - Bump @babel/preset-env from 7.16.0 to 7.16.4 ([@openlayers](https://github.com/openlayers))
* [#13038](https://github.com/openlayers/openlayers/pull/13038) - Bump marked from 4.0.3 to 4.0.4 ([@openlayers](https://github.com/openlayers))
* [#13039](https://github.com/openlayers/openlayers/pull/13039) - Bump eslint from 8.2.0 to 8.3.0 ([@openlayers](https://github.com/openlayers))
* [#13040](https://github.com/openlayers/openlayers/pull/13040) - Bump ol-mapbox-style from 6.5.2 to 6.5.3 ([@openlayers](https://github.com/openlayers))
* [#13041](https://github.com/openlayers/openlayers/pull/13041) - Bump karma from 6.3.8 to 6.3.9 ([@openlayers](https://github.com/openlayers))
* [#13001](https://github.com/openlayers/openlayers/pull/13001) - Bump webpack from 5.62.1 to 5.64.0 ([@openlayers](https://github.com/openlayers))
* [#13002](https://github.com/openlayers/openlayers/pull/13002) - Bump terser-webpack-plugin from 5.2.4 to 5.2.5 ([@openlayers](https://github.com/openlayers))
* [#13003](https://github.com/openlayers/openlayers/pull/13003) - Bump copy-webpack-plugin from 9.0.1 to 9.1.0 ([@openlayers](https://github.com/openlayers))
* [#13004](https://github.com/openlayers/openlayers/pull/13004) - Bump rollup from 2.59.0 to 2.60.0 ([@openlayers](https://github.com/openlayers))
* [#13005](https://github.com/openlayers/openlayers/pull/13005) - Bump webpack-dev-server from 4.4.0 to 4.5.0 ([@openlayers](https://github.com/openlayers))
* [#13006](https://github.com/openlayers/openlayers/pull/13006) - Bump ol-mapbox-style from 6.5.1 to 6.5.2 ([@openlayers](https://github.com/openlayers))
* [#13007](https://github.com/openlayers/openlayers/pull/13007) - Bump marked from 4.0.0 to 4.0.3 ([@openlayers](https://github.com/openlayers))
* [#13008](https://github.com/openlayers/openlayers/pull/13008) - Bump glob from 7.1.7 to 7.2.0 ([@openlayers](https://github.com/openlayers))
* [#12968](https://github.com/openlayers/openlayers/pull/12968) - Bump sinon from 11.1.2 to 12.0.1 ([@openlayers](https://github.com/openlayers))
* [#12969](https://github.com/openlayers/openlayers/pull/12969) - Bump marked from 3.0.8 to 4.0.0 ([@openlayers](https://github.com/openlayers))
* [#12973](https://github.com/openlayers/openlayers/pull/12973) - Bump eslint from 8.1.0 to 8.2.0 ([@openlayers](https://github.com/openlayers))
* [#12972](https://github.com/openlayers/openlayers/pull/12972) - Bump karma-firefox-launcher from 2.1.1 to 2.1.2 ([@openlayers](https://github.com/openlayers))
* [#12971](https://github.com/openlayers/openlayers/pull/12971) - Bump puppeteer from 10.4.0 to 11.0.0 ([@openlayers](https://github.com/openlayers))
* [#12970](https://github.com/openlayers/openlayers/pull/12970) - Bump karma from 6.3.6 to 6.3.8 ([@openlayers](https://github.com/openlayers))
* [#12967](https://github.com/openlayers/openlayers/pull/12967) - Bump webpack from 5.61.0 to 5.62.1 ([@openlayers](https://github.com/openlayers))
* [#12948](https://github.com/openlayers/openlayers/pull/12948) - Bump webpack from 5.59.1 to 5.61.0 ([@openlayers](https://github.com/openlayers))
* [#12945](https://github.com/openlayers/openlayers/pull/12945) - Bump rollup from 2.58.3 to 2.59.0 ([@openlayers](https://github.com/openlayers))
* [#12946](https://github.com/openlayers/openlayers/pull/12946) - Bump @babel/preset-env from 7.15.8 to 7.16.0 ([@openlayers](https://github.com/openlayers))
* [#12947](https://github.com/openlayers/openlayers/pull/12947) - Bump @babel/core from 7.15.8 to 7.16.0 ([@openlayers](https://github.com/openlayers))
* [#12949](https://github.com/openlayers/openlayers/pull/12949) - Bump karma from 6.3.5 to 6.3.6 ([@openlayers](https://github.com/openlayers))
* [#12944](https://github.com/openlayers/openlayers/pull/12944) - Bump webpack-dev-server from 4.3.1 to 4.4.0 ([@openlayers](https://github.com/openlayers))
* [#12923](https://github.com/openlayers/openlayers/pull/12923) - Bump @rollup/plugin-commonjs from 21.0.0 to 21.0.1 ([@openlayers](https://github.com/openlayers))
* [#12922](https://github.com/openlayers/openlayers/pull/12922) - Bump webpack-cli from 4.9.0 to 4.9.1 ([@openlayers](https://github.com/openlayers))
* [#12929](https://github.com/openlayers/openlayers/pull/12929) - Bump rollup from 2.58.0 to 2.58.3 ([@openlayers](https://github.com/openlayers))
* [#12920](https://github.com/openlayers/openlayers/pull/12920) - Bump marked from 3.0.7 to 3.0.8 ([@openlayers](https://github.com/openlayers))
* [#12924](https://github.com/openlayers/openlayers/pull/12924) - Bump clean-css-cli from 5.4.1 to 5.4.2 ([@openlayers](https://github.com/openlayers))
* [#12926](https://github.com/openlayers/openlayers/pull/12926) - Bump @rollup/plugin-node-resolve from 13.0.5 to 13.0.6 ([@openlayers](https://github.com/openlayers))
* [#12928](https://github.com/openlayers/openlayers/pull/12928) - Bump babel-loader from 8.2.2 to 8.2.3 ([@openlayers](https://github.com/openlayers))
* [#12921](https://github.com/openlayers/openlayers/pull/12921) - Bump webpack from 5.58.2 to 5.59.1 ([@openlayers](https://github.com/openlayers))
* [#12927](https://github.com/openlayers/openlayers/pull/12927) - Bump eslint from 8.0.1 to 8.1.0 ([@openlayers](https://github.com/openlayers))
* [#12919](https://github.com/openlayers/openlayers/pull/12919) - Bump karma from 6.3.4 to 6.3.5 ([@openlayers](https://github.com/openlayers))
* [#12902](https://github.com/openlayers/openlayers/pull/12902) - Bump eslint from 7.32.0 to 8.0.1 ([@openlayers](https://github.com/openlayers))
* [#12904](https://github.com/openlayers/openlayers/pull/12904) - Bump mocha from 9.1.2 to 9.1.3 ([@openlayers](https://github.com/openlayers))
* [#12905](https://github.com/openlayers/openlayers/pull/12905) - Bump glob from 7.1.7 to 7.2.0 ([@openlayers](https://github.com/openlayers))
* [#12903](https://github.com/openlayers/openlayers/pull/12903) - Bump webpack from 5.58.1 to 5.58.2 ([@openlayers](https://github.com/openlayers))
This release follows up on the 6.10 release with a fix for Mapbox vector layers rendered over other layers. A handful of other fixes and features are included. See below for more detail.
* [#13195](https://github.com/openlayers/openlayers/pull/13195) - Use getFeaturesInExtent ([@ahocevar](https://github.com/ahocevar))
* [#13200](https://github.com/openlayers/openlayers/pull/13200) - Use interpolate option in Sea Level example ([@mike-000](https://github.com/mike-000))
* [#13201](https://github.com/openlayers/openlayers/pull/13201) - Fix typo in example description ([@mike-000](https://github.com/mike-000))
* [#13177](https://github.com/openlayers/openlayers/pull/13177) - Use ecoregions data ([@tschaub](https://github.com/tschaub))
* [#13198](https://github.com/openlayers/openlayers/pull/13198) - Avoid failure if existing target has no background color ([@tschaub](https://github.com/tschaub))
* [#13186](https://github.com/openlayers/openlayers/pull/13186) - Add getDataAtPixel() method for WebGL ([@mike-000](https://github.com/mike-000))
* [#13196](https://github.com/openlayers/openlayers/pull/13196) - typo fix for cog-stretch example ([@bradh](https://github.com/bradh))
* [#13190](https://github.com/openlayers/openlayers/pull/13190) - Fix base vector layer template generics ([@ahocevar](https://github.com/ahocevar))
* [#13180](https://github.com/openlayers/openlayers/pull/13180) - Always use ES modules from geotiff.js ([@ahocevar](https://github.com/ahocevar))
* [#13179](https://github.com/openlayers/openlayers/pull/13179) - Use Buffer and data uri when Blob is not available ([@ahocevar](https://github.com/ahocevar))
* [#13178](https://github.com/openlayers/openlayers/pull/13178) - Use background property for vector layers ([@tschaub](https://github.com/tschaub))
* [#13175](https://github.com/openlayers/openlayers/pull/13175) - Allow nodejs 12 to build the examples again ([@MoonE](https://github.com/MoonE))
* [#13176](https://github.com/openlayers/openlayers/pull/13176) - Add `attributions` and `attributionsCollapsible` options to `ol/source/DataTile` ([@mike-000](https://github.com/mike-000))
* [#13171](https://github.com/openlayers/openlayers/pull/13171) - Correct scale bar in EPSG:4326 ([@mike-000](https://github.com/mike-000))
* [#13182](https://github.com/openlayers/openlayers/pull/13182) - Bump eslint from 8.5.0 to 8.6.0 ([@openlayers](https://github.com/openlayers))
* [#13184](https://github.com/openlayers/openlayers/pull/13184) - Bump @rollup/plugin-node-resolve from 13.1.1 to 13.1.2 ([@openlayers](https://github.com/openlayers))
* [#13183](https://github.com/openlayers/openlayers/pull/13183) - Bump @babel/core from 7.16.5 to 7.16.7 ([@openlayers](https://github.com/openlayers))
* [#13185](https://github.com/openlayers/openlayers/pull/13185) - Bump webpack-dev-server from 4.7.1 to 4.7.2 ([@openlayers](https://github.com/openlayers))
* [#13181](https://github.com/openlayers/openlayers/pull/13181) - Bump @babel/preset-env from 7.16.5 to 7.16.7 ([@openlayers](https://github.com/openlayers))
The 6.13 release brings several exciting new features and improvements:
* A new `layer.getData()` method to get pixel data for a single layer (see details below).
* Support for rich text labels in `ol/style/Text`, to use different font styles and fonts in a single label.
* The `useGeograpic()` and `setUserProjection()` functions in the `ol/proj` module are now part of the official API. These functions make it easier to work with geographic coordinates or local projections.
* Improvements for WebGL Tile and Points layers.
* Performance improvements on `ol/Feature`, to avoid event creation when there are no listeners.
* Update of geotiff.js to v2, to fix some build issues that users reported.
* Improvements to the auto-generated TypeScript types.
## Details
### New `layer.getData()` method
Raster layers (static images, image tiles, data tiles) have a new `layer.getData(pixel)` method that returns the pixel data at the provided location. The return value depends on the underlying source data type. For example, a GeoTIFF may return a `Float32Array` with one value per band, while a PNG rendered from a tile layer will return a `Uint8ClampedArray` of RGBA values.
If you were previously using the `map.forEachLayerAtPixel()` method, you should use the new `layer.getData()` method instead. The old method returns composite pixel values from multiple layers and is limited to RGBA values. The new method doesn't suffer from these shortcomings and is more performant.
### Deprecated `map.forEachLayerAtPixel()` method
The `map.forEachLayerAtPixel()` method has been deprecated. It will be removed (or its behavior may change) in the next major release. Please use the `layer.getData()` method instead.
## List of all changes
See below for a complete list of features and fixes.
* Update ol-mapbox-style for rich text labels support (by @ahocevar in https://github.com/openlayers/openlayers/pull/13418)
* Increase GeoTIFF resolutions tolerance (by @ahocevar in https://github.com/openlayers/openlayers/pull/13417)
* Check for graticule resolution change and fix unrotated size (by @mike-000 in https://github.com/openlayers/openlayers/pull/13415)
* Rich text labels (by @ahocevar in https://github.com/openlayers/openlayers/pull/13410)
* Clear image when source's image is not ready (by @yonda-yonda in https://github.com/openlayers/openlayers/pull/13398)
* Fix setting View resolution or center to undefined (by @MoonE in https://github.com/openlayers/openlayers/pull/13393)
* Fix clone of icon loses imgSize when cache is full (by @MoonE in https://github.com/openlayers/openlayers/pull/13390)
* Use same clipping method for vector and image tiles (by @ahocevar in https://github.com/openlayers/openlayers/pull/13392)
* Less clipping of target resolution tiles (by @ahocevar in https://github.com/openlayers/openlayers/pull/13391)
* Change remaining links to point to class page instead of module (by @MoonE in https://github.com/openlayers/openlayers/pull/13385)
* User projection API (by @ahocevar in https://github.com/openlayers/openlayers/pull/13383)
* Fix wrong types when using `"skipLibCheck": false` (by @seravifer in https://github.com/openlayers/openlayers/pull/13382)
* Fix JsDoc references (by @MoonE in https://github.com/openlayers/openlayers/pull/13374)
* Fix VectorSource isEmpty without spatial index (by @MoonE in https://github.com/openlayers/openlayers/pull/13373)
* Document difference between Vector and VectorImage layers (by @ahocevar in https://github.com/openlayers/openlayers/pull/13371)
* Fix `ol/source/Cluster#setSource` type annotation (by @MoonE in https://github.com/openlayers/openlayers/pull/12998)
* Preload tiles for WebGL tile layers (by @tschaub in https://github.com/openlayers/openlayers/pull/13357)
* Avoid event creation when there are no listeners (by @MoonE in https://github.com/openlayers/openlayers/pull/13358)
* Add floor, round and ceil to style expressions (by @mike-000 in https://github.com/openlayers/openlayers/pull/13363)
* Support WebGL layers in ol/source/Raster (by @mike-000 in https://github.com/openlayers/openlayers/pull/13361)
* Improve some null types to prepare for strictNullChecks (by @EvertEt in https://github.com/openlayers/openlayers/pull/13301)
* Reset globalAlpha back to its initial after mutating it for drawing layers (by @Amirh0sseinHZ in https://github.com/openlayers/openlayers/pull/13351)
* Removing an unnecessary word from DEVELOPING.md (by @Amirh0sseinHZ in https://github.com/openlayers/openlayers/pull/13352)
* Get pixel data (by @tschaub in https://github.com/openlayers/openlayers/pull/13338)
* Remove warning for `@type` annotation by jsdoc (by @MoonE in https://github.com/openlayers/openlayers/pull/13350)
* Improve some null types for strictNullChecks (by @EvertEt in https://github.com/openlayers/openlayers/pull/13334)
* Dispose of webgl contexts (by @MoonE in https://github.com/openlayers/openlayers/pull/13336)
* Fix error when accessing ready property of renderer (by @MoonE in https://github.com/openlayers/openlayers/pull/13337)
* Pass tilePixelRatio and gutter to TileTexture (by @mike-000 in https://github.com/openlayers/openlayers/pull/13269)
* Improve some nullable map types (by @EvertEt in https://github.com/openlayers/openlayers/pull/13328)
* Avoid rendering outside WebGL layer and source extent (by @tschaub in https://github.com/openlayers/openlayers/pull/13333)
* Avoid duplicate imports (by @tschaub in https://github.com/openlayers/openlayers/pull/13332)
* Add updateStyleVariables method to WebGLPoints layer (by @ahocevar in https://github.com/openlayers/openlayers/pull/13294)
* Fix rendercomplete for WebGLPoints layer and subclasses (by @ahocevar in https://github.com/openlayers/openlayers/pull/13323)
* fix: fix casing for z-index (by @OSHistory in https://github.com/openlayers/openlayers/pull/13319)
* Fix typo CSS class name for the expanded attributions button (by @fredj in https://github.com/openlayers/openlayers/pull/13315)
* Improve types for tile layers (by @ahocevar in https://github.com/openlayers/openlayers/pull/13299)
* Document geometry type (by @ahocevar in https://github.com/openlayers/openlayers/pull/13298)
* Add function to convert RenderFeature to Feature (by @MoonE in https://github.com/openlayers/openlayers/pull/13297)
* Update to geotiff@2 (by @ahocevar in https://github.com/openlayers/openlayers/pull/13292)
* Re-assign style variables on setStyle() (by @ahocevar in https://github.com/openlayers/openlayers/pull/13293)
* add @api comment on getAllLayers method (by @XiaofengZeng in https://github.com/openlayers/openlayers/pull/13261)
* Allowing to pass additional options to the geotiff.js source (by @constantinius in https://github.com/openlayers/openlayers/pull/13290)
* Defaults for generic types (by @ahocevar in https://github.com/openlayers/openlayers/pull/13291)
* Load api navigation dynamically to reduce needed disk space (by @MoonE in https://github.com/openlayers/openlayers/pull/13229)
* Remove unneeded `src=""` (by @mike-000 in https://github.com/openlayers/openlayers/pull/13271)
* Support multiple sources for WebGL tile layers (by @ahocevar in https://github.com/openlayers/openlayers/pull/13212)
* Add crossOrigin option to LiteralSymbolStyle (by @mike-000 in https://github.com/openlayers/openlayers/pull/13259)
* Avoid the redirect from unpkg.com (by @tschaub in https://github.com/openlayers/openlayers/pull/13242)
* Updates for the 6.12.0 release (by @openlayers in https://github.com/openlayers/openlayers/pull/13241)
<details>
<summary>Dependency Updates</summary>
* Bump express from 4.17.2 to 4.17.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13402)
* Bump puppeteer from 13.3.1 to 13.3.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13401)
* Bump mocha from 9.2.0 to 9.2.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13403)
* Bump webpack from 5.68.0 to 5.69.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13404)
* Bump ol-mapbox-style from 6.8.3 to 6.9.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13406)
* Bump rollup from 2.67.1 to 2.67.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13405)
* Bump @babel/core from 7.17.2 to 7.17.5 (by @openlayers in https://github.com/openlayers/openlayers/pull/13407)
* Bump @babel/core from 7.17.0 to 7.17.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13381)
* Bump karma from 6.3.15 to 6.3.16 (by @openlayers in https://github.com/openlayers/openlayers/pull/13379)
* Bump eslint from 8.8.0 to 8.9.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13377)
* Bump puppeteer from 13.1.3 to 13.3.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13376)
* Bump follow-redirects from 1.14.7 to 1.14.8 (by @openlayers in https://github.com/openlayers/openlayers/pull/13372)
* Bump geotiff from 2.0.3 to 2.0.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13339)
* Bump globby from 13.1.0 to 13.1.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13340)
* Bump rollup from 2.66.1 to 2.67.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13342)
* Bump @babel/core from 7.16.12 to 7.17.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13343)
* Bump karma from 6.3.12 to 6.3.15 (by @openlayers in https://github.com/openlayers/openlayers/pull/13344)
* Bump webpack from 5.67.0 to 5.68.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13345)
* Bump webpack-dev-server from 4.7.3 to 4.7.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13346)
* Bump sinon from 13.0.0 to 13.0.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13348)
* Bump rollup from 2.66.0 to 2.66.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13318)
* Bump karma from 6.3.11 to 6.3.12 (by @openlayers in https://github.com/openlayers/openlayers/pull/13314)
* Bump geotiff from 2.0.2 to 2.0.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13313)
* Bump puppeteer from 13.1.1 to 13.1.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13317)
* Bump sinon from 12.0.1 to 13.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13316)
* Bump jsdoc from 3.6.9 to 3.6.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13312)
* Bump copy-webpack-plugin from 10.2.1 to 10.2.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13311)
* Bump clean-css-cli from 5.5.0 to 5.5.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13310)
* Bump eslint from 8.7.0 to 8.8.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13309)
* Bump webpack-cli from 4.9.1 to 4.9.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13305)
* Bump globby from 13.0.0 to 13.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13308)
* Bump marked from 4.0.10 to 4.0.12 (by @openlayers in https://github.com/openlayers/openlayers/pull/13307)
* Use exactly typescript@4.6.0-beta (by @openlayers in https://github.com/openlayers/openlayers/pull/13306)
* Bump globby from 12.2.0 to 13.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13281)
* Bump @babel/core from 7.16.7 to 7.16.12 (by @openlayers in https://github.com/openlayers/openlayers/pull/13278)
* Bump webpack from 5.66.0 to 5.67.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13277)
* Bump puppeteer from 13.0.1 to 13.1.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13280)
* Bump rollup from 2.64.0 to 2.66.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13279)
* Bump @babel/preset-env from 7.16.8 to 7.16.11 (by @openlayers in https://github.com/openlayers/openlayers/pull/13276)
* Bump copy-webpack-plugin from 10.2.0 to 10.2.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13275)
* Bump jsdoc from 3.6.7 to 3.6.9 (by @openlayers in https://github.com/openlayers/openlayers/pull/13274)
* Bump ol-mapbox-style from 6.8.2 to 6.8.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13273)
* Bump mocha from 9.1.4 to 9.2.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13272)
* Bump eslint from 8.6.0 to 8.7.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13246)
* Bump mocha from 9.1.3 to 9.1.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/13247)
* Bump webpack-sources from 3.2.2 to 3.2.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/13248)
* Bump webpack from 5.65.0 to 5.66.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13249)
* Bump globby from 12.0.2 to 12.2.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13250)
* Bump @babel/preset-env from 7.16.7 to 7.16.8 (by @openlayers in https://github.com/openlayers/openlayers/pull/13251)
* Bump rollup from 2.63.0 to 2.64.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13252)
* Bump karma from 6.3.10 to 6.3.11 (by @openlayers in https://github.com/openlayers/openlayers/pull/13253)
* Bump marked from 4.0.9 to 4.0.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13243)
The 6.14 release includes a few new features and fixes. The new `loadstart` and `loadend` events make it easy to add loading indicators to your maps. Enhancements to the snap interaction add support for snapping to points coincident with lines and improve performance. A change to WebGL rendering works around [an issue](https://bugs.webkit.org/show_bug.cgi?id=238196) in Safari 15.4. Find detail on these improvements and more in the full list of changes below.
#### List of all changes
See below for a complete list of features and fixes.
* Store rendered source on the layer instead of the layer state (by @tschaub in https://github.com/openlayers/openlayers/pull/13509)
* Change imageSmoothing to interpolate in tests (by @mike-000 in https://github.com/openlayers/openlayers/pull/13506)
* Fallback if `OES_texture_float_linear` is not supported (by @mike-000 in https://github.com/openlayers/openlayers/pull/13505)
* Workaround for Safari WebGL issue (by @tschaub in https://github.com/openlayers/openlayers/pull/13492)
* Separate geometry and extent parsing (by @ahocevar in https://github.com/openlayers/openlayers/pull/13490)
* Add loadstart and loadend map events (by @ahocevar in https://github.com/openlayers/openlayers/pull/13491)
* Add documentation for precompose and postcopose to ol/layer/WebGLTile (by @ahocevar in https://github.com/openlayers/openlayers/pull/13482)
* Fix legacy build (by @ahocevar in https://github.com/openlayers/openlayers/pull/13469)
* Fix Text#setText jsDoc (by @rycgar in https://github.com/openlayers/openlayers/pull/13466)
* Do not warn about coordinates when view projection is configured (by @ahocevar in https://github.com/openlayers/openlayers/pull/13464)
* Reset image when empty (by @ahocevar in https://github.com/openlayers/openlayers/pull/13463)
* Revert image transition regression (by @ahocevar in https://github.com/openlayers/openlayers/pull/13460)
* Improve Snap interaction performance (by @MoonE in https://github.com/openlayers/openlayers/pull/13455)
* Snap Interaction can snap to Point on line segment (by @T-MAPY in https://github.com/openlayers/openlayers/pull/13446)
* Initialize variable before use in FullScreen control (by @MoonE in https://github.com/openlayers/openlayers/pull/13447)
* Ensure FullScreen button has classname set on render. (by @themoffster in https://github.com/openlayers/openlayers/pull/13444)
* Guard PluggableMap against null renderer (by @EvertEt in https://github.com/openlayers/openlayers/pull/13437)
* Fix rendercomplete with invisible WebGLPoints layer (by @M393 in https://github.com/openlayers/openlayers/pull/13434)
* Handle layers without renderer properly (by @ahocevar in https://github.com/openlayers/openlayers/pull/13424)
<details>
<summary>Dependency Updates</summary>
* Bump minimist from 1.2.5 to 1.2.6 (by @openlayers in https://github.com/openlayers/openlayers/pull/13501)
* Bump node-forge from 1.2.1 to 1.3.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13498)
* Bump yargs from 17.3.1 to 17.4.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13493)
* Bump @babel/core from 7.17.5 to 7.17.8 (by @openlayers in https://github.com/openlayers/openlayers/pull/13494)
* Bump puppeteer from 13.4.1 to 13.5.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13472)
* Bump karma-chrome-launcher from 3.1.0 to 3.1.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13474)
* Bump mocha from 9.2.1 to 9.2.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13475)
* Bump proj4 from 2.7.5 to 2.8.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13476)
* Bump rollup from 2.70.0 to 2.70.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13477)
* Bump ol-mapbox-style from 7.0.0 to 7.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13473)
* Bump rollup from 2.69.0 to 2.70.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13449)
* Bump webpack from 5.69.1 to 5.70.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13450)
* Bump puppeteer from 13.4.0 to 13.4.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13451)
* Bump karma from 6.3.16 to 6.3.17 (by @openlayers in https://github.com/openlayers/openlayers/pull/13452)
* Bump typescript from 4.6.0-beta to 4.6.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13453)
* Bump puppeteer from 13.3.2 to 13.4.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13427)
* Bump fs-extra from 10.0.0 to 10.0.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13429)
* Bump @rollup/plugin-commonjs from 21.0.1 to 21.0.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13430)
* Bump rollup from 2.67.3 to 2.69.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13442)
* Bump @rollup/plugin-babel from 5.3.0 to 5.3.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13426)
The 6.14.1 release is a patch to correct a version discrepancy in the `package-lock.json` file. See the [changelog for 6.14.0](https://github.com/openlayers/openlayers/releases/tag/v6.14.0) for new features and fixes since 6.13.
The 6.15 release brings several fixes and improvements:
* Faster vector tile rendering for soures with non-standard tile grids
* Reduced canvas memory footprint for increased stability on iOS devices and better rendering performance
* Fixed a bug that prevented tiles from expiring from the tile cache in the correct order
* Better type safety with an increasing number of `null` checks and union types
* New `setFill` and `setStroke` methods for `RegularShape` symbols
* Vector symbol and text decluttering on the style level
* Fixed pointer event handling on touch devices when layer visibility changes
* New `justify` option for text styles
* New `Link` interation for adding center, zoom, rotation and active layers to the URL
* Easier css styling of the scale bar, and in addition to `minWidth`, the scale line can now also be configured with a `maxWidth`
## Details
### Deprecated `tilePixelRatio` option for data tile sources.
If you were previously trying to scale data tiles using the `tilePixelRatio` property for data tile sources (this is rare), you should now use the explicit `tileSize` and `tileGrid` properties. The source's `tileSize` represents the source tile dimensions and the tile grid's `tileSize` represents the desired rendered dimensions.
### Fixed coordinate dimension handling in `ol/proj`'s `addCoordinateTransforms`
The `forward` and `inverse` functions passed to `addCooordinateTransforms` now receive a coordinate with all dimensions of the original coordinate, not just two. If you previosly had coordinates with more than two dimensions and added a transform like
The 6.15.1 release is a patch to ensure that a layer gets rendered when its source has completed loading. See the [changelog for 6.15.0](https://github.com/openlayers/openlayers/releases/tag/v6.15.0) for new features and fixes since 6.14.
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.
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.
The 6.9 release brings a few new features and a number of fixes. GeoTIFF sources now have a `normalize` option. Set `normalize: false` if you want your style expressions to work with raw floating point values instead of normalized values from 0 to 1. The GeoTIFF source also now uses nodata values from the source imagery –so in most cases you don't need to specify this yourself. For people configuring vector layers with styles that use custom rendering, you can now get hit detection on the rendered result. See details on these features and other included fixes below.
* [#12813](https://github.com/openlayers/openlayers/pull/12813) - Do not replace icon color if image not loaded ([@mike-000](https://github.com/mike-000))
* [#12870](https://github.com/openlayers/openlayers/pull/12870) - Fix publicPath problem in legacy build ([@ahocevar](https://github.com/ahocevar))
* [#12875](https://github.com/openlayers/openlayers/pull/12875) - Only trigger change event if animating a tile transition ([@tschaub](https://github.com/tschaub))
* [#12885](https://github.com/openlayers/openlayers/pull/12885) - Fix typeDefs for several Control modules ([@MatthijsBon](https://github.com/MatthijsBon))
* [#12861](https://github.com/openlayers/openlayers/pull/12861) - Update geotiff to 1.0.8; allow version range ([@ahocevar](https://github.com/ahocevar))
* [#12865](https://github.com/openlayers/openlayers/pull/12865) - Add a note about installing git before using create-ol-app ([@tschaub](https://github.com/tschaub))
* [#12847](https://github.com/openlayers/openlayers/pull/12847) - Add more definitions for GeoTIFF types ([@tschaub](https://github.com/tschaub))
* [#12850](https://github.com/openlayers/openlayers/pull/12850) - Fix issues with animate on View without center or resolution ([@MoonE](https://github.com/MoonE))
* [#12846](https://github.com/openlayers/openlayers/pull/12846) - Use nodata values in the GeoTIFF headers for fill value ([@tschaub](https://github.com/tschaub))
* [#12836](https://github.com/openlayers/openlayers/pull/12836) - Support a normalize option on the GeoTIFF source ([@tschaub](https://github.com/tschaub))
* [#12646](https://github.com/openlayers/openlayers/pull/12646) - Support for hit detection in styles with custom rendering ([@ashchurova](https://github.com/ashchurova))
* [#12831](https://github.com/openlayers/openlayers/pull/12831) - Fix rendering VectorImage with no features in view extent ([@MoonE](https://github.com/MoonE))
* [#12830](https://github.com/openlayers/openlayers/pull/12830) - bugfix: Fix type of `layers` option in `OverviewMap` ([@ejn](https://github.com/ejn))
* [#12881](https://github.com/openlayers/openlayers/pull/12881) - Bump webpack from 5.56.1 to 5.58.1 ([@openlayers](https://github.com/openlayers))
* [#12882](https://github.com/openlayers/openlayers/pull/12882) - Bump marked from 3.0.4 to 3.0.7 ([@openlayers](https://github.com/openlayers))
* [#12878](https://github.com/openlayers/openlayers/pull/12878) - Bump webpack-dev-server from 4.3.0 to 4.3.1 ([@openlayers](https://github.com/openlayers))
* [#12879](https://github.com/openlayers/openlayers/pull/12879) - Bump @babel/preset-env from 7.15.6 to 7.15.8 ([@openlayers](https://github.com/openlayers))
* [#12880](https://github.com/openlayers/openlayers/pull/12880) - Bump @babel/eslint-parser from 7.15.7 to 7.15.8 ([@openlayers](https://github.com/openlayers))
* [#12884](https://github.com/openlayers/openlayers/pull/12884) - Bump @babel/core from 7.15.5 to 7.15.8 ([@openlayers](https://github.com/openlayers))
* [#12877](https://github.com/openlayers/openlayers/pull/12877) - Bump webpack-cli from 4.8.0 to 4.9.0 ([@openlayers](https://github.com/openlayers))
* [#12854](https://github.com/openlayers/openlayers/pull/12854) - Bump webpack from 5.54.0 to 5.56.1 ([@openlayers](https://github.com/openlayers))
* [#12857](https://github.com/openlayers/openlayers/pull/12857) - Bump webpack-dev-server from 4.2.1 to 4.3.0 ([@openlayers](https://github.com/openlayers))
* [#12856](https://github.com/openlayers/openlayers/pull/12856) - Bump @rollup/plugin-commonjs from 20.0.0 to 21.0.0 ([@openlayers](https://github.com/openlayers))
* [#12855](https://github.com/openlayers/openlayers/pull/12855) - Bump rollup from 2.57.0 to 2.58.0 ([@openlayers](https://github.com/openlayers))
* [#12853](https://github.com/openlayers/openlayers/pull/12853) - Bump clean-css-cli from 5.3.3 to 5.4.1 ([@openlayers](https://github.com/openlayers))
* [#12822](https://github.com/openlayers/openlayers/pull/12822) - Bump glob from 7.1.7 to 7.2.0 ([@openlayers](https://github.com/openlayers))
* [#12824](https://github.com/openlayers/openlayers/pull/12824) - Bump rollup from 2.56.3 to 2.57.0 ([@openlayers](https://github.com/openlayers))
* [#12818](https://github.com/openlayers/openlayers/pull/12818) - Bump threads from 1.6.5 to 1.7.0 ([@openlayers](https://github.com/openlayers))
* [#12821](https://github.com/openlayers/openlayers/pull/12821) - Bump @rollup/plugin-node-resolve from 13.0.4 to 13.0.5 ([@openlayers](https://github.com/openlayers))
* [#12823](https://github.com/openlayers/openlayers/pull/12823) - Bump walk from 2.3.14 to 2.3.15 ([@openlayers](https://github.com/openlayers))
* [#12819](https://github.com/openlayers/openlayers/pull/12819) - Bump webpack-dev-middleware from 5.1.0 to 5.2.1 ([@openlayers](https://github.com/openlayers))
* [#12820](https://github.com/openlayers/openlayers/pull/12820) - Bump mocha from 9.1.1 to 9.1.2 ([@openlayers](https://github.com/openlayers))
* [#12817](https://github.com/openlayers/openlayers/pull/12817) - Bump yargs from 17.1.1 to 17.2.1 ([@openlayers](https://github.com/openlayers))
* [#12825](https://github.com/openlayers/openlayers/pull/12825) - Bump webpack from 5.53.0 to 5.54.0 ([@openlayers](https://github.com/openlayers))
* [#12826](https://github.com/openlayers/openlayers/pull/12826) - Bump puppeteer from 10.2.0 to 10.4.0 ([@openlayers](https://github.com/openlayers))
The 7.0 release includes an impressive batch of features and fixes from over 90 pull requests. We're excited about a new foundation for WebGL vector rendering. The previous point rendering functionality has been extended to include lines and polygons. The rendering API is still low level and experimental. Future releases will include a higher level styling API. In developing the new WebGL rendering functionality, we changed the signature for a number of methods on a helper class that had been marked as part of the API in 6.x releases. While this is technically a breaking change, it is unlikely that applications were using this helper class, so upgrades should be straightforward.
We took advantage of the breaking change in the WebGL helper class to remove a few other deprecated parts of the API. In addition, since Microsoft ended support for Internet Explorer a few months ago, we decided to do the same.
### Backwards incompatible changes
#### Removal of deprecated properties and methods
* The `tilePixelRatio` has been removed from the `DataTile` source.
* The `imageSmoothing` option has been removed from sources.
* The `undefinedHTML` option has been removed from the `MousePosition` control.
* The `forEachLayerAtPixel` method has been removed from the `Map` class.
* Deprecated options have been removed from the `Overlay` component.
* The `labelCache` has been removed from the `ol/render/canvas.js` module.
#### Internet Explorer is no longer supported
Please see https://docs.microsoft.com/en-us/lifecycle/announcements/internet-explorer-11-end-of-support.
#### ol/webgl/Helper.js
The `Helper` constructor from the `ol/webgl/Helper.js` module is no longer part of the public API.
#### ol/coordinate.js
The `toStringHDMS` function from the `ol/coordinate.js` module now formats longitude, latitude pairs so that the minutes and seconds are omitted if they are zero. This changes the values displayed on graticules.
#### ol/layer/Graticule
The default `intervals` now align with integer minutes and seconds better suited to the default label formatter. If formatting in decimal degrees you may wish to specify custom `intervals` suited to that format.
#### ol/Collection
Inserting with `setAt` or `insertAt` beyond the current length used to create a sparse Collection with `undefined` inserted for any missing indexes. This will now throw an error instead.
#### ol/control/MousePosition
The control will now by default keep displaying the last mouse position when the mouse leaves the viewport. With `placeholder: ' '` you can keep the old behaviour. The `placeholder` option no longer accepts `false` as a valid value, instead simply omit the option. The `undefinedHTML` option has been removed. You should use `placeholder` instead.
#### ol/PluggableMap
The `PluggableMap` class has been removed. If you want to create a custom map class, extend the `Map` class instead.
#### ol/style/Icon and ol/style/RegularShape
`ol/style/Image` and subclasses `displacement` is no longer scaled with the image. If you previously expected this unintended behavior you should now increase the displacement when setting the scale.
### List of all changes
See below for a complete list of features and fixes.
* Make the website deploy job succeed even if there are no changes (by @tschaub in https://github.com/openlayers/openlayers/pull/14017)
* Release actions (by @tschaub in https://github.com/openlayers/openlayers/pull/14014)
* Properly clear and refresh reprojected sources (by @ahocevar in https://github.com/openlayers/openlayers/pull/14013)
* Remove ENABLE_RASTER_REPROJECTION flag (by @ahocevar in https://github.com/openlayers/openlayers/pull/14011)
* Force render after update in Icon Scale example (by @mike-000 in https://github.com/openlayers/openlayers/pull/14012)
* Update ol-mapbox-style to v9.0.0 (by @ahocevar in https://github.com/openlayers/openlayers/pull/14009)
* Replace the Icon Scale example (by @mike-000 in https://github.com/openlayers/openlayers/pull/14007)
* Improve description of displacement in docs (by @mike-000 in https://github.com/openlayers/openlayers/pull/14006)
* Remove IE workarounds for legacy build, examples, and workers (by @tschaub in https://github.com/openlayers/openlayers/pull/13995)
* Use the full table for constructor options (by @tschaub in https://github.com/openlayers/openlayers/pull/13998)
* Do not scale Icon and RegularShape displacement (by @mike-000 in https://github.com/openlayers/openlayers/pull/13975)
* Support user projections in Drag and Drop (by @mike-000 in https://github.com/openlayers/openlayers/pull/14003)
* Avoid append only cache in WebGL tile layers (by @tschaub in https://github.com/openlayers/openlayers/pull/13997)
* Fix immediate renderer text rotation with offset (by @mike-000 in https://github.com/openlayers/openlayers/pull/13981)
* Build and deploy the website (by @openlayers in https://github.com/openlayers/openlayers/pull/13984)
* Small example template fixes (by @openlayers in https://github.com/openlayers/openlayers/pull/13992)
* Fix wording in API docs (by @openlayers in https://github.com/openlayers/openlayers/pull/13991)
* Nicer links in the API docs (by @tschaub in https://github.com/openlayers/openlayers/pull/13970)
* Minor adjustments to the website style (by @tschaub in https://github.com/openlayers/openlayers/pull/13989)
* Fix copying of non-linked ol.css, clean example build (by @MoonE in https://github.com/openlayers/openlayers/pull/13988)
* Fix kml-timezone example calculations (by @MoonE in https://github.com/openlayers/openlayers/pull/13982)
* Fix some errors in examples (by @MoonE in https://github.com/openlayers/openlayers/pull/13977)
* Update FontAwesome to v6.1.2 (by @MoonE in https://github.com/openlayers/openlayers/pull/13978)
* Use correct bands with `LUMINANCE_ALPHA` (by @mike-000 in https://github.com/openlayers/openlayers/pull/13974)
* Remove opt_ prefix (by @tschaub in https://github.com/openlayers/openlayers/pull/13972)
* Fix bandcount per texture for 8, 12, 16, etc. bands (by @mike-000 in https://github.com/openlayers/openlayers/pull/13973)
* Do not apply #12467 change to Icons (by @mike-000 in https://github.com/openlayers/openlayers/pull/13955)
* Remove more IE compatibility (by @MoonE in https://github.com/openlayers/openlayers/pull/13971)
* Remove workaround and docs for IE 11 (by @tschaub in https://github.com/openlayers/openlayers/pull/13965)
* Remove circular dependency (by @tschaub in https://github.com/openlayers/openlayers/pull/13967)
* Update link to sponsors (by @tschaub in https://github.com/openlayers/openlayers/pull/13968)
* Bundle code for the map on the homepage (by @tschaub in https://github.com/openlayers/openlayers/pull/13966)
* Website build (by @tschaub in https://github.com/openlayers/openlayers/pull/13961)
* Remove polyfills for IE and Android 4 (by @tschaub in https://github.com/openlayers/openlayers/pull/13963)
* Replace VERSION in un-transpiled source (by @MoonE in https://github.com/openlayers/openlayers/pull/13957)
* Use const in docs and other places (by @MoonE in https://github.com/openlayers/openlayers/pull/13958)
* Add few missing new lines in example source listing (by @MoonE in https://github.com/openlayers/openlayers/pull/13959)
* Fix js error in api pages on load (by @MoonE in https://github.com/openlayers/openlayers/pull/13956)
* Minor simplification (by @JakobMiksch in https://github.com/openlayers/openlayers/pull/13953)
* Fix typo and formatting in upgrade notes (by @mike-000 in https://github.com/openlayers/openlayers/pull/13946)
* Fixes to export examples (by @mike-000 in https://github.com/openlayers/openlayers/pull/13947)
* Fix WebGL points layer flaky test (by @jahow in https://github.com/openlayers/openlayers/pull/13944)
* Scaleline (by @MoonE in https://github.com/openlayers/openlayers/pull/13943)
* Improve loading of kmz file in example (by @MoonE in https://github.com/openlayers/openlayers/pull/13942)
* Fix KML default icon anchor with https icon url (by @MoonE in https://github.com/openlayers/openlayers/pull/13941)
* Use nicer functions, remove old code (by @MoonE in https://github.com/openlayers/openlayers/pull/13937)
* Render vector tile vectors in correct sequence for the postrender event (by @ahocevar in https://github.com/openlayers/openlayers/pull/13939)
* Remove workaround for missing TypedArray.from function (by @MoonE in https://github.com/openlayers/openlayers/pull/13936)
* Remove check for context.setLineDash (by @MoonE in https://github.com/openlayers/openlayers/pull/13933)
* Remove deprecated DataTile source `tilePixelRatio` (by @mike-000 in https://github.com/openlayers/openlayers/pull/13930)
* Remove input type="range" `change` event listeners where `input` events are also used (by @mike-000 in https://github.com/openlayers/openlayers/pull/13932)
* Remove deprecated `imageSmoothing` source options (by @mike-000 in https://github.com/openlayers/openlayers/pull/13931)
* Updated map background (by @tschaub in https://github.com/openlayers/openlayers/pull/13926)
* Include babel for CodeSandbox (by @tschaub in https://github.com/openlayers/openlayers/pull/13923)
* Remove reference to ES6 as ES2017 already listed (by @mike-000 in https://github.com/openlayers/openlayers/pull/13922)
* Style updates for examples and API docs (by @tschaub in https://github.com/openlayers/openlayers/pull/13917)
* Remove Google Analytics and cookie consent (by @tschaub in https://github.com/openlayers/openlayers/pull/13916)
* Fix map render test (by @MoonE in https://github.com/openlayers/openlayers/pull/13915)
* Uniformly grayscale controls (by @tschaub in https://github.com/openlayers/openlayers/pull/13908)
* Remove PluggableMap (by @tschaub in https://github.com/openlayers/openlayers/pull/13914)
* Remove MousePosition's deprecated undefinedHTML option (by @MoonE in https://github.com/openlayers/openlayers/pull/13911)
* Remove IconImage color fallback for IE (by @MoonE in https://github.com/openlayers/openlayers/pull/13912)
* Remove IE fallbacks (by @MoonE in https://github.com/openlayers/openlayers/pull/13907)
* Fix editing of export-map example on codesandbox (by @MoonE in https://github.com/openlayers/openlayers/pull/13910)
* Improve Collection type-safety (by @MoonE in https://github.com/openlayers/openlayers/pull/13902)
* Re-export the link interaction from the interactions module (by @tschaub in https://github.com/openlayers/openlayers/pull/13906)
* Replace enums with typedefs (by @MoonE in https://github.com/openlayers/openlayers/pull/13905)
* Accept an object literal for static layer styling (by @tschaub in https://github.com/openlayers/openlayers/pull/13900)
* Update jsdoc-plugin-typescript to fix markdown in type annotations (by @ahocevar in https://github.com/openlayers/openlayers/pull/13903)
* Wait until first load to create icon image (by @tschaub in https://github.com/openlayers/openlayers/pull/13899)
* Make Text options typesafe (by @MoonE in https://github.com/openlayers/openlayers/pull/13901)
* Align graticule default intervals to minutes and seconds (by @mike-000 in https://github.com/openlayers/openlayers/pull/13897)
* Publish untranspiled sources (by @tschaub in https://github.com/openlayers/openlayers/pull/13891)
* Improve reprojection WMS config for better performance (by @ahocevar in https://github.com/openlayers/openlayers/pull/13880)
* Omit minutes and seconds from HDMS formatting if zero (by @tschaub in https://github.com/openlayers/openlayers/pull/13893)
* Use Object.assign (by @tschaub in https://github.com/openlayers/openlayers/pull/13888)
* Remove unused worker (by @tschaub in https://github.com/openlayers/openlayers/pull/13892)
* Remove find and findIndex from array module (by @tschaub in https://github.com/openlayers/openlayers/pull/13887)
* Use Math.cosh and Math.log2 (by @tschaub in https://github.com/openlayers/openlayers/pull/13890)
* Use Object.values (by @tschaub in https://github.com/openlayers/openlayers/pull/13889)
* Remove workaround for Array.prototype.includes (by @tschaub in https://github.com/openlayers/openlayers/pull/13884)
* Codesandbox and bundler improvements for examples (by @ahocevar in https://github.com/openlayers/openlayers/pull/13879)
* Remove deprecated method PluggableMap#forEachLayerAtPixel ... (by @MoonE in https://github.com/openlayers/openlayers/pull/13868)
* Remove unused assertion numbers (by @MoonE in https://github.com/openlayers/openlayers/pull/13869)
* Remove deprecated Overlay options (by @MoonE in https://github.com/openlayers/openlayers/pull/13838)
* WebGL vector renderer for polygons, lines and points (by @jahow in https://github.com/openlayers/openlayers/pull/13461)
* Fix reloading tiles in case of an error with tile.load() (by @ahocevar in https://github.com/openlayers/openlayers/pull/13863)
* Handle multipolygons with empty polygons (by @ahocevar in https://github.com/openlayers/openlayers/pull/13860)
* Replace enums with typedef (by @MoonE in https://github.com/openlayers/openlayers/pull/13858)
* Remove deprecated label cache (by @MoonE in https://github.com/openlayers/openlayers/pull/13837)
* Update dev version to 7.0.0 (by @MoonE in https://github.com/openlayers/openlayers/pull/13850)
* Release v6.15.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/13852)
* Recover from incorrect rebase after removal of string enums (by @ahocevar in https://github.com/openlayers/openlayers/pull/13835)
* Updates for the 6.15.0 release (by @openlayers in https://github.com/openlayers/openlayers/pull/13851)
<details>
<summary>Dependency Updates</summary>
* Bump webpack-dev-server from 4.9.3 to 4.10.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13986)
* Bump rollup from 2.77.2 to 2.78.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13985)
* Bump eslint from 8.21.0 to 8.22.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13987)
* Bump @babel/preset-env from 7.18.9 to 7.18.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13948)
* Bump @babel/core from 7.18.9 to 7.18.10 (by @openlayers in https://github.com/openlayers/openlayers/pull/13949)
* Bump @rollup/plugin-commonjs from 22.0.1 to 22.0.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13951)
* Bump puppeteer from 15.5.0 to 16.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13950)
* Bump rollup from 2.77.0 to 2.77.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13919)
* Bump eslint from 8.20.0 to 8.21.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13920)
* Bump jsdoc-plugin-typescript from 2.0.7 to 2.1.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13875)
* Bump puppeteer from 15.4.0 to 15.5.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13871)
* Bump webpack from 5.73.0 to 5.74.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/13870)
* Bump jsdoc from 3.6.10 to 3.6.11 (by @openlayers in https://github.com/openlayers/openlayers/pull/13873)
* Bump terser from 5.7.2 to 5.14.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/13859)
<p>All coordinates and extents need to be provided in view projection (default: EPSG:3857). To transform coordinates from and to geographic, use <a href="module-ol_proj.html#.fromLonLat">ol/proj#fromLonLat()</a> and <a href="module-ol_proj.html#.toLonLat">ol/proj#toLonLat()</a>. For extents and other projections, use <a href="module-ol_proj.html#.transformExtent">ol/proj#transformExtent()</a> and <a href="module-ol_proj.html#.transform">ol/proj#transform()</a>.<p>
<p>All coordinates and extents need to be provided in view projection (default: EPSG:3857). To transform coordinates from and to geographic, use <a href="module-ol_proj.html#.fromLonLat">fromLonLat()</a> and <a href="module-ol_proj.html#.toLonLat">toLonLat()</a>. For extents and other projections, use <a href="module-ol_proj.html#.transformExtent">transformExtent()</a> and <a href="module-ol_proj.html#.transform">transform()</a>.</p>
<a href="module-ol_proj.html">ol/proj</a>
<p>Find these functions and more in the <a href="module-ol_proj.html">ol/proj</a> module.</p>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -81,7 +82,7 @@
<div class="card h-100 bg-light">
<div class="card h-100 bg-light">
<div class="card-body">
<div class="card-body">
<h4 class="card-title">Observable objects</h4>
<h4 class="card-title">Observable objects</h4>
<p>Changes to all <a href="module-ol_Object-BaseObject.html">ol/Object</a>s can be observed by calling the <a href="module-ol_Object-BaseObject.html#on">object.on('propertychange')</a> method. Listeners receive an <a href="module-ol_Object.ObjectEvent.html">ol/Object.ObjectEvent</a> with information on the changed property and old value.</p>
<p>Changes to all <a href="module-ol_Object-BaseObject.html">Object</a>s can be observed by calling the <a href="module-ol_Object-BaseObject.html#on">object.on('propertychange')</a> method. Listeners receive an <a href="module-ol_Object.ObjectEvent.html">ObjectEvent</a> with information on the changed property and old value.</p>
This documentation is for OpenLayers v<span id="package-version"><?js= version ?></span>. The <a id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
This documentation is for OpenLayers v<span id="package-version"><?js= version ?></span>. The <a id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
This primer shows you how to put a simple map on a web page.
**For production, we strongly recommend bundling the application together with its dependencies, as explained in the [Building an OpenLayers Application](./tutorials/bundle.html) tutorial.**
## Put a map on a page
Below you'll find a complete working example. Create a new file, copy in the contents below, and open in a browser:
The first part is to include the JavaScript library. For the purpose of this tutorial, here we simply point to the openlayers.org website to get the whole library. In a production environment, we would build a custom version of the library including only the module needed for our application.
**Optional:** If the application is intended to run on old platforms like Internet Explorer or Android 4.x, another script needs to be included before OpenLayers:
The map in the application is contained in a [`<div>` HTML element](https://en.wikipedia.org/wiki/Span_and_div). Through this `<div>` the map properties like width, height and border can be controlled through CSS. Here's the CSS element used to make the map 400 pixels high and as wide as the browser window.
```xml
<style>
.map {
height: 400px;
width: 100%;
}
</style>
```
### JavaScript to create a simple map
```js
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
view: new ol.View({
center: ol.proj.fromLonLat([37.41, 8.82]),
zoom: 4
})
});
```
With this JavaScript code, a map object is created with an OSM layer zoomed on the African East coast. Let's break this down:
The following line creates an OpenLayers `Map` object. Just by itself, this does nothing since there's no layers or interaction attached to it.
```js
var map = new ol.Map({ ... });
```
To attach the map object to the `<div>`, the map object takes a `target` into arguments. The value is the `id` of the `<div>`:
```js
target: 'map'
```
The `layers: [ ... ]` array is used to define the list of layers available in the map. The first and only layer right now is a tiled layer:
```js
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
]
```
Layers in OpenLayers are defined with a type (Image, Tile or Vector) which contains a source. The source is the protocol used to get the map tiles.
The next part of the `Map` object is the `View`. The view allows to specify the center, resolution, and rotation of the map. The simplest way to define a view is to define a center point and a zoom level. Note that zoom level 0 is zoomed out.
```js
view: new ol.View({
center: ol.proj.fromLonLat([37.41, 8.82]),
zoom: 4
})
```
You will notice that the `center` specified is in lon/lat coordinates (EPSG:4326). Since the only layer we use is in Spherical Mercator projection (EPSG:3857), we can reproject them on the fly to be able to zoom the map on the right coordinates.
Modern JavaScript works best when using and authoring modules. The recommended way of using OpenLayers is installing the [`ol`](https://npmjs.com/package/ol) package. This tutorial walks you through setting up a simple dev environment, which requires [node](https://nodejs.org) for everything to work.
In this tutorial, we will be using [Parcel](https://parceljs.org) to bundle our application. There are several other options, some of which are linked from the [README](https://npmjs.com/package/ol).
## Application setup
Create a new empty directory for your project and navigate to it by running `mkdir new-project && cd new-project`. Initialize your project with
npx create-ol-app
This will install the `ol` package, set up a development environment with additional dependencies, and give you an `index.html` and `main.js` starting point for your application. By default, [Parcel](https://parceljs.org) will be used as a module loader and bundler. See the [`create-ol-app`](https://github.com/openlayers/create-ol-app) documentation for details on using another bundler.
To start the development server
npm start
You can now visit http://localhost:1234/ to view your application. Begin making changes to the `index.html` and `main.js` files to add additional functionality.
To create a production bundle of your application, simply type
npm run build
and copy the `dist/` folder to your production server.
<p>When the Bing Maps tile service doesn't have tiles for a given resolution and region it returns "placeholder" tiles indicating that. Zoom the map beyond level 19 to see the "placeholder" tiles. If you want OpenLayers to display stretched tiles in place of "placeholder" tiles beyond zoom level 19 then set <code>maxZoom</code> to <code>19</code> in the options passed to <code>ol/source/BingMaps</code>.</p>
<p>When the Bing Maps tile service doesn't have tiles for a given resolution and region it returns "placeholder" tiles indicating that. Zoom the map beyond level 19 to see the "placeholder" tiles. If you want OpenLayers to display stretched tiles in place of "placeholder" tiles beyond zoom level 19 then set <code>maxZoom</code> to <code>19</code> in the options passed to <code>ol/source/BingMaps</code>.</p>
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.