Note that there are some explanatory texts on larger screens.

plurals
  1. POphonegap 2.3 open maps and URLS no longer works on iPhone
    primarykey
    data
    text
    <p>Just installed phonegap 2.3 and tried to open a maps link that i've created. This was working perfectly fine until the update.</p> <p>I have tweaked the URL scheme to suit the ones in <a href="http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html" rel="nofollow">here</a> and i have also tried feeding it a normal url, no matter what i do, i cannot seem to get it to load a link outside the app, whether it be a browser window or the native maps app..</p> <p>Code:</p> <pre><code>openDeviceMapsApplication: function(address, lat, lon) { var query = '?'; address = address + ", Australia"; address = encodeURI(address); if (address[0] !== '.') { query += 'q=' + address + '&amp;'; } else { query += 'q=' + lat + ',' + lon + '&amp;'; } query += 'z=15'; var url = 'http://maps.google.com/maps'; var osVersion = "not detected"; console.log("detect"); if(/OS [2-4](_\d)(_\d)? like Mac OS X/i.test(navigator.userAgent)) { //is it ios 2-4? url = 'http://maps.google.com/maps'; osVersion = "ios 2-4"; console.log("ios2-4"); } else if(/CPU like Mac OS X/i.test(navigator.userAgent)) { // ios 1?!?! url = 'http://maps.google.com/maps'; osVersion = "ios 1"; console.log("ios4"); } else if(/OS [5](_\d)(_\d)? like Mac OS X/i.test(navigator.userAgent)) { //ios 5? url = 'http://maps.google.com/maps'; osVersion = "ios 5"; console.log("ios5"); } else{//ios 6 or greater url = 'http://maps.apple.com/'; osVersion = "ios 6 or greater"; console.log("ios6"); } url += query; console.log(url); window.location.href = url; return; }, </code></pre> <p>Does anyone have a workaround?</p> <p>PS, the os detection works and is ugly.. but it works :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload