From 9fa7819786abbce0cf020c66020c542421e909b9 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Mon, 3 Oct 2016 15:07:46 +0100 Subject: [PATCH] Hopefully fix issue 21, response now has a places array which contains the results, use this. Before results were directly in response --- resources/assets/js/newnote.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/assets/js/newnote.js b/resources/assets/js/newnote.js index 265da4d7..e3322456 100644 --- a/resources/assets/js/newnote.js +++ b/resources/assets/js/newnote.js @@ -31,10 +31,10 @@ function addPlacesMap(latitude, longitude, uncertainty) { if (j.length > 0) { var i; var places = []; - for (i = 0; i < j.length; ++i) { + for (i = 0; i < j.places.length; ++i) { var latlng = parseLocation(j[i].location); - var name = j[i].name; - var slug = j[i].slug; + var name = j.places[i].name; + var slug = j.places[i].slug; places.push([name, slug, latlng[0], latlng[1]]); } //add a map with the nearby places