Skip to main content
@capgo/capacitor-nativegeocoder Renamed Renamed from @capgo/nativegeocoder to @capgo/capacitor-nativegeocoder. Location Open source

Native Geocoder Capacitor plugin

Convert addresses to coordinates and coordinates to addresses using native geocoding

Install

bun add @capgo/capacitor-nativegeocoder bunx cap sync
npm, pnpm or yarn
  • npm install @capgo/capacitor-nativegeocoder
  • pnpm add @capgo/capacitor-nativegeocoder
  • yarn add @capgo/capacitor-nativegeocoder

Guide

How to use Native Geocoder in Capacitor

Test on device

Download the Capgo app, then scan the QR code.

Native Geocoder plugin preview QR code

Using @capgo/capacitor-nativegeocoder

Capacitor plugin for native forward and reverse geocoding.

Install

npm install @capgo/capacitor-nativegeocoder
npx cap sync

What This Plugin Exposes

  • reverseGeocode - Convert latitude and longitude to an address.
  • forwardGeocode - Convert an address to latitude and longitude.

Example Usage

reverseGeocode

Convert latitude and longitude to an address.

import { NativeGeocoder } from '@capgo/capacitor-nativegeocoder';

const result = await NativeGeocoder.reverseGeocode({
  latitude: 48.8566,
  longitude: 2.3522,
});
console.log(result);

forwardGeocode

Convert an address to latitude and longitude.

import { NativeGeocoder } from '@capgo/capacitor-nativegeocoder';

const result = await NativeGeocoder.forwardGeocode({ addressString: 'address-string' });
console.log(result);

Full Reference

Keep going from Using @capgo/capacitor-nativegeocoder

If you are using Using @capgo/capacitor-nativegeocoder to plan native plugin work, connect it with @capgo/capacitor-nativegeocoder for the implementation detail in @capgo/capacitor-nativegeocoder, Getting Started for the implementation detail in Getting Started, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins.

FAQ

Native Geocoder plugin FAQ

How do I install the Native Geocoder plugin in a Capacitor app?

Run "bun add @capgo/capacitor-nativegeocoder" (or "npm install @capgo/capacitor-nativegeocoder"), then run "bunx cap sync" so the iOS and Android projects pick up the native code. Import it from "@capgo/capacitor-nativegeocoder" in your app code.

Does @capgo/capacitor-nativegeocoder work with React, Vue and Angular?

Yes. Native Geocoder is a Capacitor package, so it works with any web framework that runs inside Capacitor, including Ionic, React, Vue, Angular, Svelte and plain JavaScript.

Which Capacitor version does @capgo/capacitor-nativegeocoder support?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

Is @capgo/capacitor-nativegeocoder free and open source?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-nativegeocoder/ and the package is free to install from npm. Bug reports and pull requests are welcome.

Can I update code that uses Native Geocoder without an App Store review?

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

Ship Native Geocoder changes without waiting for app review

Once the plugin is in your store build, Capgo live updates push your JavaScript, HTML and CSS changes to users in minutes.

Start with Capgo