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'