我正在使用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并按此处所述调用Linking.openUrl
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句