[OpenLayers-Users] CQL filter and StyleMap

gabriel gpetricek at gmail.com
Mon Mar 12 12:14:24 EDT 2012


Hi guys, 

i have problem with styles. When i use OpenLayers.Format.CQL(), i want to
set diferent colour for selected/founded features. 
For example: 

my styleMap property in OpenLayers.Layer.Vector object is defined like

styleMap: new OpenLayers.StyleMap({
                        "default": new OpenLayers.Style(
                                   {"fillColor": "#FCD116",
                                    "stroke":false})})

This styleMap is working for me, and i tried this one with success too. 

styleMap: new OpenLayers.StyleMap({
                        "default": new OpenLayers.Style(
                                   null, {rules:[rule]})})

But i want to combine them. When i select or find feature from cql filter ,
i want to add it another colour.

rule definition 

rule = new OpenLayers.Rule(
                        {
                          symbolizer:
                          {
                             "fillColor": "#000000",
                              "stroke": false
                          }
                        });
Pls help me . 



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/CQL-filter-and-StyleMap-tp4570643p4570643.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list