Hey group,

Really keen to attempt to use these functions, will come in handy to a
new project, but I'm a little confused on how it can be pulled off.

In looking up the usage of:

GLatLng().distranceFrom()

GLatLng requires two arguments, latitude and longitude.  Having a
street address though, I am using the getLatLng function from the
GClientGeocoder class which rightly so, requires just the one argument
of the address.  distanceFrom appears to only require the one argument
of the point returned from a getLatLng call, which is good.

So, I presume there is a function which converts the "point" number
returned by getLatLng in to it's individual latitude and longitude, so
then I can use the returned values with GLatLng, but I don't see this
in the GClientGeocoder class - does one exist or have I gone about
this entirely the wrong way?

My code I've tried is (which doesn't seem to give me anything --
help! :-s):

var geocoder = new GClientGeocoder();
function getLength( from, to ) {
         geocoder.getLatLng(from,function(from_gl) {
                if (!from_gl) {
                        alert(from + " not found");
                    }
                    else {
                                alert(from_gl);
                    }
                }
                geocoder.getLatLng(to,function(to_gl) {
                if (!to_gl) {
                        alert(to + " not found");
                    }
                    else {
                                alert(to_gl);
                    }
                }

    }

Thanks,
Jesse.

--~--~---------~--~----~------------~-------~--~----~
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