From 022d3390313cdf2caa7edbc775e0fadae9b328de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B1=A1=E6=95=B0?= Date: Mon, 9 Dec 2024 17:20:28 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E4=BF=AE=E6=94=B9=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E4=BF=A1=E6=81=AF=E5=92=8C=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 3 --- src/Map/Component/Marker.tsx | 2 +- src/Map/Component/Polyline.tsx | 3 +-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 90194a8..7b2d6ab 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,9 +8,6 @@ "typescript.tsdk": "node_modules/typescript/lib", "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, - "[typescript]": { - "editor.defaultFormatter": "vscode.typescript-language-features" - }, "[typescriptreact]": { "editor.defaultFormatter": "vscode.typescript-language-features" } diff --git a/src/Map/Component/Marker.tsx b/src/Map/Component/Marker.tsx index 6692ec4..8505f02 100644 --- a/src/Map/Component/Marker.tsx +++ b/src/Map/Component/Marker.tsx @@ -3,7 +3,7 @@ import { useScene } from '@antv/larkmap'; import { useEffect, useState } from 'react'; import type { Map } from '../../types/map'; import { setMapContext, setMarkers } from '../../utils/map'; -// 更新地图视野 +// 渲染标记点 export default (props: Map) => { const scene = useScene(); const [layers, setLayers] = useState([]); diff --git a/src/Map/Component/Polyline.tsx b/src/Map/Component/Polyline.tsx index 0d20834..e42130a 100644 --- a/src/Map/Component/Polyline.tsx +++ b/src/Map/Component/Polyline.tsx @@ -3,7 +3,7 @@ import { useScene } from '@antv/larkmap'; import { useEffect, useState } from 'react'; import type { Map } from '../../types/map'; import { setPolyline } from '../../utils/map'; -// 更新地图视野 +// 渲染线图层 export default (props: Map) => { const scene = useScene(); const [layers, setLayers] = useState([]); @@ -16,7 +16,6 @@ export default (props: Map) => { if (!props.polyline) return; const lineLayers = setPolyline(props.polyline || []); removeLayers(); - console.log('lineLayers', lineLayers); lineLayers.forEach((item) => { scene.addLayer(item); });