Fix geo: URI handling on iOS by replacing with link to Apple Maps https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html
This commit is contained in:
parent
6f57946ab0
commit
7b9641e751
@ -199,7 +199,13 @@ function initCordova() {
|
||||
|
||||
// Handle geo: urls
|
||||
$("#app").on("click", "a[href^='geo:']", function (evt) {
|
||||
window.open($(this).attr("href"), "_system");
|
||||
if (cordova.platformId == "ios") {
|
||||
window.open($(this).attr("href").replace("geo:", "http://maps.apple.com/?q="), "_system");
|
||||
} else if (cordova.platformId == "android") {
|
||||
window.open($(this).attr("href").replace("geo:", "geo:0,0?q="), "_system");
|
||||
} else {
|
||||
window.open($(this).attr("href"), "_system");
|
||||
}
|
||||
evt.preventDefault();
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user