add js types

This commit is contained in:
Matteo Rosati
2026-02-11 12:45:04 +01:00
parent 01fd047568
commit a3ef6cf84c
5 changed files with 100 additions and 9 deletions

View File

@@ -0,0 +1,16 @@
/** @type {import('maplibre-gl')} */
const maplibregl = window.maplibregl;
var map = new maplibregl.Map({
container: "map",
style:
"https://api.maptiler.com/maps/019be805-c88e-7c8b-9850-bc704d72e604/style.json?key=8nmgHEIZQiIgqQj3RZNa",
center: [-74.5, 40],
zoom: 9,
});
map.on("load", () => {
navigator.geolocation.getCurrentPosition((position) => {
// map.panTo(...)
});
});