From 191c0291e6722513803027cd12b85d059225baa1 Mon Sep 17 00:00:00 2001 From: Will Bradley Date: Sat, 27 Jul 2013 19:40:21 -0400 Subject: [PATCH 1/3] Got map working --- index.html | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index c4bdd1a..2632bdc 100644 --- a/index.html +++ b/index.html @@ -5,20 +5,70 @@ -
+
+ +
+
+ + \ No newline at end of file From 6353e2f7dbfa28814cfa398dca79989388879f97 Mon Sep 17 00:00:00 2001 From: Will Bradley Date: Sat, 27 Jul 2013 20:22:29 -0400 Subject: [PATCH 2/3] Fixing query params --- index.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 2632bdc..b089815 100644 --- a/index.html +++ b/index.html @@ -34,10 +34,15 @@ 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.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.onreadystatechange=function() { From 1e1b5c55639f7b8f5806c5b24dc311ef6bab6628 Mon Sep 17 00:00:00 2001 From: Will Bradley Date: Sun, 28 Jul 2013 02:34:38 -0400 Subject: [PATCH 3/3] Added dynamic result list --- index.html | 85 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 24 deletions(-) diff --git a/index.html b/index.html index b089815..5406883 100644 --- a/index.html +++ b/index.html @@ -5,22 +5,42 @@ -
+
+
    +

    Results

    +