-
Notifications
You must be signed in to change notification settings - Fork 0
/
1.html
executable file
·97 lines (89 loc) · 3.69 KB
/
1.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
<!DOCTYPE html>
<head>
<script src="http://code.jquery.com/jquery-2.0.2.min.js"></script>
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="css/flat-ui.css" rel="stylesheet">
<script src="js/bootstrap.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
<meta charset="utf-8"/>
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px;
}
#map-canvas {
height: 50%;
}
</style>
<script>
var map;
function initialize() {
var mapOptions = {
zoom: 6
};
map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
// Try HTML5 geolocation
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
var pos = new google.maps.LatLng(position.coords.latitude,
position.coords.longitude);
var infowindow = new google.maps.InfoWindow({
map: map,
position: pos,
content: "You're here!"
});
map.setCenter(pos);
}, function() {
handleNoGeolocation(true);
});
} else {
// Browser doesn't support Geolocation
handleNoGeolocation(false);
}
}
function handleNoGeolocation(errorFlag) {
if (errorFlag) {
var content = 'Error: The Geolocation service failed.';
} else {
var content = 'Error: Your browser doesn\'t support geolocation.';
}
var options = {
map: map,
position: new google.maps.LatLng(60, 105),
content: content
};
var infowindow = new google.maps.InfoWindow(options);
map.setCenter(options.position);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map-canvas"></div>
<div style=" color: white;">
<p style="padding-left: 3%; margin-bottom: 0.5%">What's going on around you?</p>
<p style="font-size: 0.8em; padding-left: 3%; background-color: #34495e; margin-bottom: 0.5%; -moz-border-radius: 4px; -webkit-border-radius: 4px;">Help build bird feeders for the park! <a href="project.html">Join</a></p>
<p style="font-size: 0.8em; padding-left: 3%; background-color: #34495e; margin-bottom: 0.5%; -moz-border-radius: 4px; -webkit-border-radius: 4px;">Bake-off! All yummy products donated to the homeless shelter. <a href="project.html">Join</a></p>
<p style="font-size: 0.8em; padding-left: 3%; background-color: #34495e; margin-bottom: 0.5%; -moz-border-radius: 4px; -webkit-border-radius: 4px;">Let's paint a mural on the parking garage wall. <a href="project.html">Join</a></p>
<p style="font-size: 0.8em; padding-left: 3%; background-color: #34495e; margin-bottom: 0.5%; -moz-border-radius: 4px; -webkit-border-radius: 4px;">Help turn an abandoned lot into a garden. <a href="project.html">Join</a></p>
<p style="font-size: 0.8em; padding-left: 3%; background-color: #34495e; margin-bottom: 5%; -moz-border-radius: 4px; -webkit-border-radius: 4px;">Have ideas on how to make Evanston more bike-friendly? Let's talk. <a href="project.html">Join</a></p>
</div>
<button class="btn btn-default btn-wide" id = "explore" style="background-color: #1ABC9C; margin-left: 3%; margin-right: 3%; width: 45%">
Explore
</button>
<button class="btn btn-default btn-wide" id = "create" style="background-color: #1ABC9C; margin-right: 3%; width: 45%">
Create
</button>
<script>
$("#explore").on("click", function() {
window.location = "2b.html";
});
$("#create").on("click", function() {
window.location = "create.html";
});
</script>
</body>
</html>