Dynamic layers and lazy selection layer creation
With this change, the user provides a filter function instead of an array of layers. Selection layers are created lazily, and addition/removal of layers is not handled by the control to give the user more options, as suggested by @elemoine.
This commit is contained in:
@@ -205,7 +205,8 @@
|
||||
* @typedef {Object} ol.control.SelectOptions
|
||||
* @property {string|undefined} className CSS class name. Default is 'ol-select'.
|
||||
* @property {Element|undefined} element Element.
|
||||
* @property {Array.<ol.layer.Layer>} layers Layers to select features on.
|
||||
* @property {undefined|function(ol.layer.Layer):boolean} layerFilter Filter
|
||||
* function to restrict selection to a subset of layers.
|
||||
* @property {ol.Map|undefined} map Map.
|
||||
* @property {Element|undefined} target Target.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user