[OpenLayers-Users] Different renderIntents when features have
different styles?
Jeff Dege
jeff.dege at korterra.com
Wed Apr 27 12:37:09 EDT 2011
I have a map with a vector layer.
On that layer I am drawing a number of features.
I want those features to have different appearances, so I am setting the style attribute on each.
I have a SelectControl, with which I am selecting features on the map. I want the selected features to have a different appearance than the unselected features. But I'm having problems with this.
Inside Vector.drawFeature(), regardless of what renderIntent I have set on the feature, or what my layer's styleMap may have, if the feature has a style assigned, it looks like it's that style that is used to render the feature, no matter what.
I can set a StyleMap on the vector layer, so I can have selected features drawn differently than unselected features, but this is ignored if I set a style on the feature, itself.
Any ideas on how I can get different features to draw on the same layer, with different appearances, and still have their appearances change when the user selects one?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110427/431ffda7/attachment.html
More information about the Users
mailing list