I'm working on an iPhone app that needs to display walking directions from a point, A, to another point, B, in a UIWebView that loads a Google Maps URL with the relevant parameters.
Example of the URL i am loading:
[self.myWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://maps.google.com/maps?saddr=55.720923,12.513428&daddr=55.745666,12.546387"]]];
I need the UIWebView to show the directions as a map (as lines on the map) as illustrated image in the link below:
How I want the directions to be displayed (directions as a map)
However, when this URL is loaded on the iPhone, the directions are instead displayed as a list (see the link below).
How the directions are displayed (directions as a list)
The user is required to press the map button in the top bar in order to see the directions as a map.
How can I set the Google Maps URL parameters such that the directions are displayed as a map directly (not as a list!) in my iPhone app?