From eca3955dc26de297473b077d5bb13e85d92c8f4a Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 20 Jan 2025 19:20:59 +0200 Subject: [PATCH] feat(geomap): add basic layer --- src/public/app/widgets/geo_map.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/public/app/widgets/geo_map.ts b/src/public/app/widgets/geo_map.ts index b53e4ded9..04fe8965f 100644 --- a/src/public/app/widgets/geo_map.ts +++ b/src/public/app/widgets/geo_map.ts @@ -17,6 +17,7 @@ const TPL = `\ ` +//@ts-nocheck export default class GeoMapWidget extends NoteContextAwareWidget { constructor(widgetMode: "type") { @@ -30,10 +31,15 @@ export default class GeoMapWidget extends NoteContextAwareWidget { library_loader.requireLibrary(library_loader.LEAFLET) .then(() => { - //@ts-ignore - L.map($container[0], { + const map = L.map($container[0], { }); + + map.setView([51.505, -0.09], 13); + + L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { + attribution: '© OpenStreetMap contributors' + }).addTo(map); }); }