Hi

I am using GDirections object to get the directions. The following
code is in the html(javascript) file and is used to initialize
CGirections object and call load on the object.

function initialize() {
        if (GBrowserIsCompatible()) {
                gdir = new GDirections(null, null);
                geocoder = new GClientGeocoder();

                GEvent.addListener(gdir, "load", onGDirectionsLoad);
                GEvent.addListener(gdir, "error", handleErrors);
        }
}

function loadDirections(from, to, options) {
        gdir.load("from: " + from + " to: " + to, options);
}

In Objective-C, the html file is loaded into a UIWebView and called in
the following way
[<uiwebview> stringByEvaluatingJavaScriptFromString:[NSString
stringWithFormat:@"loadDirections('%@', '%@', %@)", startPoint,
endPoint, [options JSONRepresentation]]];

Thanks
Chen

On Jul 7, 10:15 am, Andrew Leach <[email protected]> wrote:
> On 7 July 2010 14:56, Chen Song <[email protected]> wrote:
>
>
>
> > I will investigate V3 API. I would like to confirm that the
> > discrepancies are actually caused by the key in v2, correct?
>
> Almost certainly not. You haven't actually said how you are getting
> the JSON response; but if you are not using an approved method, then
> the variation could be part of a protection mechanism; or could be
> introduced by other changes within the API (as it's not documented, it
> doesn't have to remain the same). If you are using a documented
> method, please supply details. Documented methods should not be
> inconsistent.

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