diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-08-17 15:50:07 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-08-17 16:43:21 +0100 |
commit | d034f3c1447ea91cb4333365ce123d58deb2de0d (patch) | |
tree | 1c7e9eab5b32ecbc35bb4886ea45b4d84ee88578 /web/js/map-google.js | |
parent | 676d755848465c6fec01243fd6c7df7e249d5c2b (diff) |
Refactor /around list code to share with others.
Both /reports and /my share an ID and a /reports/ajax function, use
these also on /around (and share ajax/non-ajax code).
Diffstat (limited to 'web/js/map-google.js')
-rw-r--r-- | web/js/map-google.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/web/js/map-google.js b/web/js/map-google.js index 8819697eb..596e4f8ee 100644 --- a/web/js/map-google.js +++ b/web/js/map-google.js @@ -114,12 +114,9 @@ fixmystreet.maps = {}; /* Pan data handler */ function read_pin_json(obj) { - var current, current_near; - if (typeof(obj.current) != 'undefined' && (current = document.getElementById('current'))) { - current.innerHTML = obj.current; - } - if (typeof(obj.current_near) != 'undefined' && (current_near = document.getElementById('current_near'))) { - current_near.innerHTML = obj.current_near; + var reports_list; + if (typeof(obj.reports_list) != 'undefined' && (reports_list = document.getElementById('js-reports-list'))) { + reports_list.innerHTML = obj.reports_list; } fixmystreet.markers = markers_list( obj.pins, false ); } |