[OpenLayers-Users] Draw a line knowing its length in meters e it's angle

mail.roliveira at gmail.com mail.roliveira at gmail.com
Fri May 31 11:02:06 PDT 2013


Thanks, I will have a look.




The move(x, y) method of OpenLayers.Geometry.Point may be helpful. But I don't understand the x, y arguments... What are the units of those values?


this could help if I move a clone of pointA.


Sent from Alto - altomail.com


From: wallyatkins at gmail.com<wallyatkins at gmail.com>
To: mail.roliveira at gmail.com<mail.roliveira at gmail.com>
cc: openlayers-users at lists.osgeo.org<openlayers-users at lists.osgeo.org>
Sent: Friday, May 31, 2013
Subject: Re: [OpenLayers-Users] Draw a line knowing its length in meters e it's angle

Maybe look into the JSTS?


https://github.com/bjornharrtell/jsts

On Friday, May 31, 2013, mail.roliveira at gmail.com  wrote:

How do I draw a line, starting from a known point, and knowing only it's length in meters and it's angle?



Suppose I have a point at:


PointA:

lat: -22.29417905166, lon: 19.022827148438
(EPSG:4326)


Now I want to draw a line 500 meters long with an angle of 15 degrees (0 degrees is an horizontal line).



OpenLayers.Geometry.LineString allows to draw only a point from two points...


Any ideas?



Sent from Alto - altomail.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130531/ed6fa843/attachment.html>


More information about the Users mailing list