[OpenLayers-Users] Animating a Polyline to Simulate Fluid Flow in a Pipeline

Bill Thoen bthoen at gisnet.com
Sat Aug 23 19:33:37 EDT 2008


A while ago I asked a question here about how I could simulate pipeline 
flow in a live, animated way. A couple of you responded and gave me some 
ideas to try. So to do my bit to contribute to the commonwealth, I've 
posted a working sampler of these ideas at 
http://206.168.217.244/oo-js/x2.html. This page demonstrates 3 different 
techniques showing movement along a polyline.

Also of note are 3 great circle functions in the Point.js code. They are 
geoDistanceTo(), geoBearingTo() and geoWaypoint(). The first calculates 
the great circle (shortest) distance between two points on  a sphere; 
the second calculates the great circle bearing between two points; and 
the third determines the lat/lon coordinate of a point along a great 
circle that is at a specified distance and bearing from a point.  The 
math behind these comes from Ed Williams' excellent Aviation Formulary 
site at http://williams.best.vwh.net/avform.htm.

To anyone who actually looks into my code I apologize for its 
amateurishness, but I've only recently started learning OpenLayers and 
object-oriented JavaScript. I would appreciate any comments that would 
improve it, or any new ideas for animating lines.

So Long, and Thanks for All the Fish,

- Bill Thoen



More information about the Users mailing list