summaryrefslogtreecommitdiff
path: root/reports/map.js
diff options
context:
space:
mode:
Diffstat (limited to 'reports/map.js')
-rw-r--r--reports/map.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/reports/map.js b/reports/map.js
new file mode 100644
index 00000000..bf268d26
--- /dev/null
+++ b/reports/map.js
@@ -0,0 +1,35 @@
+let mymap = L.map('mapid').setView([25, 0], 2);
+L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoiZmFuc2FsY3kiLCJhIjoiY2pvN3I1czJwMHF5NDNrbWRoMWpteHlrdCJ9.kMpM5syQUhVjKkn1iVx9fg', {
+ attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
+ maxZoom: 18,
+ id: 'mapbox.streets',
+ accessToken: 'your.mapbox.access.token'
+}).addTo(mymap);
+let points;
+try {
+ points = JSON.parse(document.querySelector('script[type="text/json"]').innerText)
+} catch(e) {
+ console.log("json error!")
+ points = []
+}
+points.forEach(point => {
+ /*
+ [
+ "Face Alignment by Local Deep Descriptor Regression",
+ "Rutgers University",
+ [
+ "Rutgers University",
+ "40.47913175",
+ "-74.431688684404",
+ "Rutgers Cook Campus - North, Biel Road, New Brunswick, Middlesex County, New Jersey, 08901, USA"
+ ]
+ ]
+ */
+
+ var marker = L.marker(point[2].slice(1,3)).addTo(mymap);
+ marker.bindPopup([
+ "<b>",point[0], "</b>",
+ "<br>",
+ point[1],
+ ].join(''))
+}) \ No newline at end of file