api addok
This commit is contained in:
parent
a33e9cbb15
commit
e48112e2a1
|
@ -14,8 +14,13 @@
|
|||
this.responselength = 0
|
||||
return []
|
||||
}
|
||||
result = await fetch("https://api.geocode.earth/v1/autocomplete/\?api_key=ge-4949288cd450ad31&text=" + this.input)
|
||||
if(this.input.length < 3) {
|
||||
this.responselength = 0
|
||||
return []
|
||||
}
|
||||
result = await fetch("https://api-adresse.data.gouv.fr/search/?q=" + this.input)
|
||||
json = await result.json()
|
||||
console.log(json)
|
||||
|
||||
this.responselength = json["features"].length
|
||||
return json["features"]
|
||||
|
|
|
@ -15,8 +15,13 @@
|
|||
this.responselength = 0
|
||||
return []
|
||||
}
|
||||
result = await fetch("https://api.geocode.earth/v1/autocomplete/\?api_key=ge-4949288cd450ad31&text=" + this.input)
|
||||
if(this.input.length < 3) {
|
||||
this.responselength = 0
|
||||
return []
|
||||
}
|
||||
result = await fetch("https://api-adresse.data.gouv.fr/search/?q=" + this.input)
|
||||
json = await result.json()
|
||||
console.log(json)
|
||||
|
||||
this.responselength = json["features"].length
|
||||
return json["features"]
|
||||
|
|
Loading…
Reference in New Issue