Deprecate map.forEachLayerAtPixel()

This commit is contained in:
Tim Schaub
2022-02-08 18:30:45 -07:00
parent bd86639351
commit 093f64c07d
2 changed files with 5 additions and 0 deletions

View File

@@ -8,6 +8,10 @@ Raster layers (static images, image tiles, data tiles) have a new `layer.getData
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.
### v6.12.0
No special changes are required when upgrading to the 6.12.0 release.

View File

@@ -710,6 +710,7 @@ class PluggableMap extends BaseObject {
* callback execution, or the first truthy callback return value.
* @template S,T
* @api
* @deprecated
*/
forEachLayerAtPixel(pixel, callback, opt_options) {
if (!this.frameState_) {