Add map controls
Show zoom and compass buttons, a scale bar and a fullscreen button.
Code
Replace YOUR_API_KEY with a key from your Gebeta dashboard, save the file as index.html and open it in a browser.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Add map controls</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500&display=swap" />
<script src="https://tiles.gebeta.app/static/v3/gebeta-maps.umd.js"></script>
<style>
body { margin: 0; font: 13px/1.4 Geist, system-ui, sans-serif; color: #161616; }
#map { position: absolute; inset: 0; }
</style>
</head>
<body>
<div id="map"></div>
<script>
const { FullscreenControl, ScaleControl } = window.gebeta;
const gebeta = new GebetaMaps({ apiKey: "YOUR_API_KEY" });
const map = gebeta.init({
container: "map",
center: [38.7578, 9.0192],
zoom: 13,
navigationControl: true,
navigationControlPosition: "top-right",
});
map.addControl(new ScaleControl(), "bottom-left");
map.addControl(new FullscreenControl(), "top-left");
</script>
</body>
</html>