【发布时间】:2019-11-21 09:31:53
【问题描述】:
我想渲染牵引点之间的方向(当前位置,经过的位置)
我正在使用链接打开谷歌地图应用程序,当我点击按钮时,我通过了(纬度,经度),我想在地图上看到。
所以,当地图应用程序打开时,它们会将我带到我经过的位置,但没有显示我当前位置和其他地址之间的目的地,也没有任何标记,知道如何解决这些问题吗?
这是我的代码
_openMap = () => {
const { region } = this.state;
console.log('open directions');
// Linking.openURL('geo:37.484847,-122.148386');
Linking.canOpenURL(`geo:${region.latitude},${region.longitude}`).then(supported => {
if (supported) {
Linking.openURL(`geo:${region.latitude},${region.longitude}`);
} else {
alert('sorry invalid url')
}
});
}
【问题讨论】:
-
可能与this重复
标签: javascript android reactjs google-maps react-native