22 lines
460 B
TypeScript
22 lines
460 B
TypeScript
import add from "./lib/add";
|
|
|
|
import { Map } from "maplibre-gl";
|
|
|
|
console.log(add(1, 2));
|
|
|
|
const map = new Map({
|
|
style:
|
|
"https://api.maptiler.com/maps/019be805-c88e-7c8b-9850-bc704d72e604/style.json?key=8nmgHEIZQiIgqQj3RZNa",
|
|
container: "map",
|
|
zoom: 15,
|
|
});
|
|
|
|
map.on("load", () => {
|
|
navigator.geolocation.getCurrentPosition((position) => {
|
|
map.panTo({
|
|
lat: position.coords.latitude,
|
|
lng: position.coords.longitude,
|
|
});
|
|
});
|
|
});
|