-
Notifications
You must be signed in to change notification settings - Fork 4
/
leaflet-control-gps-simple.html
40 lines (33 loc) · 1.31 KB
/
leaflet-control-gps-simple.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
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
<title>Leaflet.Control.Gps - Simple Example</title>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" />
<link rel="stylesheet" href="css/leaflet.css" />
<link rel="stylesheet" href="css/leaflet-gps.css" />
<link rel="stylesheet" href="css/leaflet-gps-style.css" />
<!--[if lt IE 9]> <script src="http:/dev.bowdenweb.com/a/js/html5.js"></script> <![endif]-->
<style>
</style>
<script></script>
</head>
<body>
<h3><a href="../">Leaflet.Control.Gps</a></h3>
<h4>Simple Example: <em>zoom on gps position</em></h4>
<div id="map"></div>
<br />
<small>
Using Chrome extension for testing:
<a href="https://chrome.google.com/webstore/detail/manual-geolocation/mfodligkojepnddfhkbkodbamcagfhlo">Manual Geolocation</a>
</small>
<script src="js/leaflet.js"></script>
<script src="js/leaflet-gps.js"></script>
<script>
var map = new L.Map('map', {zoom: 12, center: new L.latLng([41.575730,13.002411]) });
map.addLayer(new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png')); //base layer
map.addControl( new L.Control.Gps() );//inizialize control
</script>
<div id="copy">powered by <a href="mailto:[email protected]">Stefano Cudini</a></div>
</body>
</html>