-
Notifications
You must be signed in to change notification settings - Fork 1
/
smith_web.html
59 lines (44 loc) · 1.75 KB
/
smith_web.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
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Test</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
</head>
<body>
<div style="width:600px; height:400px" id="map"></div>
<p>Date: <input type="text" id="datepicker" /></p>
</body>
<script type='text/javascript'>
$(function() {
$( "#datepicker" ).datepicker
({
dateFormat:'@'
});
});
$( "#datepicker" ).change(function(){
var date = $( "#datepicker" ).val() / 1000;
alert(date);
});
function doStuff (lat, long, time) {
alert(lat + "," + long + "," + time);
}
var map = L.map('map').setView([51.505, -0.09], 13);
L.tileLayer('http://{s}.tile.cloudmade.com/75a115656b1a440fa08012d6f85ff8c2/997/256/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://cloudmade.com">CloudMade</a>'
}).addTo(map);
var popup = L.popup();
function onMapClick(e) {
popup
.setLatLng(e.latlng)
.setContent("You clicked the map at " + e.latlng.toString())
.openOn(map);
doStuff(e.latlng.lat, e.latlng.lng, "2312489248-234");
}
map.on('click', onMapClick);
</script>
</html>