Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Photon geocoder provider #410

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/components/geocoder/providers/photon.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//

/**
* Photon Provider. See https://photon.komoot.de.
* Photon Provider. See https://photon.komoot.io.
*
* @class Photon
*/
Expand All @@ -33,7 +33,7 @@ export class Photon {
*/
constructor () {
this.settings = {
url: 'https://photon.komoot.de/api/',
url: 'https://photon.komoot.io/api/',
params: {
q: '',
limit: 10,
Expand Down Expand Up @@ -84,6 +84,12 @@ export class Photon {
// Sometimes has bbox
if (properties.extent) {
result.boundingbox = properties.extent;
// Ensure bbox is llx,lly,urx,ury
if (result.boundingbox[1] > result.boundingbox[3]) {
const tmp = result.boundingbox[1];
result.boundingbox[1] = result.boundingbox[3];
result.boundingbox[3] = tmp;
}
}
return result;
});
Expand Down
Loading