forked from Esri/Leaflet.shapeMarkers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
44 lines (34 loc) · 1.24 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
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Leaflet.shapeMarkers demo</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<!-- Load Leaflet from CDN-->
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet-src.js"></script>
<!-- Load shapeMarkers from CDN -->
<script src="https://unpkg.com/[email protected]"></script>
<style>
body {margin:0;padding:0;}
#map {position: absolute;top:0;bottom:0;right:0;left:0;}
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = L.map('map').setView([45.526, -122.667], 13)
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
L.shapeMarkers.xMarker([45.5052, -122.6917], 50).addTo(map);
L.shapeMarkers.crossMarker([45.5470, -122.6984], 50, {
color: 'red'
}).addTo(map);
L.shapeMarkers.squareMarker([45.4952, -122.6450], 50, {
weight: 10,
color: 'green'
}).addTo(map);
</script>
</body>
</html>