From 7a661cd1cdc26b39fc1148b092e297d950fb80c6 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Mon, 25 Nov 2024 12:35:45 +0800 Subject: [PATCH] =?UTF-8?q?style(=E5=9B=BE=E8=A1=A8):=20=E8=81=94=E5=8A=A8?= =?UTF-8?q?=E5=88=B0=E7=AC=A6=E5=8F=B7=E5=9C=B0=E5=9B=BE=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E4=BD=8D=E7=BD=AE=E8=81=9A=E7=84=A6=E5=88=B0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/js/panel/charts/map/symbolic-map.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/map/symbolic-map.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/map/symbolic-map.ts index a3be048dc5..221f27fd33 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/map/symbolic-map.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/map/symbolic-map.ts @@ -106,6 +106,18 @@ export class SymbolicMap extends L7ChartView { if (basicStyle.autoFit === false) { center = [basicStyle.mapCenter.longitude, basicStyle.mapCenter.latitude] } + // 联动时,聚焦到数据点,多个取第一个 + if ( + chart.chartExtRequest?.linkageFilters?.length && + xAxis?.length === 2 && + chart.data?.tableRow.length + ) { + // 经度 + const lng = chart.data?.tableRow?.[0][chart.xAxis[0].dataeaseName] + // 纬度 + const lat = chart.data?.tableRow?.[0][chart.xAxis[1].dataeaseName] + center = [lng, lat] + } const chartObj = drawOption.chartObj as unknown as L7Wrapper let scene = chartObj?.getScene() if (!scene) {