npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mappls-nearby-record-finder-react-native

v1.0.0

Published

Nearby record finder by Mappls

Downloads

75

Readme

Nearby Record Finder (Based on Custom Atlas APIs)

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

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

Android

  • Add followling line in android/build.gradle file:-
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

  • run pod install from ios folder

Usage

Step 1: Import

import  mapplsNearbyRecord  from'mappls-nearby-record-finder-react-native';
import  MapplsGL  from  'mappls-map-react-native'

Step 2: Initialization

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

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)

For any queries and support, please contact:

Email us at [email protected]

Support Need support? contact us!