更新 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) {
|
export async function loadJsonPointFeature(layerId, color, geojson,text_field, mapId) {
|
||||||
// console.log("layerId: ",layerId);
|
|
||||||
|
|
||||||
let source = Vue.config.maps[mapId].getSource(layerId);
|
let source = Vue.config.maps[mapId].getSource(layerId);
|
||||||
if (!source) {
|
if (!source) {
|
||||||
Vue.config.maps[mapId].addSource(layerId, {
|
Vue.config.maps[mapId].addSource(layerId, {
|
||||||
|
|
@ -490,7 +488,7 @@ export async function loadJsonPointFeature(layerId, color, geojson, mapId) {
|
||||||
'icon-image': 'dot.png',
|
'icon-image': 'dot.png',
|
||||||
'icon-size': 0.5,
|
'icon-size': 0.5,
|
||||||
// get the title name from the source's "title" property
|
// get the title name from the source's "title" property
|
||||||
'text-field': ['get', 'sample_name'],
|
'text-field': ['get', text_field],
|
||||||
'text-font': [
|
'text-font': [
|
||||||
'Open Sans Semibold',
|
'Open Sans Semibold',
|
||||||
'Arial Unicode MS Bold'
|
'Arial Unicode MS Bold'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue