Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(collections/map): reintroduce zoom buttons
Elian Doran3041cb088c90
diff --git a/apps/client/src/widgets/collections/geomap/map.tsx b/apps/client/src/widgets/collections/geomap/map.tsxindex edac08e053..fe61774dd0 100644--- a/apps/client/src/widgets/collections/geomap/map.tsx+++ b/apps/client/src/widgets/collections/geomap/map.tsx@@ -1,6 +1,6 @@import "maplibre-gl/dist/maplibre-gl.css";-import maplibregl from "maplibre-gl";+import maplibregl, { NavigationControl } from "maplibre-gl";import { ComponentChildren, createContext, RefObject } from "preact";import { useEffect, useImperativeHandle, useRef } from "preact/hooks";@@ -85,6 +85,12 @@ export default function Map({ coordinates, zoom, layerData, viewportChanged, chirenderWorldCopies: false});+ // Add navigation buttons.+ mapInstance.addControl(new NavigationControl({+ showCompass: false,+ showZoom: true+ }), "top-left");+mapRef.current = mapInstance;// Load async vector style if needed.