-
Notifications
You must be signed in to change notification settings - Fork 4
/
leaflet-control-gps-circle-style.html
42 lines (34 loc) · 1.41 KB
/
leaflet-control-gps-circle-style.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
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
<title>Leaflet.Control.Gps - Styling circle</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>Styling circle: <em>customize circle cursor style</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
var newStyle = {radius: 25, weight:6, color: '#ee0', fill: true, opacity:0.8};
map.addControl( new L.Control.Gps({style: newStyle }) );//inizialize control
</script>
<div id="copy">powered by <a href="mailto:[email protected]">Stefano Cudini</a></div>
</body>
</html>