From b885a919adc1b29397f1fd8c4a8516f978b75434 Mon Sep 17 00:00:00 2001 From: hym Date: Thu, 2 Apr 2026 14:30:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20geojson=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=8F=AF=E8=A7=86=E5=8C=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/vector-layer-utils.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils/vector-layer-utils.js b/src/utils/vector-layer-utils.js index 0411470..3bf72de 100644 --- a/src/utils/vector-layer-utils.js +++ b/src/utils/vector-layer-utils.js @@ -464,9 +464,7 @@ export async function loadJsonLineFeature(layerId, color, geojson, mapId) { } } -export async function loadJsonPointFeature(layerId, color, geojson, mapId) { - // console.log("layerId: ",layerId); - +export async function loadJsonPointFeature(layerId, color, geojson,text_field, mapId) { let source = Vue.config.maps[mapId].getSource(layerId); if (!source) { Vue.config.maps[mapId].addSource(layerId, { @@ -490,7 +488,7 @@ export async function loadJsonPointFeature(layerId, color, geojson, mapId) { 'icon-image': 'dot.png', 'icon-size': 0.5, // get the title name from the source's "title" property - 'text-field': ['get', 'sample_name'], + 'text-field': ['get', text_field], 'text-font': [ 'Open Sans Semibold', 'Arial Unicode MS Bold'