From a4994fc47c3fc1924fc3d1a27b4b4e898a9ecf71 Mon Sep 17 00:00:00 2001 From: Will Bradley Date: Sun, 28 Jul 2013 04:15:53 -0400 Subject: [PATCH] Fixing geolocation --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 7903980..c2c402d 100644 --- a/index.html +++ b/index.html @@ -109,7 +109,7 @@ xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET","http://nominatim.openstreetmap.org/search/"+encodeURIComponent(query)+"?format=json",true); xmlhttp.send(); - xmlhttp.onreadystatechange = function(){ + xmlhttp.onreadystatechange = function(xmlhttp){ if (xmlhttp.readyState==4 && xmlhttp.status==200) { callback(xmlhttp); } @@ -120,7 +120,7 @@ xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET","http://nominatim.openstreetmap.org/reverse?format=json&lat="+encodeURIComponent(lat)+"&lon="+encodeURIComponent(lat)+"&zoom="+encodeURIComponent(zoom),true); xmlhttp.send(); - xmlhttp.onreadystatechange = function(){ + xmlhttp.onreadystatechange = function(xmlhttp){ if (xmlhttp.readyState==4 && xmlhttp.status==200) { callback(); }