[OpenLayers-Users] Distance Between Two Points

Pfirter Lukas lp at rpag.ch
Fri Apr 13 02:17:51 EDT 2007


Hello Brian,
 
I think you are looking for OpenLayers.Util.distVincenty(point1,point2),
that's what I'm fighting with at the moment.
See: http://openlayers.org/pipermail/users/2007-April/001292.html
And here: http://openlayers.org/pipermail/users/2007-April/001303.html
I'm currently working on this distance tool:
http://dev.webser125.lookass.ch/OpenLayers_Google_db/click_lines_distanc
e.php
 
Lucas


________________________________

	Von: users-bounces at openlayers.org
[mailto:users-bounces at openlayers.org] Im Auftrag von Brian Krebs
	Gesendet: Donnerstag, 12. April 2007 23:11
	An: users at openlayers.org
	Betreff: [OpenLayers-Users] Distance Between Two Points
	
	

	I'm geocoding an address and using the lat/lon to center my map
when it is first displayed.  The user can then click on the map to place
a marker which I'm capturing the lat/lon of.  The customer has a
requirement to not allow saving the lat/lon of the marker if it is more
than 1 mile away from the initial center lat/lon.  I noticed that in 2.4
RC1, there is a distanceTo function under Geometry.  I'm not ready to
move to that version yet so I'm using 2.3.  Is there some similar
functionality in this version or can someone give me a code example of
how to determine the distance?

	 

	Thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070413/12f99e62/attachment.html


More information about the Users mailing list