gancio-upstream/server/services/geocoding/photon.js

18 lines
No EOL
336 B
JavaScript

module.exports = {
commonName: 'Photon',
DEFAULT_ENDPOINT: 'https://photon.komoot.io/api/',
endpoint: (req, res) => {
return res.locals.settings.geocoding_provider || this.DEFAULT_ENDPOINT
},
getParams (req, res) {
const details = req.params.place_details
return {
q: details,
limit: 3,
}
}
}