更新 geojson 数据可视化逻辑
This commit is contained in:
parent
bc32b1aaae
commit
b885a919ad
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in New Issue