-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.php
More file actions
28 lines (26 loc) · 756 Bytes
/
Copy pathsetup.php
File metadata and controls
28 lines (26 loc) · 756 Bytes
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
<?php include 'scripts/functions/main.php'; ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Spot Setup</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(onSuccess);
}
else {$('#demo').html('<strong>Geolocation is not supported by this browser.</strong>');}
var onSuccess = function showPosition(position)
{
$('#demo').html("Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude);
}
});
</script>
</head>
<body>
<div id="demo"></div>
<button onclick="getLocation()">do it</button>
</body>
</html>