<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px">
<DIV>Thanks Eric</DIV>
<DIV>&nbsp;</DIV>
<DIV>It turned out I had an error in the URL specifying the graphic icon. Fixing that solved the problem.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Kind regards,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert Sanson<BR><BR>&gt;&gt;&gt; "Eric Lemoine" &lt;eric.c2c@gmail.com&gt; 16/09/2008 6:00 p.m. &gt;&gt;&gt;<BR>Hi.<BR><BR>I am not sure about what's causing you trouble. But, have you tried this:<BR><BR>new OpenLayers.Style(OpenLayers.Util.applyDefaults(your_style_object,<BR>OpenLayers.Feature.Vector.style["default"]));<BR><BR>In this way you make sure you have all the required properties.<BR><BR>Eric<BR><BR>2008/9/15, Robert Sanson &lt;SansonR@asurequality.com&gt;:<BR>&gt; Here is how I specify a styleMap:<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var style_gate = new OpenLayers.StyleMap({"default": new<BR>&gt; OpenLayers.Style({<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "graphicOpacity":1,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "externalGraphic":"markers/main_gate_16.gif",<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "graphicXOffset":-8,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "graphicYOffset":-8,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "graphicWidth":16,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "graphicHeight":16,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "id":"main_gate",<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "strokeLinecap":"round",<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "strokeOpacity":1,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "fillOpacity":1,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "pointRadius":8})<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });<BR>&gt;<BR>&gt; I then reference this in my WFS layer definition:<BR>&gt;<BR>&gt; var maingatewfs = new OpenLayers.Layer.WFS("Main Gate",<BR>&gt;<BR>&gt; "http://10.65.192.1/cgi-bin/agbwfs.exe?farmid="+farmid+"&amp;request=getfeature&amp;typename=main_gates&amp;service=wfs&amp;version=1.0.0&amp;BBOX="+x1+","+y1+","+x2+","+y2+"&amp;maxfeatures=10<BR>&gt; (<BR>&gt; 'http://10.65.192.1/cgi-bin/agbwfs.exe?farmid="+farmid+"&amp;amp;request=getfeature&amp;amp;typename=main_gates&amp;amp;service=wfs&amp;amp;version=1.0.0&amp;amp;BBOX="+x1+","+y1+","+x2+","+y2+"&amp;amp;maxfeatures=10'<BR>&gt; )",<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {styleMap: style_gate, extractAttributes: true}<BR>&gt; );<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayer(maingatewfs);<BR>&gt;<BR>&gt; However, I am still getting the standard translucent orange point symbol.<BR>&gt;<BR>&gt; Can anyone point out what is wrong?<BR>&gt;<BR>&gt; Many thanks,<BR>&gt;<BR>&gt; Robert Sanson<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;&gt;&gt;&gt; "Robert Sanson" &lt;SansonR@asurequality.com&gt; 15/09/2008 4:47 p.m. &gt;&gt;&gt;<BR>&gt; I have a map with three WFS point lfeature ayers. I want to use different<BR>&gt; markers for each WFS layer. How do I specify the icons to use?<BR>&gt;<BR>&gt; Many thanks,<BR>&gt;<BR>&gt; Robert Sanson<BR>&gt; ------------------------------------------------------------------<BR>&gt; The contents of this email are confidential to AsureQuality. If you have<BR>&gt; received this communication in error please notify the sender immediately<BR>&gt; and delete the message and any attachments. The opinions expressed in this<BR>&gt; email are not necessarily those of AsureQuality. This message has been<BR>&gt; scanned for known viruses before delivery. AsureQuality supports the<BR>&gt; Unsolicited Electronic Messages Act 2007. If you do not wish to receive<BR>&gt; similar communications in future, please notify the sender of this message.<BR>&gt; ------------------------------------------------------------------<BR>&gt;<BR>&gt;<BR>&gt; This message has been scanned for malware by SurfControl plc.<BR>&gt; www.surfcontrol.com<BR>&gt;<BR>_______________________________________________<BR>Users mailing list<BR>Users@openlayers.org<BR><A href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR><BR><BR><BR><BR></DIV><br><br><table bgcolor=white style="color:black"><tr><td><br>------------------------------------------------------------------<br>
The&nbsp;contents&nbsp;of&nbsp;this&nbsp;email&nbsp;are&nbsp;confidential&nbsp;to&nbsp;AsureQuality.&nbsp;If&nbsp;you&nbsp;have&nbsp;received&nbsp;this&nbsp;communication&nbsp;in&nbsp;error&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;immediately&nbsp;and&nbsp;delete&nbsp;the&nbsp;message&nbsp;and&nbsp;any&nbsp;attachments.&nbsp;The&nbsp;opinions&nbsp;expressed&nbsp;in&nbsp;this&nbsp;email&nbsp;are&nbsp;not&nbsp;necessarily&nbsp;those&nbsp;of&nbsp;AsureQuality.&nbsp;This&nbsp;message&nbsp;has&nbsp;been&nbsp;scanned&nbsp;for&nbsp;known&nbsp;viruses&nbsp;before&nbsp;delivery.&nbsp;AsureQuality&nbsp;supports&nbsp;the&nbsp;Unsolicited&nbsp;Electronic&nbsp;Messages&nbsp;Act&nbsp;2007.&nbsp;If&nbsp;you&nbsp;do&nbsp;not&nbsp;wish&nbsp;to&nbsp;receive&nbsp;similar&nbsp;communications&nbsp;in&nbsp;future,&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;of&nbsp;this&nbsp;message.<br>
------------------------------------------------------------------</td></tr></table></BODY></HTML>