mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-29 17:47:17 +08:00
feat(geomap): add basic layer
This commit is contained in:
parent
94a0403981
commit
eca3955dc2
@ -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: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user