6.0.4 • Published 4 days ago

@capgo/nativegeocoder v6.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

@capgo/nativegeocoder

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

Address

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

6.0.3

4 days ago

6.0.2

4 days ago

6.0.4

4 days ago

6.0.1

10 days ago

6.0.0

10 days ago

1.0.21

3 months ago

1.0.20

3 months ago

1.0.19

4 months ago

1.0.18

5 months ago

1.0.17

5 months ago

1.0.16

7 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.10

9 months ago

1.0.14

9 months ago

1.0.13

9 months ago

1.0.12

9 months ago

0.1.58

1 year ago

0.1.59

1 year ago

1.0.7

11 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

0.1.60

12 months ago

0.1.61

12 months ago

0.1.62

12 months ago

0.1.56

1 year ago

0.1.57

1 year ago

0.1.52

1 year ago

0.1.53

1 year ago

0.1.54

1 year ago

0.1.55

1 year ago

0.1.51

1 year ago

0.1.50

1 year ago

0.1.49

1 year ago

0.1.48

1 year ago

0.1.41

1 year ago

0.1.42

1 year ago

0.1.43

1 year ago

0.1.44

1 year ago

0.1.45

1 year ago

0.1.46

1 year ago

0.1.47

1 year ago

0.1.40

1 year ago

0.1.38

1 year ago

0.1.39

1 year ago

0.1.30

1 year ago

0.1.31

1 year ago

0.1.32

1 year ago

0.1.33

1 year ago

0.1.34

1 year ago

0.1.35

1 year ago

0.1.36

1 year ago

0.1.37

1 year ago

0.1.28

1 year ago

0.1.29

1 year ago

0.1.24

2 years ago

0.1.25

2 years ago

0.1.26

2 years ago

0.1.23

2 years ago

0.1.22

2 years ago

0.1.21

2 years ago

0.1.20

2 years ago

0.1.19

2 years ago

0.1.18

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.1

2 years ago