From 1ab97f3cc4645bc44e92765825d611c6e4f36280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=98=E7=AB=8B=E6=A0=87?= <2658037827@qq.com> Date: Fri, 8 Dec 2023 17:27:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B9=A6=E8=AE=B0=E7=9C=8B?= =?UTF-8?q?=E6=9D=BF=E5=9C=B0=E5=9B=BE=E7=BB=9F=E8=AE=A1=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataBoard/cpts/sjkb-map/index.vue | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/views/dataBoard/cpts/sjkb-map/index.vue b/src/views/dataBoard/cpts/sjkb-map/index.vue index f984cbebe..4f995540c 100644 --- a/src/views/dataBoard/cpts/sjkb-map/index.vue +++ b/src/views/dataBoard/cpts/sjkb-map/index.vue @@ -931,7 +931,7 @@ export default { let pointData = data.map(item => item.data) pointData = pointData.reduce((a, b) => a.concat(b), []); - pointData = pointData.filter(item => item.num > 0) + pointData = pointData.filter(item => item.num > 0 && !isNaN(item.latitude)&& !isNaN(item.longitude)) console.log(pointData, 'pointData') numPointMarker1 = new PointLayer({ name: 'numPointMarker1', @@ -953,15 +953,14 @@ export default { numPointMarker2 = new PointLayer({ name: 'numPointMarker2', zIndex: 21, - minZoom: 2, - maxZoom: 19 - }).source(pointData, { - parser: { - type: 'json', - x: 'longitude', - y: 'latitude' - } }) + .source(pointData, { + parser: { + type: 'json', + x: 'longitude', + y: 'latitude' + } + }) .shape('num', 'text') .color('#fff') .size(18)