diff --git a/web/layouts/_partials/address_autocomplete.html b/web/layouts/_partials/address_autocomplete.html index 374059c..7fabae0 100644 --- a/web/layouts/_partials/address_autocomplete.html +++ b/web/layouts/_partials/address_autocomplete.html @@ -18,7 +18,7 @@ this.responselength = 0 return [] } - result = await fetch("https://api-adresse.data.gouv.fr/search/?q=" + this.input) + result = await fetch("https://data.geopf.fr/geocodage/search/?q=" + encodeURIComponent(this.input)) json = await result.json() console.log(json) diff --git a/web/layouts/_partials/orb_address_autocomplete.html b/web/layouts/_partials/orb_address_autocomplete.html index c7a10f9..414cd15 100644 --- a/web/layouts/_partials/orb_address_autocomplete.html +++ b/web/layouts/_partials/orb_address_autocomplete.html @@ -19,7 +19,7 @@ this.responselength = 0 return [] } - result = await fetch("https://api-adresse.data.gouv.fr/search/?q=" + this.input) + result = await fetch("https://data.geopf.fr/geocodage/search/?q=" + encodeURIComponent(this.input)) json = await result.json() console.log(json) diff --git a/web/layouts/agenda/_partials/address.html b/web/layouts/agenda/_partials/address.html index 0952b2d..df2854d 100644 --- a/web/layouts/agenda/_partials/address.html +++ b/web/layouts/agenda/_partials/address.html @@ -22,7 +22,7 @@ this.responselength = 0 this.address = this.def this.input = `{{ .Default.properties.label}}` - result = await fetch('https://api-adresse.data.gouv.fr/search/?q=' + this.input) + result = await fetch('https://data.geopf.fr/geocodage/search/?q=' + this.input) json = await result.json() bb = json['features'][0] @@ -33,7 +33,7 @@ return [bb] } - result = await fetch('https://api-adresse.data.gouv.fr/search/?q=' + this.input) + result = await fetch('https://data.geopf.fr/geocodage/search/?q=' + this.input) json = await result.json() this.responselength = json['features'].length diff --git a/web/layouts/journeys/search-compact.html b/web/layouts/journeys/search-compact.html index 0ba3493..3adbb75 100644 --- a/web/layouts/journeys/search-compact.html +++ b/web/layouts/journeys/search-compact.html @@ -22,7 +22,7 @@ this.responselength = 0 return [] } - result = await fetch("https://api-adresse.data.gouv.fr/search/?q=" + this.input) + result = await fetch("https://data.geopf.fr/geocodage/search/?q=" + this.input) json = await result.json() this.responselength = json["features"].length return json["features"] @@ -71,7 +71,7 @@ this.responselength = 0 return [] } - result = await fetch("https://api-adresse.data.gouv.fr/search/?q=" + this.input) + result = await fetch("https://data.geopf.fr/geocodage/search/?q=" + this.input) json = await result.json() this.responselength = json["features"].length return json["features"]