Hi Shadin,<br><br>Interesting timing - I just finally got on this list, and this is the first message I received, and I just was working on just that in my project.....<br><br>Here&#39;s what I&#39;ve done:<br><br>In my PHP code I&#39;m creating a KML file that I&#39;ll be loading, and I do the following:<br>
<br>                                ## Divide the bearing by 22 to get a value from 0-15 for icons<br>                                $p-&gt;setStyleUrl(&#39;#track-&#39; . round($this-&gt;bearing[$c] / 22)); <br><br>This sets the style in my KML to reference &quot;track-4.png&quot; (or any other number from 0-15)<br>
<br>In my style declarations in the KML I have:<br><br>&lt;Style id=&quot;track-0&quot;&gt;<br>&lt;IconStyle&gt;<br>&lt;hotSpot x=&quot;19&quot; y=&quot;0&quot; xunits=&quot;pixels&quot; yunits=&quot;pixels&quot; /&gt;<br>
&lt;color&gt;8800aa00&lt;/color&gt;<br>&lt;colorMode&gt;normal&lt;/colorMode&gt;<br>&lt;scale&gt;1&lt;/scale&gt;<br>&lt;Icon&gt;<br>&lt;href&gt;img/KMLIcons/track-0.png&lt;/href&gt;<br>&lt;/Icon&gt;<br>&lt;/IconStyle&gt;<br>
&lt;/Style&gt;<br>&lt;Style id=&quot;track-1&quot;&gt;<br>&lt;IconStyle&gt;<br>&lt;hotSpot x=&quot;19&quot; y=&quot;0&quot; xunits=&quot;pixels&quot; yunits=&quot;pixels&quot; /&gt;<br>&lt;color&gt;8800aa00&lt;/color&gt;<br>
&lt;colorMode&gt;normal&lt;/colorMode&gt;<br>&lt;scale&gt;1&lt;/scale&gt;<br>&lt;Icon&gt;<br>&lt;href&gt;img/KMLIcons/track-1.png&lt;/href&gt;<br>&lt;/Icon&gt;<br>&lt;/IconStyle&gt;<br>&lt;/Style&gt;<br><br>Also there is &quot;track-none.png&quot; for a non-directional marker.<br>
<br>I just remembered that the hotspot is wrong there - change it so x and y are 0.5, and use &quot;fraction&quot; for the units to have it align over the centre of the location.<br><br>If you want the icons, there&#39;s a zip file with them at <a href="http://vint.ca/dumps/directionalKMLIcons.zip">http://vint.ca/dumps/directionalKMLIcons.zip</a><br>
<br>Cheers<br><br>Paul<br><br><br><div class="gmail_quote">On Wed, Jan 25, 2012 at 2:13 AM, Marc Jansen <span dir="ltr">&lt;<a href="mailto:jansen@terrestris.de" target="_blank">jansen@terrestris.de</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>

  
    
    
  
  <div bgcolor="#ffffff" text="#000000">
    Hi Shadin,<br>
    <br>
    Have a look at
    <a href="http://openlayers-buch.de/beispiele/chapter-10/layer-lineDirection.html" target="_blank">http://openlayers-buch.de/beispiele/chapter-10/layer-lineDirection.html</a>
    (which is working on an older version of OpenLayers), which might be
    of help. This is the source code:
<a href="http://openlayers-buch.de/beispiele/chapter-10/OpenLayers.Layer.LineDirections.js" target="_blank">http://openlayers-buch.de/beispiele/chapter-10/OpenLayers.Layer.LineDirections.js</a>.<br>
    <br>
    Best regards,<br>
    Marc<br>
    <br>
    <br>
    On 21.01.2012 15:41, Shadin wrote:
    <blockquote type="cite"><b>
        I am wondering about how to replace my features with arrows
        depending on its direction in the DB. the direction shown as
        numbers from 0 - 360
        I have found this but still not sure
        has anyone ever tried something similar ?
      </b>
      <a href="http://blog.geoserver.org/2009/04/02/follow-the-arrows/" target="_blank">http://blog.geoserver.org/2009/04/02/follow-the-arrows/</a> <br>
      <hr align="left" width="300">
      View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Follow-the-arrows-tp7211128p7211128.html" target="_blank">Follow
        the arrows</a><br>
      Sent from the <a href="http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Users-f1822463.html" target="_blank">OpenLayers
        Users mailing list archive</a> at Nabble.com.<br>
      <pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br>