Skip to content

Commit

Permalink
Merge pull request #410 from sronveaux/photon-extent-and-url
Browse files Browse the repository at this point in the history
Fix Photon geocoder provider
  • Loading branch information
sronveaux authored Jul 23, 2024
2 parents 3a33aae + 3f3a5ba commit 1d86945
Showing 1 changed file with 8 additions and 2 deletions.
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

0 comments on commit 1d86945

Please sign in to comment.