【发布时间】:2021-01-01 00:17:16
【问题描述】:
我正忙着开发一个基于位置的应用程序并使用 expo,有没有人知道如何在地图上跟踪用户位置并判断他们是否到达类似于 GPS 的 expo 项目的特定目的地。
<MapViewDirections
origin={userContext.userLocation}
destination={userContext.userLocation}
apikey={googleMapApi}
mode='DRIVING'
language='en's
strokeWidth={8}
strokeColor="#2A9D8F"
optimizeWaypoints={true}
resetOnChange={false}
precision={"low"}
/>
【问题讨论】:
-
react-native-maps没有这样做。您将需要一个像这样的地理定位包,例如https://github.com/react-native-community/react-native-geolocation并在您的坐标上放置一个标记
标签: reactjs react-native