How to open google map in iOS using Meteor

I need to open the google / apple map app on iOS using Meteor js. I could do it in Andriod using window.open("geo:" + addressLongLat, "_system");, but the same code does not work iOS.

+6
source share
4 answers

In iOS geo: URL scheme does not open Google maps, it can open Google Earth

Google maps application allows you to use these three schemes the URL, comgooglemaps://, comgooglemaps-x-callback://andcomgooglemapsurl://

More info on google maps URL schemes

You can also use the http-url, which will open the application if it is installed, or the website if it is not

Additional information about http addresses

, window.open cordova-plugin-inappbrowser. a.

Apple

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

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

: https://gist.github.com/danharper/844382901f7a7b73b90a

+2

Using the added link geo, you suggest the user to open the location in the map application of their choice (provided that the user has more than one map application on his device).

<a href="geo:-32.845027,23.006867">OPEN</a>
+1
source

Final answer

meteor add cordova: cordova-plugin-inappbrowser@1.7.1

var addressLongLat = latitude + ',' + longitude;

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

or

window.open('comgooglemaps://?q=' + addressLongLat, '_system'); //google map
+1
source

Source: https://habr.com/ru/post/1017392/


All Articles