leaflet.superbar
Version:
Leaflet layer controler bar
28 lines (24 loc) • 874 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Leaflet Map</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
</head>
<body>
<div id="map" style="height: 500px"></div>
<script src="dist/superbar.js"></script>
<script>
// Create the map
const map = L.map("map").setView([45.1885, 5.7245], 13);
// Add a tile layer to the map
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution:
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
}).addTo(map);
// Initialize the SuperBar plugin with the map
SuperBar.initializeApp(map);
</script>
</body>
</html>