Add map scale widget.

This commit is contained in:
Dan Albert 2021-05-12 23:30:54 -07:00
parent 4e498e6932
commit 45f0c3c85f
2 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,7 @@
<link
rel="stylesheet"
href="https://unpkg.com/leaflet-groupedlayercontrol@0.6.1/dist/leaflet.groupedlayercontrol.min.css"
crossorigin="sha384-jTaPj8/7LfdZXicEJ/SUWan4gkbYw6lXyoRUNPMmNV3fYVfBzHJK8wD6A8Djh+3A">
crossorigin="">
<script
src="https://unpkg.com/leaflet-groupedlayercontrol@0.6.1/dist/leaflet.groupedlayercontrol.min.js"
integrity="sha384-XAr1poM2RCR9/QQFki7ylrGSdmvYE0NuHghuRuxb/k9zJQA53y6qR5te5jJRZlcL"

View File

@ -20,6 +20,7 @@ const Colors = Object.freeze({
});
var map = L.map("map").setView([0, 0], 3);
L.control.scale({ maxWidth: 200 }).addTo(map);
// https://esri.github.io/esri-leaflet/api-reference/layers/basemap-layer.html
var baseLayers = {