react-native-geocodex
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

react-native-geocodex

A smart and lightweight geocoding utility for React Native. Supports forward and reverse geocoding using OpenStreetMap without an API key.

Installation

npm install react-native-geocodex
# or
yarn add react-native-geocodex

Usage

import { geocode, reverseGeocode } from 'react-native-geocodex';

async function example() {
  // Convert address to coordinates
  const coords = await geocode('1600 Amphitheatre Parkway, Mountain View, CA');
  console.log('Coordinates:', coords);

  // Convert coordinates back to address
  const address = await reverseGeocode(coords.latitude, coords.longitude);
  console.log('Address:', address);
}

example();

Package Sidebar

Install

npm i react-native-geocodex

Weekly Downloads

245

Version

1.0.1

License

MIT

Unpacked Size

14 kB

Total Files

15

Last publish

Collaborators

  • vishaalkarthik