From 5ab81bda4a7f129bc72cf657a3841e3e8e995281 Mon Sep 17 00:00:00 2001 From: flisowna Date: Tue, 3 Jan 2023 19:26:44 +0100 Subject: [PATCH] Revert "geodata: add tooltip to each marker on hover - works, WIP: show attachments, qrcode on tooltip" This reverts commit 94148f02f60ee5381e6a936c5bab83360c8a9b31. --- packages/nc-gui/components/smartsheet/Map.vue | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Map.vue b/packages/nc-gui/components/smartsheet/Map.vue index 4914190b22..c46f186883 100644 --- a/packages/nc-gui/components/smartsheet/Map.vue +++ b/packages/nc-gui/components/smartsheet/Map.vue @@ -82,7 +82,7 @@ const expandedFormOnRowIdDlg = computed({ }, }) -const addMarker = (lat: number, long: number, row: RowType, popupContent: string) => { +const addMarker = (lat: number, long: number, row: RowType) => { if (markersClusterGroupRef.value == null) { throw new Error('Map is null') } @@ -90,10 +90,6 @@ const addMarker = (lat: number, long: number, row: RowType, popupContent: string expandForm(row) }) markersClusterGroupRef.value?.addLayer(newMarker) - - if (newMarker) { - newMarker.bindTooltip(popupContent) - } } const resetZoomAndCenterBasedOnLocalStorage = () => { @@ -182,23 +178,13 @@ watch([formattedData, mapMetaData, markersClusterGroupRef], () => { } const primaryGeoDataValue = row.row[primaryGeoDataColumnTitle] - if (primaryGeoDataValue == null) { return } - const listItems = Object.entries(row.row) - .map(([key, val]) => { - const prettyVal = val !== null && (typeof val === 'object' || Array.isArray(val)) ? JSON.stringify(val) : val - return `
  • ${key}:
    ${prettyVal}
  • ` - }) - .join('') - - const popupContent = `` - const [lat, long] = primaryGeoDataValue.split(';').map(parseFloat) - addMarker(lat, long, row, popupContent) + addMarker(lat, long, row) }) syncCount() })