photon-geocoder
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

photon-geocoder

A simple wrapper for Photon API by komoot. Search for a place or perform a reverse lookup.

This is an unofficial client, not affiliated with komoot in any way.

Installation

Using npm:

npm i photon-geocoder

Using yarn:

yarn add photon-geocoder

Table of contents

Interfaces

Functions

Functions

asSimpleArray

asSimpleArray(featureCollection): Feature<Point>[]

A helper function to extract data from the FeatureCollection result

export

Parameters

Name Type Description
featureCollection FeatureCollection<Point> The FeatureCollection to extract data from

Returns

Feature<Point>[]


reverseGeocode

reverseGeocode(lat, lon): Promise<FeatureCollection<Point>>

Geocodes a latitude, longitude

export

Parameters

Name Type Description
lat number Latitude
lon number Longitude

Returns

Promise<FeatureCollection<Point>>

The geocoded Point FeatureCollection


search

search(searchTerm, options?): Promise<FeatureCollection<Point>>

Searches for a place

export

Parameters

Name Type Description
searchTerm string Search term to look for
options? SearchOptions -

Returns

Promise<FeatureCollection<Point>>

The FeatureCollection with the results

Package Sidebar

Install

npm i photon-geocoder

Weekly Downloads

75

Version

1.0.1

License

MIT

Unpacked Size

23.4 kB

Total Files

19

Last publish

Collaborators

  • alrico88