forked from muyiwexy/Leafletmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
47 lines (44 loc) · 1.39 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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Document</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""/>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
crossorigin=""></script>
<style>
body {
margin: 0;
padding: 0;
}
#map {
width: 100%;
height: 95vh;
}
</style>
</head>
<body>
<div id="map"></div>
</body>
<script>
var map_init = L.map('map',{
center:[ 6.465422, 3.3792],
zoom:13
});
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map_init);
var marker = L.marker([9.0820, 8.6753]).addTo(map_init);
var Basemaps = {
"OSM": osm
}
var Overlaymaps = {
"Marker": marker
}
L.control.layers(Basemaps, Overlaymaps).addTo(map_init);
</script>
</html>