title: HTML link to open native Android or IOS map with off-road placemark showing
body: <p>My web application displays a Google map with a placemark showing an offroad location. I am converting it to run on mobile.</p>
  
  <p>I can successfully open the native maps app in both IOS and Android with the following PHP code and link. (Tested on Samsung Galaxy S2 running Android 4.1.2):</p>
  
  <pre><code>$latlong ='-28.546604,153.540777';
  echo '&lt;a href="http://maps.apple.com?daddr='.$latlong.'"&gt;Take Me There&lt;/a&gt;';
  </code></pre>
  
  <p>The problem is it does not put any placemark on the Native Google Map showing the offroad location. It just shows the driving route, which ends at the nearest street. Same result whether I click the Navigation or the Directions option at the bottom.</p>
  
  <p>I also tested it with the direct (Android-only) link like this but it made no difference:</p>
  
  <pre><code>&lt;a href="http://maps.google.com/maps?daddr='.$latlong.'"&gt;
  </code></pre>
  
  <p>I tried this form of the link instead:</p>
  
  <pre><code>&lt;a href="geo:'.$latlong.'"&gt;Take Me There&lt;/a&gt;
  </code></pre>
  
  <p>It goes directly into Google Maps native without asking any initial questions about which app to use, which I prefer, but it just displays a blank map screen. If I click on the icon in the top right corner of the map it then shows the normal navigation screen, but centered on my current location and there is no placemark for my destination.</p>
  
  <p>Is there any way to force the native app to display a placemark at an exact specified offroad lat/long location please?</p>
  
  <p>Found the answer myself. Solution was trivially easy thanks to <a href="https://stackoverflow.com/questions/10744863/showing-a-marker-at-a-geo-url-in-android-maps">this stackoverflow answer</a></p>
  
  <p>It was in fact exactly what my old code that displayed the Google map on the PC was doing. (Doh!) Just add a (label) value after the latlong to get the placemark to display. Like this:</p>
  
  <pre><code>$dest = 'my destination';
  $latlong ='-28.546604,153.540777';
  echo '&lt;a href="http://maps.apple.com?daddr='.$latlong.'('.$dest.')"&gt;Take Me There&lt;/a&gt;';
  </code></pre>
  
  <p>Tested and works fine on Android 4.1.2 (which is smart enough to use google maps app even though the link is pointing at Apple. I presume it works on Apple also.</p>