Open the iPhone map application via link to Google maps with KML as query

Your question interested me so I did a little looking around at the Apple URL Scheme Reference. It says the following:

Although the Maps application supports many of the Google Maps parameters and queries, it does not support them all. The rules for creating a valid map link are as follows:

The domain must be google.com and the subdomain must be maps or ditu.

The path must be /, /maps, /local, or /m if the query contains site as the key and local as the value.

The path cannot be /maps/*.

All parameters must be supported. See Table 1 for list of supported parameters.

A parameter cannot be q=* if the value is a URL (so KML is not picked up).

The parameters cannot include view=text or dirflg=r.

If I'm reading that right, it doesn't look like what you're wanting is supported, however, it's interesting that you can type the full kml URL into the maps app directly and have it work. That seems like a bug on Apple's part. I would just start throwing parameters at it and see what happens. That's always fun. ;-)

Best Regards,

p.s. That is a nice sticker. I'd prefer a bounty, but looks like you haven't racked up enough SO points to offer that yet. ;-)


This link will do what you want

<a href="maps:q=http://example.com/mapdata.kml">

but it will only work on iOS so make sure you check the user agent etc and use a normal maps url on non-iOS

<a href="http://maps.google.com?q=http://example.com/mapdata.kml">