Q:

Opening native maps app in iOS5

Hi I recently had to use cordova to open the native maps installed on the device.So far this is what I have done:
function getMapsUrl() {
   var isAndroid = navigator.userAgent.match(/Android/);
   var isIos = navigator.userAgent.match(/(iPhone|iPod|iPad)/);

   if (isAndroid) {
        return "geo:0,0?q=";
   }

   if (isIos) {
       return "maps:q=";
   }

   return "http://maps.google.com/maps?q=";
}

This function gets evaluated when the application is first opened , and a variable with the string get's set witch is used globally by the entire app to create links that look something like this depending on the device:
 <a href="maps:q=Linie 27, 5405 AR UDEN, Nederland">iOS Version</a>
 <a href="geo:0,0?q=Linie 27, 5405 AR UDEN, Nederland">Android Version</a>

This works on most devices except iOS5.From what I understand this happends because apple maps was introduced in iOS6 and iOS5 still uses google maps.
I have tryed all of this to open the native map app on iOS5 but I had no luck:
  <a href="http://maps.google.com/maps?q=Linie 27, 5405 AR UDEN, Nederland">Android Version Q</a>
  br/>
  <a href="http://maps.apple.com/maps?q=Linie 27, 5405 AR UDEN, Nederland">iOS Version Q</a>               
  <br/>
  <a href="http://maps.google.com/maps?saddr=Linie 27, 5405 AR UDEN, Nederland">Android Version saddr</a>
  <br/>
  <a href="http://maps.apple.com/maps?saddr=Linie 27, 5405 AR UDEN, Nederland">iOS Version saddr</a>
  <br/>
   <a href="maps:q=Linie 27, 5405 AR UDEN, Nederland">iOS curent Version</a>
   <br/>
   <a href="maps://maps.apple.com/?q=Linie 27, 5405 AR UDEN, Nederland">IOS with google maps</a>
    <br/>
    <a href="maps:q=Linie 27, 5405 AR UDEN, Nederland">iOS curent Version</a>
    <br/>
    <a href="comgooglemaps://?q=Linie 27, 5405 AR UDEN, Nederland">From Google Docs for iOS app</a>
    <div data-bind="click: WindowOpenClick ">Window.Open</div>
    <div data-bind="click: WindowLocationClick">Window.location</div>
    <div data-bind="click: WindowOpenClickBlackPage">Window.Open Blank</div>

function WindowOpenClick() {
        var mapsUrl = "http://maps.google.com/maps?q=Linie 27, 5405 AR UDEN, Nederland";
        window.open(mapsUrl, '_system', 'location=yes');
    }

    function WindowOpenClickBlackPage() {
        var mapsUrl = "http://maps.google.com/maps?q=Linie 27, 5405 AR UDEN, Nederland";
        window.open(mapsUrl, '_blank', 'location=yes');
    }

    function WindowLocationClick() {
        var mapsUrl = "http://maps.google.com/maps?q=Linie 27, 5405 AR UDEN, Nederland";
        window.location.href = mapsUrl;
    }

I added everything that I have above but they are in separate files in my app.
Does anyone know of a way to open the maps app in iOS5?

A:

Use the URL schemes comgooglemaps://?q=Linie 27, 5405 AR UDEN, Nederlandas mentioned by Google Maps iOS.Check this link 

