-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathlpfmpoint.html
executable file
·148 lines (129 loc) · 4.79 KB
/
lpfmpoint.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>FCC - Evolution of Low Power FM Stations</title>
<link rel="shortcut icon" href="//cartodb.com/favicon/favicon_32x32.ico" />
<link rel="stylesheet" href="css/cartodb.css">
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="lib/wax.g.js"></script>
<script type="text/javascript" src="lib/cartodb-gmapsv3.js"></script>
<script type="text/javascript" src="lib/dat.gui.min.js"></script>
<script type="text/javascript" src="lib/underscore-min.js"></script>
<script type="text/javascript" src="lib/backbone.js"></script>
<script type="text/javascript" src="lib/class.js"></script>
<script type="text/javascript" src="lib/backbone.cartodb.js"></script>
<script type="text/javascript" src="src/canvas_tile_layer.js"></script>
<script type="text/javascript" src="src/grid_layer.js"></script>
<script type="text/javascript" src="src/torque.js"></script>
<script type="text/javascript">
var gui;
var map;
var torque = null;
var endOfPlay=false;
function initialize() {
// initialise the google map
map = new google.maps.Map(document.getElementById('map_canvas'), {
//center:new google.maps.LatLng(39.5,-98),
center:new google.maps.LatLng(44,-98),
zoom:4,
mapTypeId:google.maps.MapTypeId.SATELLITE,
mapTypeControl:false,
minZoom:1,
zoomControl: true,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.NORMAL
},
streetViewControl: false,
panControl: false
});
var map_style = {};
map_style.google_maps_customization_style = [
{
stylers:[
{ invert_lightness:true },
{ weight:1 },
{ saturation:-100 },
{ lightness:-40 }
]
},
{
elementType:"labels",
stylers:[
{ visibility:"simplified" }
]
}
];
var Soft = function () {
this.Soft = function () {
map.setMapTypeId(google.maps.MapTypeId.ROADMAP);
map.setOptions({styles:map_style.google_maps_customization_style});
}
}
map.setMapTypeId(google.maps.MapTypeId.ROADMAP);
map.setOptions({styles:map_style.google_maps_customization_style});
var TorqueOptions = {
user:'fcc',
table:'lpfm_point',
column:'service_da',
steps:400,
resolution:4,
autoplay:false,
cumulative:true,
clock:true,
fps:6,
fitbounds:false,
blendmode:'lighter',
trails:false,
point_type:'circle',
cellsize:1,
subtitles:true
}
Torque(function (env) {
Torque.app = new env.app.Instance();
torque = new Torque.app.addLayer(map, TorqueOptions);
Torque.env = env;
});
//map.setCenter(new google.maps.LatLng(40,-98));
}
function replay(){
torque.pause();
}
$(document).ready(function(){
$('#btn-control').click(function(e) {
e.preventDefault();
$(this).toggleClass('play').toggleClass('pause');
if (endOfPlay){ //a hack at start over, need to call it three times
replay();
replay();
replay();
endOfPlay=false;
}
else{
replay();
}
});
var sub = "<dl><dt>2000</dt>"
+ "<dd>Commission authorizes the creation of the LPFM service (MM Docket 99-25)</dd>"
+ "<dt>April 2001</dt>"
+ "<dd>First LPFM construction permits issued</dd>"
+ "<dt>July 2001</dt>"
+ "<dd>First LPFM station goes on air</dd></dl>";
$('.torque_subs').html(sub);
});
</script>
</head>
<body onload="initialize()">
<h2 id="hd-pgSubTitle">Federal Communications Commission</h2>
<h1 id="hd-pgTitle">Evolution of LPFM Stations</h1>
<div id="btnControls">
<a id="btn-control" class="btn play" href="#void"><span>Play or Pause</span></a>
</div>
<div id="map_canvas"></div>
<div class="torque_subs"></div>
<div class="torque_time"></div>
<a class="cartodb_logo" href="http://www.cartodb.com" target="_blank">CartoDB</a>
</body>
</html>