react-native-amap-geolocation-fg

1.3.2 • Public • Published

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.requestMultiple([
  PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
  PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION,
]);

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

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

文档

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.20latest

Version History

VersionDownloads (Last 7 Days)Published
1.3.20
1.3.10
1.3.00
1.2.90
1.2.80
1.2.70
1.2.60
1.2.50
1.2.40
1.2.30
1.2.20
1.2.10
1.2.00
1.1.90
1.1.80
1.1.70
1.1.60
1.1.50
1.1.40
1.1.30
1.1.10

Package Sidebar

Install

npm i react-native-amap-geolocation-fg

Weekly Downloads

0

Version

1.3.2

License

MIT

Unpacked Size

49.3 MB

Total Files

56

Last publish

Collaborators

  • restart-man