[OpenLayers-Users] Feature "style" and layer "styleMap"

gbrun gbrun at myopera.com
Tue Aug 30 04:23:00 EDT 2011


Hi everybody!

I've got a question about styles capabilities. I have a layer on which  
users can draw features. At this layers, I assigned a "styleMap" property.

When a user has finished drawing a polygon on this layer for example, he  
can select this one and change its color. For this, I use the "style"  
property of the drawn feature. It works fine, but then, the "styleMap"  
property of the layer doesn't apply at this feature anymore. This is a  
problem, because the "styleMap" property defines a "select" style: this  
one doesn't concern the feature which had its color changed anymore. So  
the user can't see if he selected the feature or not! It seems that, if  
there is a style applied to a feature, the styleMap isn't taken into  
account for this feature anymore.

Does anyone know if there are some conflict between feature "style" and  
layer "styleMap"?

Geoffrey


More information about the Users mailing list