<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18854"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT size=2 face=Arial>Looking at various examples of 
how to use styles in OpenLayers, we have built the following:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>var Layer_AddressWebService_1 = new 
OpenLayers.Layer.Vector(<BR>&nbsp;&nbsp;&nbsp; 
"AddressWebService_1",<BR>&nbsp;&nbsp;&nbsp; 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; styleMap: new 
OpenLayers.StyleMap(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
"default": new 
OpenLayers.Style(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
rules: 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
[<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
new 
OpenLayers.Rule(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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nbsp;&nbsp;&nbsp;&nbsp; 
strokeColor: 
'#0000FF'<BR>&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;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
})<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
})<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; })<BR>&nbsp;&nbsp;&nbsp; }, 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; displayInLayerSwitcher: 
false,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isBaseLayer: 
false<BR>&nbsp;&nbsp;&nbsp; }<BR>);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>We think this should resemble and hopefully be 
functionally identical to:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>var awsSymbolizer = {<BR>&nbsp;&nbsp;&nbsp; 
"Point": {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pointRadius: 
4,<BR><SPAN class=437253614-21122009>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>&nbsp;&nbsp;graphicName: "square",<BR><SPAN 
class=437253614-21122009>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>&nbsp;&nbsp;fillColor: "blue",<BR><SPAN 
class=437253614-21122009>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&nbsp;&nbsp;fillOpacity: 
1,<BR><SPAN class=437253614-21122009>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>&nbsp;&nbsp;strokeWidth: 1,<BR><SPAN 
class=437253614-21122009>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>&nbsp;&nbsp;strokeOpacity: 1,<BR><SPAN 
class=437253614-21122009>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>&nbsp;&nbsp;strokeColor: "#0000FF"<BR><SPAN 
class=437253614-21122009>&nbsp;&nbsp;&nbsp; </SPAN>&nbsp;}<BR>};</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>var awsStyle = new 
OpenLayers.Style();<BR>awsStyle.addRules([new OpenLayers.Rule({symbolizer: 
awsSymbolizer})]);<BR>var awsStyleMap = new OpenLayers.StyleMap({"default": 
awsStyle});&nbsp;<BR><SPAN class=437253614-21122009>var 
Layer_AddressWebService_1</SPAN>&nbsp;= new 
OpenLayers.Layer.Vector("AddressWebService_1",</FONT></DIV>
<DIV><FONT size=2 face=Arial>{</FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN 
class=437253614-21122009>&nbsp;&nbsp;&nbsp; </SPAN>styleMap: 
awsStyleMap</FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2>}, {</FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN 
class=437253614-21122009>&nbsp;&nbsp;&nbsp; </SPAN>displayInLayerSwitcher: 
false<SPAN class=437253614-21122009>, </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN 
class=437253614-21122009>&nbsp;&nbsp;&nbsp; isBaseLayer: 
false</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN 
class=437253614-21122009></SPAN>});<BR></DIV></FONT></FONT>
<DIV><FONT face=Arial><FONT size=2>But it is not. When using the latter, points 
are visualised fine, but using the first part, results in nothing.<SPAN 
class=731053515-21122009>&nbsp;The problem lies around the rules. </SPAN><SPAN 
class=437253614-21122009>Can anyone tell me what the major difference 
is?</SPAN></FONT></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>Regards Casper</FONT></DIV></BODY></HTML>