title: Opening native maps app in iOS5
body: <p>Hi I recently had to use cordova to open the native maps installed on the device.So far this is what I have done:</p>
  
  <pre><code>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=";
  }
  </code></pre>
  
  <p>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:</p>
  
  <pre><code> &lt;a href="maps:q=Linie 27, 5405 AR UDEN, Nederland"&gt;iOS Version&lt;/a&gt;
   &lt;a href="geo:0,0?q=Linie 27, 5405 AR UDEN, Nederland"&gt;Android Version&lt;/a&gt;
  </code></pre>
  
  <p>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.</p>
  
  <p>I have tryed all of this to open the native map app on iOS5 but I had no luck:</p>
  
  <pre><code>  &lt;a href="http://maps.google.com/maps?q=Linie 27, 5405 AR UDEN, Nederland"&gt;Android Version Q&lt;/a&gt;
    br/&gt;
    &lt;a href="http://maps.apple.com/maps?q=Linie 27, 5405 AR UDEN, Nederland"&gt;iOS Version Q&lt;/a&gt;               
    &lt;br/&gt;
    &lt;a href="http://maps.google.com/maps?saddr=Linie 27, 5405 AR UDEN, Nederland"&gt;Android Version saddr&lt;/a&gt;
    &lt;br/&gt;
    &lt;a href="http://maps.apple.com/maps?saddr=Linie 27, 5405 AR UDEN, Nederland"&gt;iOS Version saddr&lt;/a&gt;
    &lt;br/&gt;
     &lt;a href="maps:q=Linie 27, 5405 AR UDEN, Nederland"&gt;iOS curent Version&lt;/a&gt;
     &lt;br/&gt;
     &lt;a href="maps://maps.apple.com/?q=Linie 27, 5405 AR UDEN, Nederland"&gt;IOS with google maps&lt;/a&gt;
      &lt;br/&gt;
      &lt;a href="maps:q=Linie 27, 5405 AR UDEN, Nederland"&gt;iOS curent Version&lt;/a&gt;
      &lt;br/&gt;
      &lt;a href="comgooglemaps://?q=Linie 27, 5405 AR UDEN, Nederland"&gt;From Google Docs for iOS app&lt;/a&gt;
      &lt;div data-bind="click: WindowOpenClick "&gt;Window.Open&lt;/div&gt;
      &lt;div data-bind="click: WindowLocationClick"&gt;Window.location&lt;/div&gt;
      &lt;div data-bind="click: WindowOpenClickBlackPage"&gt;Window.Open Blank&lt;/div&gt;
  
  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;
      }
  </code></pre>
  
  <p>I added everything that I have above but they are in separate files in my app.</p>
  
  <p>Does anyone know of a way to open the maps app in iOS5?</p>