I ended up with this:

      GLatLng.prototype.distanceFrom = function(a) {
        var Scale = 1000;
        var dx = Math.pow(((this.lng()-a.lng())/360),2);
        var dy = Math.pow(((this.lat()-a.lat())/180),2);
        return (Math.sqrt(dx+dy) * Scale);
      }

Where "Scale" is the nominal size of your flat "World". E.g. with
Scale=1000, a circle with radius 500 metres (i.e. diameter 1000 metres)
will reach from longitude -180 to +180 and from latitude -90 to +90.

-- 
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to