diff --git a/tomcat/webapps/Trawl/infoWindow.js b/tomcat/webapps/Trawl/infoWindow.js new file mode 100644 index 0000000000000000000000000000000000000000..2cfdbf11cfe9beba5207c5341d397cdae02b7a9d --- /dev/null +++ b/tomcat/webapps/Trawl/infoWindow.js @@ -0,0 +1,32 @@ +//*This code references the info window google maps API +//https://developers.google.com/maps/documentation/javascript/infowindows + +// This example displays a marker at the center of Australia. +// When the user clicks the marker, an info window opens. + +function initMap(lati, longi,info) { + for(int i=0; i < lati.length; i++){ + + + + var map = new google.maps.Map(document.getElementById('map'), { + zoom: 5.5, + center: {lat: 45.0349575, lng: -88.6941305}; + }); + + + var contentString = info[i]; + + var infowindow = new google.maps.InfoWindow({ + content: contentString + }); + + var marker = new google.maps.Marker({ + position: {lat: lati[i], lng: longi[i]} , + map: map, + }); + marker.addListener('click', function() { + infowindow.open(map, marker); + }); + } +} \ No newline at end of file diff --git a/tomcat/webapps/Trawl/map.js b/tomcat/webapps/Trawl/map.js index 8c6f08bb8254f5512cc2baa48a91568e84965bed..10016f929ba844fbb9a89475934a00f7d0b5a429 100644 --- a/tomcat/webapps/Trawl/map.js +++ b/tomcat/webapps/Trawl/map.js @@ -1,5 +1,5 @@ //*This code references the google heat maps API - +//https://developers.google.com/maps/documentation/javascript/examples/layer-heatmap // This example requires the Visualization library. Include the libraries=visualization // parameter when you first load the API. For example: diff --git a/tomcat/webapps/Trawl/map.jsp b/tomcat/webapps/Trawl/map.jsp index ce24f439d8a82e4bbb0ac11df6c10d90ed875328..80c8f0df5af8cf9aa319bb528df60bbc7ee8f1c1 100644 --- a/tomcat/webapps/Trawl/map.jsp +++ b/tomcat/webapps/Trawl/map.jsp @@ -33,8 +33,8 @@ count.add(r.getCount()); } - js.put("longitude", longitude); js.put("latitude", latitude); + js.put("longitude", longitude); js.put("name", name); js.put("date", date); js.put("individual count", count);