Hi all,<br>In my OL app, I needed to create some OpenLayers.Style class to group complex layer styling.<br>I create some classes like OpenLayers.Style.Rain, OpenLayers.Style.Temperature to represent some<br>weather icons depending on some feature's attribute values.<br>
<br>But, I had an other problem, in the OpenLayers.StyleMap class passed to my weather layer.<br>I found this code in the initialize function:<br><br><span style="font-family: courier new,monospace;"></span><b style="font-family: courier new,monospace;">if(style instanceof OpenLayers.Style)</b><br>
<br>This code block my Rain or Temperature classes to go further.<br><br>So I changed the code in something like:<br><br><b style="font-family: courier new,monospace;">if(style instanceof OpenLayers.Style ||<br> (style.CLASS_NAME && style.CLASS_NAME.indexOf("OpenLayers.Style")!=-1))</b><br>
<br>Does it make sense to you?<br><br>Thanks<br><br> Milan Antonovic<br><br><br><font style="background-color: rgb(255, 255, 255); color: rgb(102, 102, 102);" size="1">Milan Antonovic<br>Institute of Earth Sciences<br>University of Applied Sciences of the South Switzerland - SUPSI<br>
Trevano, C.P. 72, CH-6952 Canobbio, SWITZERLAND<br>Tel: +41(0)58 666 62 13<br>E-mail: milan.antonovic@supsi.ch<br>Web: <a href="http://www.ist.supsi.ch">http://www.ist.supsi.ch</a></font><br>