Hey guys,
I’m building an Ionic 3 app and I have an issue with a maps link on iOS.
I have a button and a geolocation associated to it. When I click on it, the app should open Plans, Maps or Waze and get me to the geolocation I want.
Things is, it’s working perfectly on Android, but nothing happens on iOS…
I don’t know what to do.
Here is my button:
<a [href]="getRestoGeo()" title="Itinéraire"><button ion-button class="btn-menu">M'y rendre</button></a>
And here is my getRestoGeo() function:
getRestoGeo(): SafeUrl {
let url = "geo:";
if(this.platform.is('ios')) {
url = "maps://";
}
return this.sanitizer.bypassSecurityTrustUrl(url + this.resto.latitude + ", " + this.resto.longitude + "?q=" + this.resto.name + " " + this.resto.address + " " + this.resto.zipCode + " " + this.resto.city);
}
I’ve tried with many ways, like “maps://?q=LAT+LNG” etc… Nothing happens, no errors… Still working on Android.
Thanks for your help guys !