Ignore layer filter for unmanaged layers

To make unmanaged vector layers work like the removed ol.FeatureOverlay,
the layer filter for ol.Map#forEachFeatureAtPixel needs to ignore unmanaged
layers.
This commit is contained in:
Andreas Hocevar
2015-07-07 22:24:57 +02:00
parent a62bbd6650
commit 26e146b1d8
3 changed files with 66 additions and 7 deletions
+7 -4
View File
@@ -148,10 +148,13 @@ ol.layer.Layer.prototype.handleSourcePropertyChange_ = function() {
/**
* Sets the layer to be rendered on a map. The map will not manage this layer in
* its layers collection, and the layer will be rendered on top. This is useful
* for temporary layers. To remove an unmanaged layer from the map, use
* `#setMap(null)`. To add the layer to a map and have it managed by the map,
* use {@link ol.Map#addLayer} instead.
* its layers collection, layer filters in {@link ol.Map#forEachLayerAtPixel}
* will not filter the layer, and it will be rendered on top. This is useful for
* temporary layers. To remove an unmanaged layer from the map, use
* `#setMap(null)`.
*
* To add the layer to a map and have it managed by the map, use
* {@link ol.Map#addLayer} instead.
* @param {ol.Map} map Map.
* @api
*/