In OL2 I was able to specify a "select" style in the style definition. In OL3 this doesn't seem to exist. If I understand it correctly, I can set a style for the select interaction. However, this likely won't work in my case since every layer has a unique "selected" style. Am I mistaken in my assessment of the capability? Is there another/optimal way to do this in OL3?
标签:
openlayers-3
相关问题
- No such property: geometry when updating feature i
- How to make Stroke opacity work in OpenLayers 3
- Get all features from the Openlayers 3 viewport
- How to disable DragPan in OpenLayers 3?
- Creating Heatmap in OpenLayers with Vector Source
相关文章
- getFeatures() is empty
- Updating to OpenLayers 3 [closed]
- Display WFS layer in ol3
- Openlayers 3: add text label to feature
- Javascript editing WFS from GeoServer using OpenLa
- Performance test OpenLayers vs Leaflet
- OpenLayers. How to refresh cluster?
- How to get coordinates on double click on Openstre
Let's assume that you have a style parameter stored in each
ol.Feature
, you can add aol.style.StyleFunction
to yourol.interaction.Select
and return a style based on this parameter. Like so:And your feature would be like: