react-native-amap-geolocation-geofence

1.0.1 • Public • Published

react-native-amap-geolocation-geofence是在react-native-amap-geolocation基础上增加了地理围栏相关功能

React Native 高德地图定位模块,支持 Android + iOS,提供尽可能完善的原生接口, 同时提供符合 Web 标准的 Geolocation API。

用法

import { PermissionsAndroid } from "react-native";
import { init, Geolocation } from "react-native-amap-geolocation";

await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION);

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

Geolocation.getCurrentPosition(({ coords }) => {
  console.log(coords);
});

文档

Package Sidebar

Install

npm i react-native-amap-geolocation-geofence

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

98.4 kB

Total Files

19

Last publish

Collaborators

  • luokun324