Open Maps app IOS in JS

Hi !

I’m trying to open maps app on ios directly in JS. With an HTML link, I do :

<a href="maps:q=my-adress" target="_blank">Open Map !</a>

and it works.

In JS, i’m trying

window.open('maps://?q=' + myAdress, '_system');

Do you know why ?

Thanx for your help ! :slight_smile:

Have you tried this:

JS:
$scope.openNavigator = function() {
var geoString = ‘’;

if(ionic.Platform.isIOS()) {
geoString = ‘maps://?q=’+$scope.Latitude+’,’+$scope.Longitude+’’;
}
else if(ionic.Platform.isAndroid()) {
geoString = ‘geo://?q=’+$scope.Latitude+’,’+$scope.Longitude+’’;
}
window.open(geoString, ‘_system’);
}

HTML:
ng-click=“openNavigator()”

Thanks to: