Added heatmap output (via JavaScript).

This commit is contained in:
Markus Birth 2018-01-14 22:21:54 +01:00
parent 875055cf17
commit acd94668af
Signed by: mbirth
GPG Key ID: A9928D7A098C3A9A
111 changed files with 185 additions and 0 deletions

4
maps/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/assets/*.js
/assets/*.map
/node_modules/
/map_data.js

22
maps/Makefile Normal file
View File

@ -0,0 +1,22 @@
CC=node_modules/.bin/coffee
ASSETDIR=assets
SRC=$(wildcard $(ASSETDIR)/*.coffee)
BUILD=$(SRC:%.coffee=%.js)
all: coffee
# coffeescript files
coffee: $(BUILD)
$(ASSETDIR)/%.js: $(ASSETDIR)/%.coffee
$(CC) -m -c $<
# cleanup
.PHONY: clean
clean:
-rm $(BUILD)

32
maps/assets/main.coffee Normal file
View File

@ -0,0 +1,32 @@
window.nextState = ->
if window.keyidx > window.data["keys"].length
console.log "ERROR: No more keys."
return false
stamp = window.data["keys"][window.keyidx]
for i in window.data[stamp][1]
window.carstate.push i
for i in window.data[stamp][0]
ridx = window.carstate.indexOf i
window.carstate.splice ridx, 1
time = new Date stamp * 1000
window.map.attributionControl.setPrefix time.toString()
window.heatmap.redraw()
window.keyidx++
setTimeout 'nextState();', 333
document.addEventListener 'DOMContentLoaded', (event) ->
console.log 'Data: %o', window.data
berlin_topleft = L.latLng 52.575463, 13.182306
berlin_botrght = L.latLng 52.425506, 13.549104
berlin = L.latLngBounds berlin_topleft, berlin_botrght
window.map = L.map('map', {maxBounds: berlin}).setView berlin.getCenter(), 12
window.tiles = L.tileLayer('berlin/{z}/{x}/{y}.png', {minZoom: 11, maxZoom: 13, bounds: berlin, opacity: 0.4}).addTo map
window.keyidx = 0
window.carstate = []
window.heatmap = L.heatLayer(window.carstate, {radius: 15}).addTo map
setTimeout 'nextState();', 500

3
maps/assets/style.css Normal file
View File

@ -0,0 +1,3 @@
#map {
height: 800px;
}

BIN
maps/berlin/11/1098/671.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
maps/berlin/11/1098/672.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

BIN
maps/berlin/11/1099/671.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
maps/berlin/11/1099/672.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
maps/berlin/11/1100/671.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

BIN
maps/berlin/11/1100/672.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
maps/berlin/11/1101/671.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
maps/berlin/11/1101/672.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Some files were not shown because too many files have changed in this diff Show More