-
Notifications
You must be signed in to change notification settings - Fork 51
/
quickstart-dev.html
57 lines (45 loc) · 1.59 KB
/
quickstart-dev.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
49
50
51
52
53
54
55
56
57
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Esri Leaflet Vector Quickstart (DEV TEST)</title>
<!-- Load Leaflet from CDN or local node_modules -->
<link rel="stylesheet" href="../node_modules/leaflet/dist/leaflet.css" />
<script src="../node_modules/leaflet/dist/leaflet.js"></script>
<!--
Load maplibre-gl from CDN or local node_modules for dev/debug purposes because it is not bundled in Esri Leaflet Vector's dev/debug code
(note also that loading maplibre-gl.css is not necessary)
-->
<script src="../node_modules/maplibre-gl/dist/maplibre-gl.js"></script>
<!-- Load Esri Leaflet and Esri Leaflet Vector plugin dev/debug version -->
<script src="../node_modules/esri-leaflet/dist/esri-leaflet.js"></script>
<script src="../dist/esri-leaflet-vector-debug.js"></script>
<!-- But note that maplibre-gl is bundled in Esri Leaflet Vector's production code -->
<!-- <script src="../dist/esri-leaflet-vector.js"></script> -->
<style>
html,
body {
margin: 0;
}
#map {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
console.table({
"L.version": L.version,
"L.esri.VERSION": L.esri.VERSION,
"L.esri.Vector.VERSION": L.esri.Vector.VERSION,
"maplibregl.version": maplibregl.version
});
var map = L.map("map", {}).setView([34.0522, -118.2437], 15);
L.esri.Vector.vectorBasemapLayer("ArcGIS:Streets", {
apiKey: "< YOUR VALID API KEY HERE >"
}).addTo(map);
</script>
</body>
</html>