<div dir="ltr">Beautiful!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 1, 2013 at 10:34 AM, Pierre Giraud <span dir="ltr"><<a href="mailto:pierre.giraud@camptocamp.com" target="_blank">pierre.giraud@camptocamp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I was looking for such a feature (ie. drawing arrows along line to<br>
show direction) and looked at the several examples proposed.<br>
I chose a different approach though. I tried to be less intrusive and<br>
do the job in the renderer instead of adding layers or features. My<br>
main goal was to avoid having features polutting an editing layer.<br>
<br>
Extending the renderers to display new elements seemed easy.<br>
<br>
Here's the result: <a href="http://bl.ocks.org/pgiraud/6131715" target="_blank">http://bl.ocks.org/pgiraud/6131715</a><br>
<br>
I didn't think about any side effects but would be happy to hear cases<br>
where it could fail.<br>
<br>
What do you think?<br>
<br>
Pierre<br>
<br>
On Tue, Jan 29, 2013 at 2:14 PM, Alexandre Dubé <<a href="mailto:adube@mapgears.com">adube@mapgears.com</a>> wrote:<br>
> Hi Hua Jie,<br>
><br>
>   What you did is really nice!  You could contribute this by making an<br>
> example out of it :<br>
><br>
>   * fork openlayers 'master' branch and clone<br>
>   * create new .html and .js in the 'examples' directory to create an<br>
> example out of it, using the same files the other examples do.<br>
>   * add/commit/push/pull request<br>
><br>
>   Even though the class you created wouldn't be part of the actual core, it<br>
> would still demonstrate how to assemble OpenLayers core components to<br>
> achieve this.<br>
><br>
> Regards,<br>
><br>
> Alexandre<br>
><br>
><br>
><br>
> On 13-01-28 10:46 PM, 杨华杰 wrote:<br>
><br>
> Hi All<br>
><br>
> Thanks for all the help.<br>
><br>
> I draft a version first. Not sure how to contribute to the lib.<br>
><br>
> Here is some screenshot.<br>
> <a href="http://www.javalinux.me/?p=681" target="_blank">http://www.javalinux.me/?p=681</a><br>
><br>
><br>
> Here is the demo page:<br>
> <a href="http://www.javalinux.me/openlayer/arrow/" target="_blank">http://www.javalinux.me/openlayer/arrow/</a><br>
><br>
><br>
> Regards,<br>
> Hua Jie<br>
><br>
><br>
> On Fri, Jan 25, 2013 at 6:25 PM, Arnd Wippermann <<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>><br>
> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> may be this examples can help:<br>
>><br>
>> approach like Imran described<br>
>><br>
>> <a href="http://gis.ibbeck.de/ginfo/apps/OLExamples/OL210/Line_Direction/direction_arrow.asp" target="_blank">http://gis.ibbeck.de/ginfo/apps/OLExamples/OL210/Line_Direction/direction_arrow.asp</a><br>
>><br>
>><br>
>> <a href="http://gis.ibbeck.de/ginfo/apps/OLExamples/OL212/Direction_Vectors/rotation_of_simple_direction_vectors.asp" target="_blank">http://gis.ibbeck.de/ginfo/apps/OLExamples/OL212/Direction_Vectors/rotation_of_simple_direction_vectors.asp</a><br>

