Search code examples
iphoneobjective-ciosuiwebviewgoogle-maps-mobile

How to zoom at particular point in google maps added to uiwebview?


I have google maps added to UIWebview. I want to zoom the map to destination location. Destination location is passed programmatically.

How do I do it? I tried setting parameter z=10 while loading google maps url but it doesn't zoom at particular point.

Please help

Thanks


Solution

  • I solved it with by adding certain parameters to the google maps url:

    http://maps.google.com/?saddr=%@&daddr=%1.6f,%1.6f&ll=%@&sll=%@&sspn=0.015&output=embed&z=15