diff --git a/examples/csv.html b/examples/csv.html index 65d41fd..d2eb6fb 100644 --- a/examples/csv.html +++ b/examples/csv.html @@ -3,403 +3,16 @@ - - -
-
-
- - +
Row: lat, lon, time, value

Filter zone

@@ -407,31 +20,6 @@
-
- -
- @@ -444,7 +32,6 @@ zoom: 6 }); - L.tileLayer('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap contributors, © CartoDB' }).addTo(map); @@ -539,32 +126,22 @@ torqueLayer.addTo(map); function handleFileSelect(evt) { + document.getElementById("file_selector").style.display = "none"; var file = evt.target.files[0]; Papa.parse(file, { complete: function (results) { for (var i = 1; i <= pointsToLoad && i < results.data.length; i++) { var point = results.data[i]; - torqueLayer.provider.addPoint(point[2], point[1], point[0], point[3]); - //torqueLayer.provider.addPoint(point[1], point[0], point[3], point[2]); + // lat, lon, time, value + torqueLayer.provider.addPoint(point[0], point[1], point[2], point[3]); } torqueLayer.provider.setReady(); - document.getElementById('control').style.visibility = "visible"; torqueLayer.play(); - } }); } document.getElementById('files').addEventListener('change', handleFileSelect, false); - - function handlePlayPause(evt) { - if (torqueLayer.isRunning()) { - torqueLayer.pause(); - } else { - torqueLayer.play(); - } - } - document.getElementById('control').addEventListener('click', handlePlayPause, false);