tombatossals/angular-openlayers-directive

Filter Features in Clusters

Opened this issue · 2 comments

I am showing a Cluster Layer and I would like to filter the features shown in the Layer by a property name. How could I integrate that filter?
Thanks in advance

Hi @evisms, I don't think this is possible right now, like to filter features within a layer. Could you paste a code example how you register your layer with this directive?

One possibility could be to access the native ol3 api directly and manipulate the layer's features there, once it is attached to the ol3 map via this directive.

olData.getMap().then(function(map) {
    // map is the native ol3 map object, so
    // all those APIs can be used

    var layers = map.getLayers();
    // iterate over "layers" and pick out the layer of interest
});