GithubHelp home page GithubHelp logo

cwj10 / react-native-amap-geolocation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qiuxiang/react-native-amap-geolocation

0.0 0.0 0.0 611 KB

React Native geolocation module for Android + iOS

Home Page: https://qiuxiang.github.io/react-native-amap-geolocation

License: MIT License

Java 25.83% JavaScript 8.88% Ruby 11.14% Objective-C 16.25% TypeScript 37.88%

react-native-amap-geolocation's Introduction

react-native-amap-geolocation npm version build status

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);
});

文档

react-native-amap-geolocation's People

Contributors

qiuxiang avatar dfenglei avatar symous avatar wuxushun avatar ych1 avatar clumsyme avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.