Hi,<div><br></div><div>you can make a feature whose geometry is a GeometryCollection, this collection can contain a line and a point grouped into one geometry then you can use the below mentioned style to draw an arrow with your line</div>
<div><br></div><div><br></div><div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>strokeColor: "#00688B",</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>fillColor: "#00688B",</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span>fillOpacity : 1.0,</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>strokeWidth: 2,</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>strokeOpacity : 0.9,</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span>pointRadius: 6,</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>graphicName :"triangle",</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>rotation :angle</div>
<div>}</div><div><br></div><div>remember to compute the angle before setting this .. you should be able to calculate angle between start and end point of your line segment.. and also the position of point geometry which will be drawn as triage with given rotation angle..</div>
<div><br></div><div>Hope I got my point through..</div><div><br></div><div>regards,</div><div>Imran</div><br><div class="gmail_quote">On Wed, Jan 23, 2013 at 7:11 PM, Ñ½Ü <span dir="ltr"><<a href="mailto:yhjhoo@gmail.com" target="_blank">yhjhoo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi <span style="font-family:arial,sans-serif;font-size:13px">Alexandre</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Thank you, I will try this.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Regards,</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">Hua Jie</span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 23, 2013 at 10:01 PM, Alexandre Dub¨¦ <span dir="ltr"><<a href="mailto:adube@mapgears.com" target="_blank">adube@mapgears.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi Hua Jie,<br>
<br>
You could try to define your own arrow symbol. There's one
defined [here], see line 1 :<br>
OpenLayers.Renderer.symbol.arrow = [0,2, 1,0, 2,2, 1,0, 0,2]<br>
<br>
I haven't tried it, but it could do the trick.<br>
<br>
HTH,<br>
<br>
Alexandre<br>
<br>
[here]
<a href="http://code.google.com/p/rep-olnet/source/browse/trunk/Direction.js?r=61" target="_blank">http://code.google.com/p/rep-olnet/source/browse/trunk/Direction.js?r=61</a><div><div><br>
<br>
<br>
On 13-01-23 07:09 AM, Ñ½Ü wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div>
<div dir="ltr">Hi
<div><br>
</div>
<div>As the title<br>
<div><br>
</div>
<div>I know how to draw a line, dot, polygon. But my
customer need some directions on the map</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Regards,</div>
<div>Hua Jie</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
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><span><font color="#888888">
</font></span></pre><span><font color="#888888">
</font></span></blockquote><span><font color="#888888">
<br>
<br>
<pre cols="72">--
Alexandre Dub¨¦
Mapgears
<a href="http://www.mapgears.com" target="_blank">www.mapgears.com</a>
</pre>
</font></span></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></div>
</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">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><br clear="all"><div><br></div>-- <br>I.R
</div>