-
Notifications
You must be signed in to change notification settings - Fork 5
/
helpme.html
54 lines (52 loc) · 2.61 KB
/
helpme.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
<!doctype html>
<html lang="en">
<head>
<title>BhEEM Saves!</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-responsive.min.css">
<link rel=stylesheet href=css/bheem.css>
<link rel=stylesheet href=css/rescue.css>
</head>
<body>
<div class="map-container"></div>
<div class="rescue-cta-container rescue-type-container">
<form action="/medical">
<input type=submit name=rescueType value=medical class="btn btn-danger btn-rescue-cta btn-rescue-type glyphicon glyphicon-medical"></input><br>
</form>
<form action="/police">
<input type=submit name=rescueType value=police class="btn btn-danger btn-rescue-cta btn-rescue-type glyphicon glyphicon-police"></input><br>
</form>
<form action="/disaster">
<input type=submit name=rescueType value=disaster class="btn btn-danger btn-rescue-cta btn-rescue-type glyphicon glyphicon-fire"></input>
</form>
</div>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script>
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position){
//var mapcanvas = document.createElement('div');
//mapcanvas.classList.add('map-canvas');
var mc = document.querySelector('.map-container');
//mc.appendChild(mapcanvas);
var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
/*var myOptions = {
zoom: 15,
center: latlng,
mapTypeControl: false,
panControl: false,
zoomControl: false,
scaleControl: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.querySelector(".map-canvas"), myOptions);*/
var url = "http://maps.googleapis.com/maps/api/staticmap?center="+position.coords.latitude+","+ position.coords.longitude+"&zoom=14&scale=2&size="+mc.clientWidth+"x"+mc.clientHeight+"&sensor=true";
var img = document.createElement("img");
img.src=url;
img.classList.add('map-canvas');
mc.appendChild(img);
});
}
</script>
</body>
</html>