forked from netconstructor/am-tower-locator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
133 lines (124 loc) · 5.72 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>AM Tower Locator</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<meta http-equiv="X-Frame-Options" content="deny">
<script src="js/mustache.js"></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.css' rel='stylesheet' />
<!--[if lte IE 8]>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.ie.css' rel='stylesheet' >
<![endif]-->
<script src='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.js'></script>
<link href="css/am-tower-locator.css" rel="stylesheet" media="screen">
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
<style id="antiClickjack">body{display:none !important;}</style>
<script type="text/javascript">
if (self == top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>
</head>
<body>
<div class="intro">
<div class="intro-inner">
<div class="intro-body">
<div class="warning">
<p>Alpha - Not Official</p>
</div>
<img src="img/fcc-logo.png" id="fcc-logo" title="FCC" height="28" width="34" />
<h1>AM Tower Locator</h1>
<h4>Enter the latitude and longitude, <strong>in decimal degrees</strong>, and height, <strong>in meters</strong>, of your tower to determine if you need to notify any AM Stations prior to building.</h4>
</div>
<form class="form-inline" id="locator">
<fieldset>
<div class="control-group">
<label>Latitude</label>
<input class="input-small required latitude" id="lat" name="lat" tabindex="1" type="text" placeholder="Latitude">
<div class="help"></div>
</div>
<div class="control-group">
<label>Longitude</label>
<input class="input-small required longitude" id="long" name="long" tabindex="2" type="text" placeholder="Longitude">
<div class="help"></div>
</div>
<div class="control-group">
<label>Tower Height</label>
<input class="input-small required num gtzero" id="height" name="height" tabindex="3" type="text" placeholder="Height">
<div class="help"></div>
</div>
<br /><button id="search" name="search" type="button" class="btn" tabindex="4" value="Search">Search</button> <button class="btn btn-reset" tabindex="5" type="reset" value="Reset">Reset</button>
</fieldset>
</form>
<p class="muted">
Need help converting to decimal degrees?<br />
<a href="http://transition.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html" target="_blank" title="Lat/Long Converter">Lat/Long Converter</a>
</p>
</div>
</div>
<div class="content">
<div class="content-inner">
<div id="map"></div>
<div class="stations" id="stations">
<h4>The AM Tower Locator is a tool that allows you to determine whether the construction of a proposed tower requires you to notify AM stations prior to construction.</h4>
<h4>This notification process is required by FCC rules.</h4>
<h4>For more information about the rules, including the formulas used for calculation and the notification process, please read the <a href="http://transition.fcc.gov/Daily_Releases/Daily_Business/2013/db0816/FCC-13-115A1.pdf">FCC’s order</a>.</h4>
</div>
</div>
</div>
<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/validate.js" type="text/javascript"></script>
<script src="js/stations.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
// create the bg map
var bgmap = L.mapbox.map('map', 'fcc.map-fd8wksyc', {zoomControl: false}).setView([39.833333, -98.583333], 4);
bgmap.dragging.disable();
bgmap.touchZoom.disable();
bgmap.doubleClickZoom.disable();
bgmap.scrollWheelZoom.disable();
// form submission
$("#locator").submit(function() {
$("#map").css("display", "none");
$('#stations').html("");
$('html,body').animate( {
scrollTop: $(".content").offset().top
}, 'slow');
// loading screen
$.get('templates/stations.html', function(templates) {
var template = $(templates).filter('#stations-loading').html();
var html = Mustache.to_html(template);
$('#stations').html(html);
});
var dist = 3; // meters
// api url
var stationsURL = "http://transition.fcc.gov/fcc-bin/amq?list=8&nad=83&alat=" + $("#lat").val() + "&alon=" + $("#long").val() + "&dist=" + dist;
// call to get stations
$.ajax({
url: stationsURL,
dataType: 'jsonp',
jsonpCallback: 'callback',
jsonp: 'callback',
success: function(stations) {
stations_output(bgmap, stations);
},
error: function(xhr, status, error) {
$.get('templates/stations.html', function(templates) {
var template = $(templates).filter('#stations-api-error').html();
var html = Mustache.to_html(template);
$("#stations").html(html);
});
}
});
return false;
}); // end submit
}); // end document ready
</script>
</body>
</html>