我正在使用react-native-maps在我的应用程序中显示动态地图。我希望Google Maps应用程序在用户按下地图的某个部分,文本或图标时启动,以便他们也可以从外部查看地图。我该如何实现?谢谢。
<MapView
showsUserLocation
style={styles.map}
initialRegion={{
latitude: placesLat,
longitude: placesLng,
latitudeDelta: 0.0022,
longitudeDelta: 0.0121
}}
>
<MapView.Marker
coordinate={{ latitude: placesLat, longitude: placesLng }}
title={placesTitle}
/>
</MapView>
向onMapPress
组件添加MapView.Marker
功能prop,并按here所述调用Linking.openUrl。>