forked from UnlockedLab/wheel-chair-accessible-google-maps
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathiframe.html
78 lines (64 loc) · 2.99 KB
/
iframe.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
<!DOCTYPE html><!--HTML5 doctype-->
<html>
<head>
<title>Wheel Chair Accessible Transit Demo</title>
<!--<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script>-->
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?libraries=places"></script>
<script src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<script src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<script src="assets/QueryString.js"></script>
<script src="assets/jquery.geocomplete.min.js"></script>
<script src="assets/jquery.set_input_value.js"></script>
<script src="assets/jquery.history.js"></script>
<script src="assets/main.js"></script>
<link rel="stylesheet" href="assets/main.css">
<script>
$(document).ready( function() {
loadMap();
var startInput = $("#startAddress");
var endInput = $("#endAddress");
// attach any directions to the inputs
// to use add to url: ?STARTINPUTNAME=ADDRESS1&ENDINPUTNAME=ADDRESS2
startInput.set_input_value();
endInput.set_input_value();
// attach jquery google address complete wrapper
startInput.geocomplete();
endInput.geocomplete();
// if address values already exist, retreive and display the route
if( all_values_exist(startInput,endInput) ) {
// get the directions already supplied in the url
console.log('values exist on page load, retreiving directions');
return getDirections();
}
});
</script>
</head>
<body>
<div class = "iframe-search draggable">
<label for="startAddress" class="hidden">start address</label>
<input id="startAddress" type="text" value="" placeholder="Enter start address"/>
<label for="endAddress" class="hidden">end address</label>
<input id="endAddress" type="text" value="" placeholder="Enter end address"/>
<input type="submit" name="submit" value="submit" onClick="updateHistory(startAddress,endAddress); return getDirections();"/>
</div>
<div id='map-canvas'></div>
<div id='messages' onclick = "stationToggle()">
<span class='messageHeader'> Stations with Limited Access </span>
</div>
<script>
$(function() {
$(".draggable").draggable();
});
</script>
</body>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-1943290-12', 'jimsmiley.us');
ga('send', 'pageview');
</script>
</html>