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
+4
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. 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 ### v6.12.0
No special changes are required when upgrading to the 6.12.0 release. No special changes are required when upgrading to the 6.12.0 release.
+1
View File
@@ -710,6 +710,7 @@ class PluggableMap extends BaseObject {
* callback execution, or the first truthy callback return value. * callback execution, or the first truthy callback return value.
* @template S,T * @template S,T
* @api * @api
* @deprecated
*/ */
forEachLayerAtPixel(pixel, callback, opt_options) { forEachLayerAtPixel(pixel, callback, opt_options) {
if (!this.frameState_) { if (!this.frameState_) {