Fixing query params
This commit is contained in:
parent
191c0291e6
commit
6353e2f7db
|
@ -34,10 +34,15 @@
|
||||||
params[tmparr[0]] = tmparr[1];
|
params[tmparr[0]] = tmparr[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(decodeURIComponent(params["q"]))
|
var query = decodeURIComponent(params["q"]).replace(/\+/g, ' ')
|
||||||
|
console.log(query)
|
||||||
|
|
||||||
|
if(query && query.length > 0) {
|
||||||
|
document.getElementById("q").value = query
|
||||||
|
}
|
||||||
|
|
||||||
xmlhttp=new XMLHttpRequest();
|
xmlhttp=new XMLHttpRequest();
|
||||||
xmlhttp.open("GET","http://nominatim.openstreetmap.org/search/"+encodeURIComponent(decodeURIComponent(params["q"])+"?format=json"),true);
|
xmlhttp.open("GET","http://nominatim.openstreetmap.org/search/"+encodeURIComponent(query)+"?format=json",true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
|
|
||||||
xmlhttp.onreadystatechange=function() {
|
xmlhttp.onreadystatechange=function() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user