nativescript-directions icon indicating copy to clipboard operation
nativescript-directions copied to clipboard

Android: Google Maps open in my Nativescript App

Open lordrepha1980 opened this issue 7 years ago • 3 comments

Hi There

I have a problem. Android open the Native Goggle Maps App in my App. How can i fix this?. IOS works fine.

lordrepha1980 avatar Nov 29 '17 09:11 lordrepha1980

I am also facing the same issue. any updates on this??

komal2694 avatar Dec 21 '17 11:12 komal2694

I have a solution. I used Nativescript openUrl from utils and create a googlemaps schema URL like this: utilsModule.openUrl("https://www.google.com/maps/dir/?api=1&destination=" + address)

this works fine with Android but in IOS this doesn't work.

the variable 'address' must be urlencoded

https://developers.google.com/maps/documentation/urls/guide

lordrepha1980 avatar Dec 25 '17 00:12 lordrepha1980

Hi have you checked https://stackoverflow.com/questions/332872/encode-url-in-javascript to encode the variables?

elalienx avatar May 24 '18 19:05 elalienx