React Native 高德地图定位模块 react-native-amap-geolocation

作为 react-native-amap3d 的补充,提供独立的定位模块,支持逆地理编码。

image

用法

  1. 安装
  2. 获取 Key:
    • Android
    • iOS
import { Geolocation } from "react-native-amap-geolocation"

await Geolocation.init({
  ios: "9bd6c82e77583020a73ef1af59d0c759",
  android: "043b24fe18785f33c491705ffe5b6935"
})

Geolocation.setOptions({
  interval: 8000,
  distanceFilter: 20
})

Geolocation.addLocationListener(location => console.log(location))
Geolocation.start()

接口文档

  • Geolocation

你可能感兴趣的:(React Native 高德地图定位模块 react-native-amap-geolocation)