<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">1. don't apply defaults on OpenLayers.Feature.Vector.style["select"] but on your parsed style object from the SLD.<div>2. try wfsLayer.features[0].style.fillColor (not sure if it will work but report back if it doesn't)</div><div><br></div><div>Best regards,</div><div>Bart</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><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 Nov 27, 2012, at 7:57 AM, Paul Meems <<a href="mailto:bontepaarden@gmail.com">bontepaarden@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I have two related questions.<br><br>I have a Vector layer with a few polygon features.<br><br>I assign some coloring to the polygons using a SLD file (using OpenLayers.Format.SLD().read())<br>This works fine.<br>When I select a feature I want to change the color of the outline but not the fill color.<br>

I'm using this piece to define the select style:<br>    styleMap: new OpenLayers.StyleMap({ <br>      "select": new OpenLayers.Style(OpenLayers.Util.applyDefaults({<br>        strokeColor: "gray",<br>

        graphicName: "square"<br>      }, OpenLayers.Feature.Vector.style["select"]))<br>    })<br clear="all"><br>The above code will fill my feature with blue, but I want to retain the original color.<br>

Q1: How do I do that?<br><br>I'm also showing the data of the features in a table. I want to give each row of the table a background color that corresponds with the feature.<br>I was looking for something like this:<br>

<pre style="">wfsLayer.features[0].FillColor</pre>but that is not working. <br>Q2: How can I get the fill color of a feature?<br><br>Thanks,<br>
<br>
Paul<br>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/openlayers-users<br></blockquote></div><br></div></body></html>