>><br>
>><br>
>> Arnd<br>
>><br>
>> ________________________________<br>
>> Von: <a href="mailto:openlayers-users-bounces@lists.osgeo.org">openlayers-users-bounces@lists.osgeo.org</a><br>
>> [mailto:<a href="mailto:openlayers-users-bounces@lists.osgeo.org">openlayers-users-bounces@lists.osgeo.org</a>] Im Auftrag von ???<br>
>> Gesendet: Freitag, 25. Januar 2013 05:06<br>
>> An: Imran Rajjad<br>
>> Cc: <a href="mailto:openlayers-users@lists.osgeo.org">openlayers-users@lists.osgeo.org</a><br>
>> Betreff: Re: [OpenLayers-Users] How to draw a arrow with openlayer?<br>
>><br>
>> Hi Guys<br>
>><br>
>> I got some process.<br>
>><br>
>> But I have a problem to draw with the mouse, during the drawing, I can see<br>
>> the angle. But when I double click, the angle gone. Any tips will help.<br>
>><br>
>><br>
>> Regards,<br>
>> Hua Jie<br>
>><br>
>><br>
>> On Thu, Jan 24, 2013 at 10:01 AM, 杨华杰 <<a href="mailto:yhjhoo@gmail.com">yhjhoo@gmail.com</a>> wrote:<br>
>>><br>
>>> Hi Imran<br>
>>><br>
>>> Thanks for your reply. I believe a lot people have the same questions.<br>
>>> Why this feature is not released.<br>
>>><br>
>>><br>
>>> Regards,<br>
>>> Hua Jie<br>
>>><br>
>>><br>
>>> On Wed, Jan 23, 2013 at 10:28 PM, Imran Rajjad <<a href="mailto:rajjad@gmail.com">rajjad@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Hi,<br>
>>>><br>
>>>> you can make a feature whose geometry is a GeometryCollection, this<br>
>>>> collection can contain a line and a point grouped into one geometry then you<br>
>>>> can use the below mentioned style to draw an arrow with your line<br>
>>>><br>
>>>><br>
>>>> {<br>
>>>> strokeColor: "#00688B",<br>
>>>>     fillColor: "#00688B",<br>
>>>>     fillOpacity : 1.0,<br>
>>>>     strokeWidth: 2,<br>
>>>>     strokeOpacity : 0.9,<br>
>>>>     pointRadius: 6,<br>
>>>>     graphicName :"triangle",<br>
>>>>     rotation :angle<br>
>>>> }<br>
>>>><br>
>>>> remember to compute the angle before setting this .. you should be able<br>
>>>> to calculate angle between start and end point of your line segment.. and<br>
>>>> also the position of point geometry which will be drawn as triage with given<br>
>>>> rotation angle..<br>
>>>><br>
>>>> Hope I got my point through..<br>
>>>><br>
>>>> regards,<br>
>>>> Imran<br>
>>>><br>
>>>> On Wed, Jan 23, 2013 at 7:11 PM, 杨华杰 <<a href="mailto:yhjhoo@gmail.com">yhjhoo@gmail.com</a>> wrote:<br>
>>>>><br>
>>>>> Hi Alexandre<br>
>>>>><br>
>>>>> Thank you, I will try this.<br>
>>>>><br>
>>>>><br>
>>>>> Regards,<br>
>>>>> Hua Jie<br>
>>>>><br>
>>>>><br>
>>>>> On Wed, Jan 23, 2013 at 10:01 PM, Alexandre Dubé <<a href="mailto:adube@mapgears.com">adube@mapgears.com</a>><br>
>>>>> wrote:<br>
>>>>>><br>
>>>>>> Hi Hua Jie,<br>
>>>>>><br>
>>>>>> You could try to define your own arrow symbol.  There's one defined<br>
>>>>>> [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]<br>
>>>>>> <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><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> On 13-01-23 07:09 AM, 杨华杰 wrote:<br>
>>>>>><br>
>>>>>> Hi<br>
>>>>>><br>
>>>>>> As the title<br>
>>>>>><br>
>>>>>> I know how to draw a line, dot, polygon. But my customer need some<br>
>>>>>> directions on the map<br>
>>>>>><br>
>>>>>><br>
>>>>>> Regards,<br>
>>>>>> Hua Jie<br>
>>>>>><br>
>>>>>><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>
>>>>>><br>
>>>>>><br>
>>>>>> --<br>
>>>>>> Alexandre Dubé<br>
>>>>>> Mapgears<br>
>>>>>> <a href="http://www.mapgears.com" target="_blank">www.mapgears.com</a><br>
>>>>>><br>
>>>>>><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>
>>>>><br>
>>>>><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>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> I.R<br>
>>><br>
>>><br>
>><br>
><br>
><br>
><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>
><br>
><br>
> --<br>
> Alexandre Dubé<br>
> Mapgears<br>
> <a href="http://www.mapgears.com" target="_blank">www.mapgears.com</a><br>
><br>
><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>
<br>
<br>
<br>
--<br>
Pierre GIRAUD<br>
Géomaticien, Analyste<br>
<br>
Camptocamp France SAS<br>
Savoie Technolac, BP 352<br>
73377 Le Bourget du Lac, Cedex<br>
<br>
Tel : 00 33 4 79 44 44 93<br>
Mail : <a href="mailto:pierre.giraud@camptocamp.com">pierre.giraud@camptocamp.com</a><br>
<a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><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>
</blockquote></div><br></div>