Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pake/nativegeocoder

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pake/nativegeocoder

Capacitor plugin for native forward and reverse geocoding

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@capgo/nativegeocoder

Capgo - Instant updates for capacitor

Check out: Capgo — Instant updates for capacitor

Capacitor plugin for native forward and reverse geocoding

Install

npm install @capgo/nativegeocoder
npx cap sync

then import this into your code:

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

iOS

Apple requires privacy descriptions to be specified in Info.plist for location information:

  • NSLocationAlwaysUsageDescription (Privacy - Location Always Usage Description)
  • NSLocationWhenInUseUsageDescription (Privacy - Location When In Use Usage Description)

Read about Configuring Info.plist in the iOS Guide for more information on setting iOS permissions in Xcode

Android

This API requires the following permissions be added to your AndroidManifest.xml:

<!-- Geolocation API -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location.gps" />

API

reverseGeocode(...)

reverseGeocode(options: reverseOptions) => any

Convert latitude and longitude to an address

ParamType
optionsreverseOptions

Returns: any

Since: 0.0.1


forwardGeocode(...)

forwardGeocode(options: ForwardOptions) => any

Convert an address to latitude and longitude

ParamType
optionsForwardOptions

Returns: any

Since: 0.0.1


Interfaces

reverseOptions
PropTypeDescription
latitudenumberlatitude is a number representing the latitude of the location.
longitudenumberlongitude is a number representing the longitude of the location.
useLocalebooleanLocalise the results to the given locale.
defaultLocalestringlocale is a string in the format of language_country, for example en_US.
maxResultsnumberMax number of results to return.
apiKeystringOnly used for web platform to use google api
Adress
PropType
latitudenumber
longitudenumber
countryCodestring
countryNamestring
postalCodestring
administrativeAreastring
subAdministrativeAreastring
localitystring
subLocalitystring
thoroughfarestring
subThoroughfarestring
areasOfInterest{}
ForwardOptions
PropTypeDescription
addressStringstringaddress is a string of the address to be geocoded.
useLocalebooleanLocalise the results to the given locale.
defaultLocalestringlocale is a string in the format of language_country, for example en_US.
maxResultsnumberMax number of results to return.
apiKeystringOnly used for web platform to use google api

Thanks

To @sebastianbaar and his work on cordova-plugin-nativegeocoder what he made was very inspiring

Keywords

FAQs

Package last updated on 07 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc