Re: [Google Maps API v3] Problems with google.maps.geometry.spherical.computeDistanceBetween

3,570 views
Skip to first unread message
Message has been deleted

Andrew Leach

unread,
Jul 20, 2011, 4:40:16 PM7/20/11
to google-map...@googlegroups.com
On 20 July 2011 20:45, MymsMan <bobb...@gmail.com> wrote:
> What could cause google.maps.geometry to be undefined?

How about not loading the library?
http://code.google.com/apis/maps/documentation/javascript/basics.html#Libraries

MymsMan

unread,
Jul 20, 2011, 5:29:14 PM7/20/11
to google-map...@googlegroups.com, andrew....@gmail.com
Many thanks - I knew it must be something very basic.

It was very confusing that it was working when called from another point in the code - some piece of code, perhaps reverse geocoding, must have been  loading the library under the covers since I certainly didn't!

BTW The reason for using DistanceBetween is that the 'equals' function of the LatLng object is too precise, for my purposes within 100m is the same place and for some applications within a few miles is close enough.  It would be nice if the the equals function took an optional 2nd parameter to indicate the acceptable accuracy for the comparison.  e.g. if (a.equals(b,100)) ...
Reply all
Reply to author
Forward
0 new messages