-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
48 lines (35 loc) · 1.15 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
<!DOCTYPE html>
<html>
<head>
<title> Map #1</title>
<link rel="stylesheet" href="main.css"/>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
</head>
<body>
<H1>Example</H1>
<div id="map"></div>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script>
//initialize the map
var map = L.map('map').setView([55.67918143, 12.59149075], 14);
//Create baselayer - tiles
var backgroundMap = L.tileLayer('https://stamen-tiles-b.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg',{
attribution: '<a href="http://openstreetmap.org">OpenStreetMap</a>contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
maxZoom: 19
}
);
var center = L.marker([55.67918143, 12.59149075]).addTo(map);
var popup = "City center";
center.bindPopup(popup);
//add a circle
var circle = L.circle([55.67918143, 12.59149075], 450, {
color: 'red',
fillColor: '#f03',
fillOpacity: 0.2
}).addTo(map);
backgroundMap.addTo(map);
</script>
</body>
</html>
Map used
https://stamen-tiles-b.a.ssl.fastly.net/watercolor