This question is locked. New answers and comments are not allowed.
We're having issues getting Maps to open for IOS devices ..anyone see anything in the code thats wrong ..Android is Fine..just IOS ..Cant get maps to load Iphone, Ipad
function openGoogleMaps(latitude, longitude) {
/*window.plugins.webintent.startActivity({
action: window.plugins.webintent.ACTION_VIEW,
url: 'geo:0,0?q=' + latitude + ","+ longitude
});*/
console.log("Begin: openGoogleMaps");
var devPlatform = device.platform;
if (devPlatform === "Android") {
console.log("In: openGoogleMaps (Android)");
window.plugins.webintent.startActivity({
action: window.plugins.webintent.ACTION_VIEW,
url: 'geo:0,0?q=' + latitude + ","+ longitude
});
}
if (devPlatform === 'iPad' || devPlatform === 'iPhone' || devPlatform === 'iPod' || devPlatform === 'iOS') {
console.log("In: openGoogleMaps (iOS)");
var iosMapURL = '"maps:q=' + latitude + ","+ longitude + '" target="_blank"'
console.log('iosMapURL: ' + iosMapURL );
window.open(iosMapURL, "_system");
}
console.log("End: openGoogleMaps");
}
function openGoogleMaps(latitude, longitude) {
/*window.plugins.webintent.startActivity({
action: window.plugins.webintent.ACTION_VIEW,
url: 'geo:0,0?q=' + latitude + ","+ longitude
});*/
console.log("Begin: openGoogleMaps");
var devPlatform = device.platform;
if (devPlatform === "Android") {
console.log("In: openGoogleMaps (Android)");
window.plugins.webintent.startActivity({
action: window.plugins.webintent.ACTION_VIEW,
url: 'geo:0,0?q=' + latitude + ","+ longitude
});
}
if (devPlatform === 'iPad' || devPlatform === 'iPhone' || devPlatform === 'iPod' || devPlatform === 'iOS') {
console.log("In: openGoogleMaps (iOS)");
var iosMapURL = '"maps:q=' + latitude + ","+ longitude + '" target="_blank"'
console.log('iosMapURL: ' + iosMapURL );
window.open(iosMapURL, "_system");
}
console.log("End: openGoogleMaps");
}