<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Do you mean that you want the selection to show up in something else than the default colour (i.e. red)?<div><br></div><div>See:</div><div><br></div><div><a href="http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Control/SLDSelect-js.html#OpenLayers.Control.SLDSelect.selectionSymbolizer">http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Control/SLDSelect-js.html#OpenLayers.Control.SLDSelect.selectionSymbolizer</a></div><div><br></div><div>e.g.:</div><div><br></div><div><div>    selectionSymbolizer: {</div><div>        'Polygon': {fillColor: '#FF0000', stroke: false},</div><div>        'Line': {strokeColor: '#FF0000', strokeWidth: 2},</div><div>        'Point': {graphicName: 'square', fillColor: '#FF0000', pointRadius: 5}</div><div>    }</div></div><div><br></div><div>Best regards,</div><div>Bart</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div>-- <br>Bart van den Eijnden<br>OpenGeo - <a href="http://opengeo.org/">http://opengeo.org</a><br>Expert service straight from the developers.</div><div><br></div></span><br class="Apple-interchange-newline">

</div>
<br><div><div>On May 5, 2013, at 6:52 PM, Shadin <<a href="mailto:shadin__a@hotmail.com">shadin__a@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I'm trying to follow this example:<br><a href="http://openlayers.org/dev/examples/SLDSelect.html">http://openlayers.org/dev/examples/SLDSelect.html</a><br><br>When I click on the point, its color should be changed, here is a piece of<br>my code: <br><br>control =  new OpenLayers.Control.SLDSelect( <br>                    OpenLayers.Handler.Click, <br>                    { <br>                        //displayClass: 'olControlClick', <br>                        layers: [city] <br>                    } <br>                ) <br><br>                map.addControl(control); <br>                 control.activate(); <br><br><br>Still can't figure out what's the point of displayClass. and how to assign<br>the new color. <br><br><br><br>--<br>View this message in context: http://osgeo-org.1560.x6.nabble.com/SLD-based-selection-on-WMS-layers-How-to-set-the-new-style-of-clicked-point-tp5051426.html<br>Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>_______________________________________________<br>Users mailing list<br>Users@lists.osgeo.org<br>http://lists.osgeo.org/mailman/listinfo/openlayers-users<br></blockquote></div><br></div></body></html>