Fixing geolocation
This commit is contained in:
parent
57d1d2a1e0
commit
a4994fc47c
|
@ -109,7 +109,7 @@
|
||||||
xmlhttp=new XMLHttpRequest();
|
xmlhttp=new XMLHttpRequest();
|
||||||
xmlhttp.open("GET","http://nominatim.openstreetmap.org/search/"+encodeURIComponent(query)+"?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(xmlhttp){
|
||||||
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
||||||
callback(xmlhttp);
|
callback(xmlhttp);
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
xmlhttp=new XMLHttpRequest();
|
xmlhttp=new XMLHttpRequest();
|
||||||
xmlhttp.open("GET","http://nominatim.openstreetmap.org/reverse?format=json&lat="+encodeURIComponent(lat)+"&lon="+encodeURIComponent(lat)+"&zoom="+encodeURIComponent(zoom),true);
|
xmlhttp.open("GET","http://nominatim.openstreetmap.org/reverse?format=json&lat="+encodeURIComponent(lat)+"&lon="+encodeURIComponent(lat)+"&zoom="+encodeURIComponent(zoom),true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
xmlhttp.onreadystatechange = function(){
|
xmlhttp.onreadystatechange = function(xmlhttp){
|
||||||
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user