Forum Moderators: open
<a href="http://maps.google.com/maps?q=X" id="link">Link</a>
<script>
if(navigator.userAgent.match(/iPhone|iPod/i)) document.getElementById("link").href = "comgooglemaps://?q=X";
</script>
if(navigator.userAgent.match(/iPhone|iPod|iPad/) && navigator.appVersion.match(/OS \d+_/)[0].slice(3,-1) > 5) $("link").onclick = function(){
window.location = confirm("Use the Google Maps App?") ? "comgooglemaps://?q=X" : "http://maps.apple.com/?q=X";
return false;}