import { Linking } from 'react-native';
const url = `https://www.google.com/maps/dir/?api=1&${getParameterString(params)}`
return Linking.canOpenURL(url).then(supported => {
if (!supported) {
return Promise.reject(new Error(`Could not open the url: ${url}`))
} else {
return Linking.openURL(url)
}
})