[OpenLayers-Users] vector polygon styling with rules

Robert Buckley robertdbuckley at yahoo.com
Wed Apr 6 16:17:01 EDT 2011


Hi,

I´m having a bad time trying to set styles to vector features,

I have made this...



var style_solar = new OpenLayers.StyleMap({
                    "default": new 
OpenLayers.Style(OpenLayers.Util.applyDefaults({
                            fillOpacity: 0.6, 
                            fillColor: '#000000'
                        }, OpenLayers.Feature.Vector.style["default"])),
                    "select": new 
OpenLayers.Style(OpenLayers.Util.applyDefaults({
                            fillOpacity: 0.6, 
                            fillColor: '#FF0000'
                    }, OpenLayers.Feature.Vector.style["select"]))
                });


which works ok...but I really need to add rules according to the wfs property 
"solar_kopf"

How can I apply rules to the stylemap?

I have tried numerous times but they all fail.

Could anyone provide me with a couple of examples?

yours,

Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110406/8fd972e4/attachment.html


More information about the Users mailing list