1

I'm trying to access a link with latitude and longitude in safari using javascript, but when redirected to the link, safari opens a pop up with the message "Safari cannot open the page because the address is invalid". When accessing the same link on an android phone, the link works normally.

   window.open(`google.navigation:q=${latitude}, ${longitude}`, '_blank')

I cleaned the cache and released the permissions that the app requests when opening a gps, google maps, waze etc...

  • 4
    Safari won't know what to do with `google.navigation`; that's an Android-specific URL scheme (https://developers.google.com/maps/documentation/urls/android-intents). Use https://developers.google.com/maps/documentation/urls/ios-urlscheme on iOS, or see https://developers.google.com/maps/documentation/urls/get-started for a universal approach. – ceejayoz Jul 07 '22 at 18:14
  • Is this web-app running in a desktop-browser or inside an android-app? Did you research on [opening google maps for lat/long coordinates](https://stackoverflow.com/questions/44634193/integrating-google-maps-in-vue-js)? – hc_dev Jul 07 '22 at 18:36
  • it's a pwa, I will check the link you sent – Leonardo Baptista Jul 07 '22 at 18:44

0 Answers0