64 lines
2.1 KiB
Plaintext
64 lines
2.1 KiB
Plaintext
extends layout
|
|
|
|
block head
|
|
script(src="/socket.io/socket.io.js")
|
|
|
|
block content
|
|
|
|
div.container
|
|
div.row
|
|
for nr in streams
|
|
div.cell
|
|
div.kasten
|
|
h3 Freakduino + Netrad SBM-20
|
|
table
|
|
tr
|
|
td Location:
|
|
td --
|
|
tr
|
|
td Elevation:
|
|
td --
|
|
tr
|
|
td Latitude:
|
|
td --
|
|
tr
|
|
td Longitude:
|
|
td --
|
|
tr
|
|
td Update:
|
|
td --
|
|
|
|
div.mapbox(id="map#{nr}")
|
|
|
|
//img(src="https://api.cosm.com/v2/feeds/64590/datastreams/microsievertsperhour.png?width=200&height=100&colour=%23f15a24&duration=5minutes&show_axis_labels=true&detailed_grid=true&scale=auto&timezone=Berlin")
|
|
|
|
|
|
|
|
script(type="text/javascript",src="http://maps.googleapis.com/maps/api/js?sensor=false&key=AIzaSyDZ5gUZumNEZOHyRLs4HWJEJ-mDeEkWInU")
|
|
|
|
script(type="text/javascript")
|
|
|
|
function loadMap(container, lat, long) {
|
|
var latlong = new google.maps.LatLng(-34.397, 150.644);
|
|
var map = new google.maps.Map(container, { center: latlong,
|
|
zoom: 8,
|
|
disableDefaultUI: true,
|
|
mapTypeId: google.maps.MapTypeId.ROADMAP });
|
|
var marker = new google.maps.Marker({ position: latlong, map: map});
|
|
}
|
|
|
|
$(function() {
|
|
|
|
});
|
|
|
|
var socket = io.connect('http://localhost');
|
|
|
|
socket.on('gotstream', function(data) {
|
|
console.log("got stream: " + data);
|
|
});
|
|
|
|
socket.on('changedvalue', function(data) {
|
|
console.log("changedvalue: " + data);
|
|
});
|
|
|