openlayers: Add filter function for layers in SelectOptions

This commit is contained in:
Johannes Drönner
2016-06-21 11:23:20 +02:00
parent 830e4aaac8
commit 984f83346a
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -546,3 +546,7 @@ var modify: ol.interaction.Modify = new ol.interaction.Modify({
var draw: ol.interaction.Draw = new ol.interaction.Draw({
type: "Point"
})
const select: ol.interaction.Select = new ol.interaction.Select({
layers: (layer: ol.layer.Layer) => true;
});
+2 -2
View File
@@ -552,12 +552,12 @@ declare namespace olx {
interface SelectOptions {
addCondition?: ol.events.ConditionType;
condition?: ol.events.ConditionType;
layers?: Array<ol.layer.Layer>;
layers?: Array<ol.layer.Layer> | ((layer: ol.layer.Layer) => boolean);
style?: ol.style.Style | Array<ol.style.Style> | ol.style.StyleFunction;
removeCondition?: ol.events.ConditionType;
toggleCondition?: ol.events.ConditionType;
multi?: boolean;
features?: ol.Collection<ol.Feature>
features?: ol.Collection<ol.Feature>;
filter?: ol.interaction.SelectFilterFunction;
wrapX?: boolean;
}