From 1840f8476b337cfb42aaa659620e1fb3d6862081 Mon Sep 17 00:00:00 2001 From: Winnie <liang15@mcmaster.ca> Date: Mon, 2 Apr 2018 20:03:28 -0400 Subject: [PATCH] Updates --- tomcat/webapps/Trawl/index.jsp | 2 +- tomcat/webapps/Trawl/map.jsp | 2 +- tomcat/webapps/Trawl/script.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tomcat/webapps/Trawl/index.jsp b/tomcat/webapps/Trawl/index.jsp index b16f880..8dc7e38 100644 --- a/tomcat/webapps/Trawl/index.jsp +++ b/tomcat/webapps/Trawl/index.jsp @@ -18,7 +18,7 @@ Double Handle Slider Modified from: http://jqueryui.com/slider/#range <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script src="https://cdn.plot.ly/plotly-latest.min.js"></script> <script src="histogram.js"></script> - <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA9xCYy2Co-0GWfHT8e1smTjIneNbWSfPgY&libraries=visualization"></script> + <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA9xCYy2Co-0GWfHT8e1smTjIneNbWSfPgY&libraries=visualization&callback=initMap"></script> <script src="map.js"></script> <script src="infoWindow.js"></script> diff --git a/tomcat/webapps/Trawl/map.jsp b/tomcat/webapps/Trawl/map.jsp index ab0c63e..2718673 100644 --- a/tomcat/webapps/Trawl/map.jsp +++ b/tomcat/webapps/Trawl/map.jsp @@ -30,7 +30,7 @@ dateobj.put("year",r.getDate().getYear()); dateobj.put("month",r.getDate().getMonth()); dateobj.put("day",r.getDate().getDay()); - date.add(r.getDate()); + date.add(dateobj); count.add(r.getCount()); } diff --git a/tomcat/webapps/Trawl/script.js b/tomcat/webapps/Trawl/script.js index 7e0c419..4046906 100644 --- a/tomcat/webapps/Trawl/script.js +++ b/tomcat/webapps/Trawl/script.js @@ -193,6 +193,7 @@ function reqMap(params){ xhr.onreadystatechange = function() {//Call a function when the state changes (i.e. response comes back) // Update the dropdown when response is ready if (xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200) { + console.log(this.responseText); var nodeList = JSON.parse(this.responseText); initMap(nodeList["latitude"], nodeList["longitude"]); // document.getElementById("outputDetails").innerHTML = "Found " + nodeList["n"] + " results " + "(" + nodeList["time"] + " seconds)<br> Total Population: " + nodeList["individualCount"]; -- GitLab