const createNavigationURL = (startLat, startLng, lat, lng) => {
const scheme = Platform.select({
ios: `maps:${startLat}?q=`,
android: `geo:${startLng}?q=`
});
const latLng = `${lat},${lng}`;
const label = "Custom Label";
const url = Platform.select({
ios: `${scheme}${label}@${latLng}`,
android: `${scheme}${latLng}(${label})`
});
return url;
};
export { createNavigationURL };
Created
April 14, 2020 18:03
-
-
Save WrathChaos/10532cfbd324f733709e7b529d945d00 to your computer and use it in GitHub Desktop.
React Native Google Maps Navigation?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment