chaosc-cosmdisplay/views/index.jade

64 lines
2.1 KiB
Plaintext
Raw Normal View History

2013-01-30 14:30:49 +00:00
extends layout
block head
script(src="/socket.io/socket.io.js")
2013-01-30 14:30:49 +00:00
block content
div.container
div.row
2013-02-12 23:12:44 +00:00
for nr in streams
2013-01-30 14:30:49 +00:00
div.cell
div.kasten
h3 Freakduino + Netrad SBM-20
table
tr
td Location:
2013-02-12 23:12:44 +00:00
td --
2013-01-30 14:30:49 +00:00
tr
td Elevation:
2013-02-12 23:12:44 +00:00
td --
2013-01-30 14:30:49 +00:00
tr
td Latitude:
2013-02-12 23:12:44 +00:00
td --
2013-01-30 14:30:49 +00:00
tr
td Longitude:
2013-02-12 23:12:44 +00:00
td --
2013-01-30 14:30:49 +00:00
tr
td Update:
2013-02-12 23:12:44 +00:00
td --
2013-01-30 14:30:49 +00:00
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")
2013-01-30 14:38:55 +00:00
2013-01-30 14:30:49 +00:00
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() {
2013-02-12 23:12:44 +00:00
});
var socket = io.connect('http://localhost');
2013-02-12 23:12:44 +00:00
socket.on('gotstream', function(data) {
console.log("got stream: " + data);
});
socket.on('changedvalue', function(data) {
console.log("changedvalue: " + data);
2013-01-30 14:30:49 +00:00
});