chaosc-cosmdisplay/views/index.jade

62 lines
2.3 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
for nr in [ 1,2,3]
2013-01-30 14:30:49 +00:00
div.cell
div.kasten
h3 Freakduino + Netrad SBM-20
table
tr
td Location:
td Montreal
tr
td Elevation:
td 8m
tr
td Latitude:
td 51.6693413745977
tr
td Longitude:
td -1.28627210855484
tr
td Update:
td 23 Jun 2012 08:01:47
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() {
loadMap(document.getElementById("map1"), -34.397, 150.644);
loadMap(document.getElementById("map2"), -34.397, 150.644);
loadMap(document.getElementById("map3"), -34.397, 150.644);
});
var socket = io.connect('http://localhost');
socket.on('news', function (data) {
console.log(data);
socket.emit('my other event', { my: 'data' });
2013-01-30 14:30:49 +00:00
});