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 58 59 60 61 62 63 64 65 66 67 68
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- MapLibre GL -->
<script src="https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.js"></script>
<link href="https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.css" rel="stylesheet" />
<script type="module" src="index.js" defer></script>
<!-- @LIVE-RELOAD@ -->
<style>
html,
body {
margin: 0;
padding: 0;
}
#mapContainer {
position: absolute;
width: 100%;
height: 100%;
}
#buttonContainer {
position: absolute;
top: 6px;
left: 6px;
right: 6px;
}
input[type="radio"].button {
display: none;
}
input[type="radio"].button+label {
display: inline-block;
font-family: sans-serif;
padding: 0.5em 1em;
border-radius: 5px;
background-color: gray;
color: white;
cursor: pointer;
}
input[type="radio"]:checked.button+label {
background-color: #007bff;
}
</style>
</head>
<body>
<div id="mapContainer"></div>
<div id="buttonContainer">
<input type="radio" class="button variant" name="variant" id="variant-light" data-variant="gnome-maps-light"
checked />
<label class="btn btn-secondary" for="variant-light">Light</label>
<input type="radio" class="button variant" name="variant" id="variant-dark" data-variant="gnome-maps-dark" />
<label class="btn btn-secondary" for="variant-dark">Dark</label>
</div>
</body>
</html>
|