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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-india-maps

v0.5.0

Published

React Native SDK for India Maps using MapLibre GL with Ola Maps and Mappls (MapMyIndia) APIs

Readme

react-native-india-maps

A React Native SDK for India Maps powered by MapLibre for rendering and supporting both Ola Maps and Mappls API backends.

Features

  • 🗺️ Map rendering via @maplibre/maplibre-react-native (no proprietary native SDKs)
  • 🔄 Dual-provider: Ola Maps (default) and Mappls backends
  • 📍 Full Places API (autocomplete, geocode, reverse geocode, nearby, text search)
  • 🛣️ Routing API (directions, distance matrix, route optimizer)
  • 🛤️ Roads API (snap to road, nearest roads, speed limits)
  • 🏔️ Elevation API
  • 📐 Geofencing API (Ola Maps only)
  • 🎨 Multiple map styles (light, dark, satellite, and more)
  • ⚡ Expo config plugin for location permissions

Install

bun add react-native-india-maps @maplibre/maplibre-react-native@^11.0.0

Requires React >=19.2.0 and React Native >=0.83.0 (Expo SDK 55+ development builds are supported). See docs/installation.md for details.

Expo setup

Use an Expo development build, not Expo Go.

{
  "expo": {
    "plugins": [
      [
        "react-native-india-maps",
        {
          "iosWhenInUsePermission": "Allow $(PRODUCT_NAME) to access your location while using the app.",
          "backgroundLocation": false
        }
      ]
    ]
  }
}

The plugin adds location permissions for both Android and iOS. No native SDK configuration files are needed — MapLibre handles all map rendering.

MapLibre React Native v11 requires the React Native New Architecture. Expo Go is not supported.

Provider and hooks

import {
  IndiaMapsProvider,
  IndiaMapsClient,
  MapView,
  Marker,
  useAutocomplete,
} from 'react-native-india-maps';

// Ola Maps (default provider)
const client = new IndiaMapsClient({ apiKey: 'YOUR_OLA_MAPS_API_KEY' });

// Or Mappls provider
// const client = new IndiaMapsClient({ accessToken: 'YOUR_MAPPLS_TOKEN', provider: 'mappls' });

function SearchBox() {
  const { results, debouncedSearch } = useAutocomplete({ debounceMs: 300 });
  return null;
}

export function App() {
  return (
    <IndiaMapsProvider client={client}>
      <MapView
        style={{ flex: 1 }}
        styleName="default-light-standard"
        initialRegion={{ latitude: 28.6139, longitude: 77.209, zoomLevel: 12 }}
      >
        <Marker
          id="delhi"
          coordinate={{ latitude: 28.6139, longitude: 77.209 }}
        />
      </MapView>
      <SearchBox />
    </IndiaMapsProvider>
  );
}

Dual-provider support

The SDK supports two backends:

| Feature | Ola Maps | Mappls | | --- | --- | --- | | Auth param | api_key | access_token | | Base URL | https://api.olamaps.io | https://atlas.mappls.com | | Map tiles | ✅ Vector tiles | ❌ Not public | | Geofencing | ✅ | ❌ Not public |

// Ola Maps (default)
const olaClient = new IndiaMapsClient({ apiKey: 'YOUR_KEY' });

// Mappls
const mapplsClient = new IndiaMapsClient({
  accessToken: 'YOUR_TOKEN',
  provider: 'mappls',
});

API coverage

Places

  • Autocomplete / Autosuggest
  • Geocode
  • Reverse Geocode
  • Place Details
  • Nearby Search
  • Text Search

Routing

  • Directions (driving, walking, biking)
  • Distance Matrix
  • Route Optimizer

Roads

  • Snap to Road
  • Nearest Roads
  • Speed Limits

Elevation

  • Single point elevation
  • Multi-point elevation

Geofencing (Ola Maps only)

  • Create / Read / Update / Delete geofences
  • Check point status (inside/outside)

Tiles

  • Vector tile style URLs for MapLibre
  • Static map image URLs
  • Request transform helper for API key injection

Map styles

Use the MAP_STYLES presets or any provider-specific style name:

import { MAP_STYLES } from 'react-native-india-maps';

// MAP_STYLES.lightStandard === 'default-light-standard'
<MapView styleName={MAP_STYLES.darkStandard} style={{ flex: 1 }} />;

Available Ola Maps styles: default-light-standard, default-dark-standard, default-light-lite, default-dark-lite, default-light-full, default-dark-full, eclipse-light-standard, eclipse-dark-standard, bolt-light, bolt-dark, vintage-light, vintage-dark, and more.

Migrating from 0.2.x

Version 0.3.0 redesigns the public API. The most common changes:

  • Methods return domain types directly. The ApiResponse / PaginatedResponse envelopes were removed. For example, autocomplete now resolves to AutocompleteSuggestion[], and geocode to GeocodeResult[].
  • Positional, typed signatures. geocode(address, options?), reverseGeocode(location, options?) and placeDetails(placeId, options?) take their primary input as a positional argument. Coordinate inputs accept LatLng, { latitude, longitude }, [lng, lat] or 'lat,lng' strings (LatLngInput).
  • camelCase option names. rankbyrankBy, strictboundsstrictBounds, roundtriproundTrip, traffic_metadatatrafficMetadata, routepreferenceroutePreference.
  • Closed unions. TravelMode is 'driving' | 'walking' | 'biking' | 'trucking', and overview is 'full' | 'simplified' | false.
  • Single error type. All failures throw IndiaMapsError with a code of 'CONFIGURATION_ERROR' | 'NETWORK_ERROR' | 'API_ERROR' | 'PARSE_ERROR' | 'UNSUPPORTED_ERROR'.
  • Style presets. MAP_STYLES exports well-known Ola Maps style names; MapView uses styleName (default default-light-standard) instead of accessToken-keyed style resolution.

Migrating from 0.4.x

Version 0.5.0 removes previously-deprecated aliases. Update your imports:

  • Replace OlaMapsClient with IndiaMapsClient
  • Replace OlaMapsProvider with IndiaMapsProvider
  • Replace useOlaMaps with useIndiaMaps
  • Replace OlaMapsConfig with IndiaMapsConfig
  • Replace OlaMapsError with IndiaMapsError
  • Replace OlaMapsErrorCode with IndiaMapsErrorCode
  • Replace OlaMapViewProps with IndiaMapViewProps
  • Replace SnapToRoadPoint with RoadPoint
  • Replace autoSuggest with autocomplete (no longer an alias)
  • Replace placeDetailsAdvanced with placeDetails (no longer an alias)
  • Replace nearbySearchAdvanced with nearbySearch (no longer an alias)
  • Replace getDirectionsBasic with getDirections (no longer an alias)
  • Replace getDistanceMatrixBasic with getDistanceMatrix (no longer an alias)
  • RoutingApi.fleetPlanner has been removed — fleet planning has no public REST API

Notes

  • apiKey is used for Ola Maps API authentication
  • accessToken is used for Mappls API authentication

License

LGPL-3.0-or-later. See LICENSE.txt.