@dhavalorg/react-native-my-location-app
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

react-native-my-location-app

No need to use Native modules anymore. No need to generate Google API key for geocoding functionality in react-native anymore. This lib returns the Address/Lat-Lang WITHOUT using GOOGLE API key

Installation

npm install react-native-my-location-app

Usage

import { getLocationFromAddress, getAddressFromLocation } from "react-native-my-location-app";

// ...

const result = await getLocationFromAddress("Ma****ar chowk, Ra****"); // String
// ...
const result1 = await getAddressFromLocation(*2.33*****, *0.76*****); // Double

Response of

: "getLocationFromAddress"

{
  "result": {
    "lattitude": *2.3*****,
    "longitude": *0.7*****
  }
}

: "getAddressFromLocation"

{
  "result": {
    "adminArea": "**j**at",
    "city": "***ko**",
    "state": "**j**at",
    "country": "India",
    "countryCode": "IN",
    "feature": "8*****9F",
    "formattedAddress": "Ma*****, ****, ****006, India",
    "locality": "***ko**",
    "position": {
      "lat": "2.3*****",
      "lng": "0.7*****"
    },
    "postalCode": "***00**",
    "streetName": "",
    "streetNumber": "",
    "subAdminArea": "***ko**",
    "subLocality": "****ap**"
  }
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i @dhavalorg/react-native-my-location-app

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

263 kB

Total Files

86

Last publish

Collaborators

  • dhavalmehta