title: Android - launch google map via web url
body: <p>On the iPhone, a maps.google.com URL is intercepted and loaded by the native google maps application. I would like do the same on Android, but Google Maps is being loaded in the browser.</p>
  
  <p>So, in a web page, is it possible to have this url <a href="http://maps.google.com/maps?saddr=brighton&amp;daddr=timbuktu" rel="nofollow noreferrer">http://maps.google.com/maps?saddr=brighton&amp;daddr=timbuktu</a> open in the Android Google Map application ?</p>
  
  <p>I see from <a href="https://stackoverflow.com/questions/2662531/launching-google-maps-directions-via-an-intent-on-android">this</a> question that you can do it from another app via an Intent. Can you trigger these Intent's from the browser ?</p>
  
  <p><strong>Edit</strong> - On further testing, I've found that the user will be prompted to open the link in browser or map app for standard html links to maps.google.maps :</p>
  
  <pre><code>&lt;a href="http://maps.google.com/maps?saddr=brighton&amp;daddr=timbuktu"&gt;show route&lt;/a&gt;
  </code></pre>
  
  <p>I'm having the problem because I'm using javascript to set the window.location.href via a Location API callback (so I can get the user's location and then open the map).  I've opened a <a href="http://code.google.com/p/android/issues/detail?id=13888" rel="nofollow noreferrer">bug report</a> for this.</p>