I use the google maps API to trace the route between two points, my code is this :
NSString *urlString = [NSString stringWithFormat:@"https://maps.google.com/maps?saddr=%f,%f&daddr=%f,%f&hl=fr&output=embed&om=5",latUtilisateur,longUtilisateur,latStation,longStation];
//Create a URL object.
NSURL *url = [NSURL URLWithString:urlString];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//Load the request in the UIWebView.
[webView loadRequest:requestObj];
However, this didn't has the textual instructions feature. Am i missing some parameters in the request above or someth开发者_开发问答ing else?
The output=embed parameter is resulting in the full screen map. You can try a couple of alternatives:
For the standard map/directions page.
http://maps.google.com/maps?saddr=Sydney&daddr=Brisbane&hl=fr&output=html&om=5
For a mobile friendly directions page. This version includes links to static maps for each step of the journey.
http://maps.google.com/maps?saddr=Sydney&daddr=Brisbane&hl=fr&output=mobile&om=5
精彩评论