This question is locked. New answers and comments are not allowed.
I fooled around with my app and managed to get it to actually launch the maps application for both iOS and android. However changing to cordova 2.4 (from 2.2) seems to have broken this and I don't see why, or a way around it. Does anybody know how to get this to work? Basically I need a link that can cause apple maps to launch on iOS and google maps to launch on Android.
Before I had to use a javascript method to set the window.location.href to a specific url and that would open the app the code looked something like this ...
Ever since I updated my app to the 2.4 version of cordova this no longer works (it launches the child browser plugin at google maps on both platforms). Now for android if I use an a element like this:
Before I had to use a javascript method to set the window.location.href to a specific url and that would open the app the code looked something like this ...
var url = null, var query = "search string ..."
if (kendo.support.mobileOS.android) {
// We are in android
url = "geo:" + item.latitude + "," + item.longitude + "?q=" + query;
}
if (kendo.support.mobileOS.ios) {
// iOS
url = "http://maps.apple.com/?q=" + query;
}
window.location.href = url;
Ever since I updated my app to the 2.4 version of cordova this no longer works (it launches the child browser plugin at google maps on both platforms). Now for android if I use an a element like this:
<a href="geo:0,0?q=dallas" data-rel="external">Dallas Link</a>Following the link will work launch the google maps application. However the same trick does not work for iOS (it will open google earth). I have tried using something like <a href="http://maps.apple.com/?q=dallas" data-rel="external">link</a> but this will still launch the child browser plugin to that address (which gets redirected by apple to google maps). How can I get the apple link to open the apple maps application and not the child browser plugin?