Capacitor plugin for handling geocoding and reverse geocoding.
We are proud to offer one of the most complete and feature-rich Capacitor plugins for geocoding and reverse geocoding. Here are some of the key features:
- 🖥️ Cross-platform: Supports Android, iOS and Web.
- 📍 Geocoding: Convert addresses into geographic coordinates.
- 🗺️ Reverse Geocoding: Convert geographic coordinates into human-readable addresses.
- 🌐 Multiple Providers: Support for Google Maps and OpenStreetMap on Web.
- 🌍 Localization: Customize the locale for geocoding requests.
- 🔢 Configurable Results: Limit the number of addresses returned in reverse geocoding operations.
- 🛠️ Native APIs: Uses platform-native geocoding services on Android and iOS for reliable and accurate results.
- 📦 CocoaPods & SPM: Supports CocoaPods and Swift Package Manager for iOS.
- 🔁 Up-to-date: Always supports the latest Capacitor version.
- ⭐️ Support: Priority support from the Capawesome Team.
- ✨ Handcrafted: Built from the ground up with care and expertise, not forked or AI-generated.
Missing a feature? Just open an issue and we'll take a look!
| Plugin Version | Capacitor Version | Status |
|---|---|---|
| 8.x.x | >=8.x.x | Active support |
| 0.1.x | 7.x.x | Deprecated |
| Android | iOS | Web |
|---|---|---|
![]() |
![]() |
![]() |
This plugin is only available to Capawesome Insiders. First, make sure you have the Capawesome npm registry set up. You can do this by running the following commands:
npm config set @capawesome-team:registry https://npm.registry.capawesome.io
npm config set //npm.registry.capawesome.io/:_authToken <YOUR_LICENSE_KEY>
Attention: Replace <YOUR_LICENSE_KEY> with the license key you received from Polar. If you don't have a license key yet, you can get one by becoming a Capawesome Insider.
Next, install the package:
npm install @capawesome-team/capacitor-geocoder universal-geocoder
npx cap sync
import { Geocoder } from '@capawesome-team/capacitor-geocoder';
const geocode = async () => {
const result = await Geocoder.geocode({
address: '1600 Amphitheatre Parkway, Mountain View, CA',
});
console.log('Geocode result:', result);
};
const geodecode = async () => {
const result = await Geocoder.geodecode({
latitude: 37.422,
longitude: -122.084,
});
console.log('Geodecode result:', result);
};geocode(options: GeocodeOptions) => Promise<GeocodeResult>Translate an address into geographic coordinates.
Only available on Android and iOS.
| Param | Type |
|---|---|
options |
GeocodeOptions |
Returns: Promise<GeocodeResult>
Since: 0.0.1
geodecode(options: GeodecodeOptions) => Promise<GeodecodeResult>Translate geographic coordinates into a human-readable address.
Only available on Android and iOS.
| Param | Type |
|---|---|
options |
GeodecodeOptions |
Returns: Promise<GeodecodeResult>
Since: 0.0.1
| Prop | Type | Description | Since |
|---|---|---|---|
latitude |
number |
The latitude of the geocoded location. | 0.0.1 |
longitude |
number |
The longitude of the geocoded location. | 0.0.1 |
| Prop | Type | Description | Default | Since |
|---|---|---|---|---|
address |
string |
The address to geocode. | 0.0.1 | |
locale |
string |
The locale (BCP 47 language tag) to use for the geocoding request. By default, the device's locale is used. | 0.0.1 | |
webApiKey |
string |
The API key to use for the geocoding service. Only available on Web. | 0.0.1 | |
webProvider |
'googlemaps' | 'openstreetmaps' |
The provider to use for the geocoding service. Only available on Web. | 'openstreetmaps' |
0.0.1 |
webUserAgent |
string |
The User-Agent identifying your application. Only available on the web. | 0.0.1 |
| Prop | Type | Description | Since |
|---|---|---|---|
addresses |
Address[] |
The list of addresses that match the given coordinates. The number of addresses returned is limited by the limit option. |
0.0.1 |
| Prop | Type | Description | Since |
|---|---|---|---|
adminArea |
string |
The administrative area (e.g. state or province) of the address. | 0.0.1 |
addressLines |
string[] |
The lines of the address. | 0.0.1 |
countryCode |
string |
The country code of the address. | 0.0.1 |
countryName |
string |
The name of the country. | 0.0.1 |
phoneNumber |
string |
The phone number of the address. | 0.0.1 |
postalCode |
string |
The postal code of the address. | 0.0.1 |
subAdminArea |
string |
The sub-administrative area (e.g. county) of the address. | 0.0.1 |
url |
string |
The URL of the address. | 0.0.1 |
| Prop | Type | Description | Default | Since |
|---|---|---|---|---|
latitude |
number |
The latitude of the location to reverse geocode. | 0.0.1 | |
limit |
number |
The maximum number of results to return. | 5 |
0.0.1 |
longitude |
number |
The longitude of the location to reverse geocode. | 0.0.1 | |
webApiKey |
string |
The API key to use for the geocoding service. Only available on Web. | 0.0.1 | |
webProvider |
'googlemaps' | 'openstreetmaps' |
The provider to use for the geocoding service. Only available on Web. | 'openstreetmaps' |
0.0.1 |
webUserAgent |
string |
The User-Agent identifying your application. Only needed if webProvider is set to openstreetmaps which uses the Nominatim service (see https://operations.osmfoundation.org/policies/nominatim/). The goal is to be able to limit the number of requests per application. Only available on the web. |
0.0.1 |
See CHANGELOG.md.
See BREAKING.md.
See LICENSE.


