-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
62 lines (59 loc) · 1.45 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
<!DOCTYPE html>
<html>
<head>
<title>AquaBot Locator</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
}
</style>
<script src="jquery.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
<script>
var map;
var marker
var ll
function get(){
$.ajax({url:"get.php"}).done(function(data){
ll = data.split(',')
if(data && data != "" && data != '""'){
marker.setPosition( new google.maps.LatLng( ll[0], ll[1] ) );
}
});
}
function initialize() {
var myLatlng = new google.maps.LatLng(40.415408, -74.882153);
var mapOptions = {
zoom: 18,
center: myLatlng,
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.SATELLITE,
draggable: false,
zoomControl: false,
scrollwheel: false,
disableDoubleClickZoom: true
}
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
//map.setMapTypeId(google.maps.MapTypeId.SATELLITE);
point = new google.maps.LatLng(40.415097, -74.879728)
marker = new google.maps.Marker({
position: point,
map: map,
title: 'AquaBot'
});
}
google.maps.event.addDomListener(window, 'load', initialize);
$(document).ready(function(e) {
get();
setInterval(get, 1000);
});
</script>
</head>
<body>
<div id="map-canvas"></div>
</body>
</html>