photon-pelias-adapter is a small API proxy to replace pelias geocoder with photon. We use this to replace pelias with photon in digitransit-ui
Supported pelias APIs:
/v1/search
/v1/reverse
Supported pelias paramters:
- for
search
text
boundary.rect
focus.point
lang
- returns empty results, if
sources
containsgtfs
.
- for
reverse
point.lat
andpoint.lon
lang
Configuration:
- Set port via
PORT
environment variable. Default8080
. - Set Photon endpoint via environment variable
PHOTON_URL
. Defaulthttps://photon.komoot.de
.
Install required packages via npm install
.
To run photon pelias with defaults (port 8080, connecting to https://photon.komoot.io/), run via
$ node index.js
else
$ node index.js
$ PHOTON_URL=https://photon.komoot.io/ PORT=8080 node index.js
Now you may test photon-pelias-adapter e.g. by requesting
http://localhost:8080/v1/search?text=Berlin