# mappls-nearby-record-finder-react-native

> Nearby record finder by Mappls

Latest version **1.0.0** (published 2023-01-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install mappls-nearby-record-finder-react-native
pnpm add mappls-nearby-record-finder-react-native
yarn add mappls-nearby-record-finder-react-native
bun add mappls-nearby-record-finder-react-native
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-01-02 |
| First published | 2023-01-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 107.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | MMI |
| Maintainers | mdakram24 |
| Keywords | mapmyindia, mapmyindia-react-native, nearby-record-finder, mapmyindia-nearby-record-finder-react-native, mapmyindia-nearby, mappls, mappls-react-native, mappls-nearby-record-finder-react-native, mappls-nearby, nearby-record-finder-react-native, react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/mappls-nearby-record-finder-react-native
- Repository: https://github.com/mappls-api/mappls-react-native-sdk
- Homepage: https://github.com/mappls-api/mappls-react-native-sdk#readme
- Issues: https://github.com/mappls-api/mappls-react-native-sdk/issues
- npm.io page: https://npm.io/package/mappls-nearby-record-finder-react-native

## 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.0.0 (latest) — 2023-01-02

## README

[<img src="https://about.mappls.com/images/mappls-b-logo.svg" height="60"/> </p>](https://www.mapmyindia.com/api)

# [Nearby Record Finder (Based on Custom Atlas APIs)](Nearby-Record-Finder)
## [Introduction](Introduction)
This is an easy to integrate nearby search widget by Mappls.

To search the nearby records as per specified record types from the Nearby Record finder
database around the provided reference location.

## [Getting started](Getting-started)

`npm install mappls-nearby-record-finder-react-native`

-   Install peerDependencies

npm i mappls-map-react-native

-   If using React-native<0.60

`react-native link mappls-nearby-record-finder-react-native`

### [Installation](installation)
### [Android](android)

-   Add followling line in  `android/build.gradle`  file:-
```groovy
allprojects {
   repositories {
            mavenLocal()
            maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
           url("$rootDir/../node_modules/react-native/android")
            }
           maven {
 // Android JSC is installed from npm
    url("$rootDir/../node_modules/jsc-android/dist")
          }
       maven { url 'https://maven.mappls.com/repository/mappls/'}

           google()
           jcenter()
           maven { url 'https://www.jitpack.io' }

         }

}
```

### [ios](ios)

-   run  **pod install**  from ios folder

## [Usage](Usage)
#### Step 1: Import
```js
import  mapplsNearbyRecord  from'mappls-nearby-record-finder-react-native';
import  MapplsGL  from  'mappls-map-react-native'
```
#### Step 2: Initialization
```js
MapplsGL.setMapSDKKey(mapSDKKey);//place your mapsdkKey
MapplsGL.setRestAPIKey(restAPIKey);//your restApiKey
MapplsGL.setAtlasClientId(atlasClientId);//your atlasClientId key
MapplsGL.setAtlasClientSecret(atlasClientSecret); //your atlasClientSecret key
MapplsGL.setAtlasGrantType(atlasGrantType);
```

#### Step 3: Use Nearby Record API call
```js
mapplsNearbyRecord({ recordType:  'test', location:  'MMI000' })
      .then((res) => {
            console.log(res);
            setResult(res.toString());
      })
     .catch((e) =>  console.log(e.message));
```


### Mandatory Parameters
1. `recordType (String)` : The category or class of the record, referenced by a defined set of category codes from client.
2. `location (String)` : Provides the location around which the search will be performed. e.g. location: "28.454,77.435"
    The refLocation parameter can also accept eLoc as reference location.
    Example: location: "1T182A"


### Optional Parameters
1. `radius (number)` : The radius in meters for radial search. Default radius: 10000 meters.
2. `bounds (String)`: "(x1,y1;x2,y2)" Allows the developer to send in map bounds to provide a nearby search of the geobounds. where x1,y1 are the lat lng of the bound. The bounds are set from topLeft to bottomRight (North-West to South-East). Example :28.639256,77.211133;28.625214,77.237483.
3. `sortBy (String)` : Provides configured sorting operations for the client on cloud. Below are the available sorts:
    - dist:asc
    - dist:desc

4. `filter (String)` : This field accepts eloc and restricts the search to the provided administrative area eloc.
    Example : filter: "cop:TAVI5S".

5. `createdTime (number)`: This is an epoch value in seconds. All records
whose creation time is 'greater than' the provided input time here are responded back in results.
Example: createdTime: 1628855941
6. `modifiedTime (number)`: This is an epoch value in seconds.All records whose modified time is 'greater than' the provided input time here are responded back in results.
Example: modifiedTime: 1628855941

7. `itemCount (number)`: Number of items per page. Minimum is 1; Default is 10.

### Response Parameter

1. `records`: List of nearby places
2. `pageInfo`: Details of result pages

#### Nearby Places Parameters
1. `recordId(String)`
2. `recordMapplsPin(String)`
3. `recordType(String)`
4. `distance(number)`
5. `orderIndex(number)`
6. `latitude(number)`
7. `longitude(number)`
8. `customNote(String)`
9. `createdOn(number)`
10. `modifiedOn(number)`
11. `isExpired(Boolean)`
12. `extendedInfoDictionary(Object)`

<br><br><br>

For any queries and support, please contact: 

[<img src="https://about.mappls.com/images/mappls-logo.svg" height="40"/> </p>](https://about.mappls.com/api/)
Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com)


![](https://www.mapmyindia.com/api/img/icons/support.png)
[Support](https://about.mappls.com/contact/)
Need support? contact us!

<br></br>
<br></br>

[<p align="center"> <img src="https://www.mapmyindia.com/api/img/icons/stack-overflow.png"/> ](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[<img src="https://mmi-api-team.s3.ap-south-1.amazonaws.com/API-Team/npm-logo.one-third%5B1%5D.png" height="40"/> </p>](https://www.npmjs.com/org/mapmyindia) 



[<p align="center"> <img src="https://www.mapmyindia.com/june-newsletter/icon4.png"/> ](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA)




<div align="center">@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.</div>

<div align="center"> <a href="https://about.mappls.com/api/terms-&-conditions">Terms & Conditions</a> | <a href="https://about.mappls.com/about/privacy-policy">Privacy Policy</a> | <a href="https://about.mappls.com/pdf/mapmyIndia-sustainability-policy-healt-labour-rules-supplir-sustainability.pdf">Supplier Sustainability Policy</a> | <a href="https://about.mappls.com/pdf/Health-Safety-Management.pdf">Health & Safety Policy</a> | <a href="https://about.mappls.com/pdf/Environment-Sustainability-Policy-CSR-Report.pdf">Environmental Policy & CSR Report</a>

<div align="center">Customer Care: +91-9999333223</div>

---
_Source: https://npm.io/package/mappls-nearby-record-finder-react-native · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
