tags:

views:

45

answers:

2

I have web application for mobile (developed in .net), I want to use iPhone maps application from web application( i.e. from web browser on button click)..how to do it? I want to do same in android to.

A: 

If you are trying to view a map from a web application (viewed in the mobile browser), simply link to Google maps as you normally would. Some mobile OS's will open their native maps application, and the others will receive Google's mobile-optimized maps website.

Edit:

As Robot K said, the http://maps.google.com URIs will be intercepted on iOS and open the native map application. If you want to force the same behavior on Android, you will have to do user agent detection and use the geo uri scheme documented here.

The user agent detection is to determine whether the link you attempt to load is the http scheme for iOS or the geo scheme for android.

codelark
I don't want to use web browser to do show map, I want maps application in iPhone to be launched on button click in my web application
Akki
on iPhone, it will open the maps application instead of the browser. Read my edit for information on Android.
codelark
Is it possible to use annotation when launching map from web application?
Akki
btw thanks for your help
Akki
Search for `custom labeled marker` at http://mapki.com/wiki/Google_Map_Parameters to see how to add a custom marker.
Robot K
Yes, you can add custom pins using a url to a KML file as the query parameter. info here: http://en.wikipedia.org/wiki/KML
codelark
Thanks guys, that was really helpful.
Akki
+1  A: 

I don't know about Android, but this page describes how to construct a URL that will open the iPhone's Maps application.

Robot K
http://maps.google.com/maps?q=Atlanta...will launch maps application?
Akki
Yes, at least on the iPhone.
Robot K