Derry Berni Derry Berni - 2 months ago 32
Android Question

Get Marker Open Linking Google Maps React Native

I have this code

openGps() {
var url = 'geo:-8.4526503, 115.2353083';
this.openExternalApp(url)
}

openExternalApp(url) {
Linking.canOpenURL(url).then(supported => {
if (supported) {
Linking.openURL(url);
} else {
Alert.alert('Eror Open Google Maps');
}
});
}



When I click nothing marker appear

enter image description here

I wanna get marker in maps, anyone know URL to call?

How I get marker when call function openGps() in Android ?

Answer Source

You can Use

Linking.openURL(`https://maps.apple.com/?q=${markerName}&ll=${lat},${lng}`);