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

@inoxialabs/react-native-nitro-location-geocoder

v1.0.0

Published

React Native Nitro module for reverse geocoding coordinates into country and locality context.

Readme

@inoxialabs/react-native-nitro-location-geocoder

@inoxialabs/react-native-nitro-location-geocoder is a minimal React Native Nitro module for reverse geocoding latitude and longitude coordinates into a normalized location result.

Features

  • Reverse geocoding on iOS and Android.
  • Locale-aware lookups using language tags such as en, es, or es-PE.
  • Small, typed API with a normalized result shape.
  • No backend dependency and no device location permission requirement.
  • Stable generic errors for unavailable geocoders, empty results, invalid coordinates, timeouts, and native geocoder failures.

Supported platforms

  • iOS
  • Android

This package does not expose a web implementation.

Installation

Install the package and its Nitro peer dependency:

npm install @inoxialabs/react-native-nitro-location-geocoder react-native-nitro-modules

Peer dependencies:

  • react
  • react-native
  • react-native-nitro-modules ^0.35.0

On iOS, install pods after adding the package:

cd ios && pod install

Usage

import { reverseGeocode } from '@inoxialabs/react-native-nitro-location-geocoder';

const result = await reverseGeocode(-12.0464, -77.0428, 'es-PE');

console.log(result.countryCode);
console.log(result.country);
console.log(result.locality);
console.log(result.administrativeArea);

To use the system default locale, pass an empty string:

const result = await reverseGeocode(4.711, -74.0721, '');

API

reverseGeocode(latitude, longitude, locale)

Returns Promise<LocationGeocoderResult>.

Parameters:

  • latitude: required number
  • longitude: required number
  • locale: required string

locale accepts a language tag such as en, es, or es-PE. Passing '' uses the platform default locale, but the argument itself is still required. Latitude must be finite and between -90 and 90. Longitude must be finite and between -180 and 180.

LocationGeocoderResult

type LocationGeocoderResult = {
  countryCode: string;
  country: string;
  locality: string;
  administrativeArea: string;
  subAdministrativeArea: string;
  subLocality: string;
};

All fields are always present. When the platform geocoder cannot provide a field, the module returns an empty string for that property.

Platform behavior

  • iOS uses CLGeocoder.
  • Android uses android.location.Geocoder.
  • Calls are independent. Starting one reverse-geocode request does not cancel another request.
  • Requests time out after 10 seconds with GEOCODER_TIMEOUT.
  • The module rejects with INVALID_COORDINATES when latitude or longitude is outside the valid coordinate range.
  • The module rejects with NO_RESULTS when no address is found.
  • Android rejects with UNAVAILABLE when the platform geocoder is not available.
  • iOS wraps native geocoder failures as GEOCODER_FAILED: <platform message>.
  • Android wraps native geocoder failures as GEOCODER_FAILED or GEOCODER_FAILED: <platform message>.

Notes

  • The module reverse geocodes coordinates that you already have. It does not request GPS updates or device location permissions.
  • The package exports reverseGeocode, Geocoder, and the default Geocoder object.

Development

Regenerate Nitro bindings after changing src/specs/LocationGeocoder.nitro.ts or nitro.json:

npm install
npm run specs
npm test

Validate the published package contents:

npm pack --dry-run