60
rated 0 times
[
64]
[
4]
/ answers: 1 / hits: 22050
/ 9 Years ago, wed, july 8, 2015, 12:00:00
I can't find a way to go from a feature in a selection event to a layer that it may be a part of without traversing all the features of all my map layers, or storing an artificial layer ID within every feature at creation. Is this just not possible yet?
ol.js 3.7.0
ol.interaction.Selection -> click -> callback( event ){ event.selected[0] }
In another part of my app, I would like to go from the feature to the layer to determine the style being used on the feature, specifically whether or not it's visible.
ol.Feature.getStyle() || ol.Feature -> (layer?) -> getStyle()
More From » maps