[OpenLayers-Users] GIS newbie question: drawing lines projected as arcs on the earth

Phil Scadden p.scadden at gns.cri.nz
Mon Jul 22 16:25:31 PDT 2013


> If I have a base map of the earth, and want to draw a vector of a flight path
> for example from LA to NYC, does OpenLayers have a way to draw this path as
> a 'curved' path to match the arc shape of the path vs a straight linestring
> path ? Or would I need to calculate this myself client side and hand build a
> linestring with a bunch of interpolated points ?
A great-circle path is not a simple vector, so as far as I know, you 
will have to calculate the curve yourself. I am not aware of any inbuilt 
tools within OL that will do it for you (and if it did, the calculation 
is client-side).
Try here for some js code on doing it.
http://trac.osgeo.org/openlayers/wiki/GreatCircleAlgorithms

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.



More information about the Users mailing list