# react-native-google-location-fetcher

> Google Location Fetcher for iOS and Android React-Native apps

Latest version **1.1.1** (published 2018-07-15) · 0 weekly downloads

## Install

```sh
npm install react-native-google-location-fetcher
pnpm add react-native-google-location-fetcher
yarn add react-native-google-location-fetcher
bun add react-native-google-location-fetcher
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-07-15 |
| First published | 2018-07-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shashank Srivastava |
| Maintainers | shashank24 |
| Keywords | location, google, react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-google-location-fetcher
- Repository: https://github.com/Shashank2406/react-native-google-location-fetcher
- Issues: https://github.com/Shashank2406/react-native-google-location-fetcher/issues
- npm.io page: https://npm.io/package/react-native-google-location-fetcher

## Dependencies (3)

- [qs](https://npm.io/package/qs.md) ^5.2.0
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.10
- [lodash.debounce](https://npm.io/package/lodash.debounce.md) ^4.0.8

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2018-07-15
- 1.1.0 — 2018-07-15
- 1.0.0 — 2018-07-14

## README

# react-native-google-location-fetcher
Google Location Fetcher for iOS and Android React-Native apps

## PLANNED FEATURES

- [x] Get Location Coordinates
- [x] Reverse Geocoding from Google API
- [x] Get Location Name from Google API
- [x] Get any Location Coordinates from Google API
- [ ] Ask permission for location on Android


### Installation

1. ```npm install react-native-google-location-fetcher --save```
2. Get your [Google Places API keys](https://developers.google.com/places/) and enable "Google Places API Web Service" (NOT Android or iOS) in the console.
3. Enable "Google Maps Geocoding API" if you want to use GoogleReverseGeocoding for Current Location

For Android: add the following line in your AndroidManifest.xml
```xml
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
```

### Example

```jsx
import React from 'react';
import { View, Image } from 'react-native';
import {GoogleLocationFetcher} from 'react-native-google-location-fetcher'


export default class App extends Component {
  componentWillMount(){
    // To initialise the module
    GoogleLocationFetcher.initialise(YOUR_API_KEY)
    // To get current Location coordinates and name
    console.log(GoogleLocationFetcher.getCurrentLocation())
    // To get location name from coordinates
    console.log(GoogleLocationFetcher.getLocationName(LATITUDE,LONGITUDE))
    // TO get location coordinates 
    console.log(GoogleLocationFetcher.getLocationCoordinates(ANY_LOCATION_NAME))
  }
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>Welcome to React Native!</Text>
        <Text style={styles.instructions}>To get started, edit App.js</Text>
        <Text style={styles.instructions}>{instructions}</Text>
      </View>
    );
  }
}


```

---
_Source: https://npm.io/package/react-native-google-location-fetcher · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
