-<div id="maps-container" oncontextmenu="return false;"></div>
-<script>
-$(function() {
- $.getJSON("nodes.json", function(all_nodes) {
- var sites = [], maps = {}, nodes = {};
-
- $.each(all_nodes, function(i, node) {
- Senslab.normalize(node);
- var site = node.site;
- if (site) {
- if ($.inArray(site, sites) == -1) {
- sites.push(site);
- nodes[site] = [];
- }
- nodes[site].push(node);
- } else {
- console.warn("Node " + node + " has no site");
- }
- });
-
- $container = $('#maps-container');
-
- $.each(sites, function(i, site) {
- var $div = $("<div />").appendTo($container);
- maps[site] = new Senslab.Map($div);
- maps[site].addNodes(nodes[site]);
- });
- });
-});
-</script>
\ No newline at end of file