diff --git a/apps/client/src/widgets/collections/geomap/map.tsx b/apps/client/src/widgets/collections/geomap/map.tsx index 1a0f642cc..8fe102210 100644 --- a/apps/client/src/widgets/collections/geomap/map.tsx +++ b/apps/client/src/widgets/collections/geomap/map.tsx @@ -84,9 +84,14 @@ export default function Map({ coordinates, zoom, layerName, viewportChanged, chi useEffect(() => { mapRef.current && mapRef.current.on("click", onClick) }, [ mapRef, onClick ]); - return
- - {children} - -
; + return ( +
+ + {children} + +
+ ); } diff --git a/apps/client/src/widgets/view_widgets/geo_view/index.ts b/apps/client/src/widgets/view_widgets/geo_view/index.ts index 43c6f70d5..e663a449d 100644 --- a/apps/client/src/widgets/view_widgets/geo_view/index.ts +++ b/apps/client/src/widgets/view_widgets/geo_view/index.ts @@ -39,26 +39,12 @@ export default class GeoView extends ViewMode { args.$parent.append(this.$root); } - async renderList() { - this.renderMap(); - return this.$root; - } - async renderMap() { const layerName = this.parentNote.getLabelValue("map:style") ?? ; - if (this.parentNote.hasLabel("map:scale")) { L.control.scale().addTo(map); } - - this.$container.toggleClass("dark", !!layerData.isDarkTheme); - - layer.addTo(map); - - this.map = map; - - this.#onMapInitialized(); } async #onMapInitialized() { @@ -68,7 +54,6 @@ export default class GeoView extends ViewMode { } const isEditable = !this.isReadOnly; - map.on("click", (e) => this.#onMapClicked(e)) map.on("contextmenu", (e) => openMapContextMenu(this.parentNote.noteId, e, isEditable)); if (isEditable) {