Hi all,<br><br>i have to show a lot of icons inside my map and used clustering to realize this.So i started to load all my icons from the WFS with the other attributes that styling related.<br>For filtering i use a style map at the moment. So i do all the styling logic with rules. What i doesn't like on this way is, that the styling rules inside my code and that i have to use a fixed graphicHeight and graphicWidth.<br>
<br>Can i use something like the SLD bellow to do all the styling stuff that i like to do ? Have anyone an example which us ExternalGraphic ?<br><br> <Rule><br> <ogc:Filter><br> <ogc:PropertyIsEqualTo><br>
<ogc:PropertyName>category</ogc:PropertyName><br> <ogc:Literal>61</ogc:Literal><br> </ogc:PropertyIsEqualTo><br> </ogc:Filter><br>
<PointSymbolizer><br> <Graphic><br> <ExternalGraphic><br> <OnlineResource xlink:type="simple" xlink:href="./resources/img/traffic/iconSmall62.png"/><br>
<Format>image/png</Format><br> </ExternalGraphic><br> <Mark/><br> </Graphic><br> </PointSymbolizer><br> </Rule><br>
<br>Stylemap Example:<br><br> var infoStyle = new OpenLayers.Style(<br> // the first argument is a base symbolizer<br> // all other symbolizers in rules will extend this one<br> {<br> },<br>
{<br> rules: [<br> new OpenLayers.Rule({<br> filter: new OpenLayers.Filter.Comparison({<br> type: OpenLayers.Filter.Comparison.GREATER_THAN,<br> property: "count", // the "foo" feature attribute<br>
value: 1<br> }),<br> symbolizer: {<br> externalGraphic: "./resources/img/cluster.png",<br> label: "${count}",<br>
graphicWidth: 25, <br> graphicHeight: 25<br> }<br> }),<br> new OpenLayers.Rule({<br> filter: new OpenLayers.Filter.Comparison({<br>
type: OpenLayers.Filter.Comparison.EQUAL_TO,<br> property: "category", // the "foo" feature attribute<br> value: 62<br> }),<br>
symbolizer: {<br> externalGraphic: "./resources/img/traffic/iconSmall62.png",<br> graphicWidth: 25, <br> graphicHeight: 25<br>
}<br> }),<br>etc...<br>