Hi Ken,

Also interested in this question I have found 2 functions at the mentioned
side http://williams.best.vwh.net/avform.htm to calculate the distance and
the waypoints between 2 points. (In the trac... Point.js I could not see a
way to calculate the waypoints)

I have for own purposes build a simple application to test the haversine
lines. It seems to be all right.
http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/orthodrome.html

There are two points, that could be moved around, and then you can calculate
the route.

Script:
http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/javascript/orthodro
me.js

The way I create the line features are a bit unusable (Write a WKT string
and then use the OpenLayers.Format parser to import the WKT string). There
are other ways to do this with OpenLayers.

To get a curve you have to approximate the haversine line with a couple of
lines. I have choosen 100 lines to get a smooth curve.

Arnd Wippermann


-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von Ken Martin
Gesendet: Dienstag, 30. September 2008 22:23
An: [EMAIL PROTECTED]
Betreff: [OpenLayers-Users] Can I draw a "great circle" Vector?

Newbie (and incredibly impressed) user. :)

I'm drawing lines based on example code I've grabbed from openlayers.org,
which is essentially using this...

var lineFeature = new OpenLayers.Feature.Vector(
                                        new
OpenLayers.Geometry.LineString(pointList),null,style_green);

It's working great, but I'd like the lines to be "great circle" or
"haversine" lines.

Possible?

I have seen the following, but not sure how to use it for this...
http://trac.openlayers.org/wiki/GreatCircleAlgorithms

Thanks! :)

Ken Martin

P.S. Sorry if you're seeing multiple copies of this... I think I goofed up
when emailing this previously.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to