|
|
|
|
@ -80,7 +80,7 @@
|
|
|
|
|
minzoom: 0,
|
|
|
|
|
maxzoom: 18,
|
|
|
|
|
layout: {
|
|
|
|
|
visibility: 'none',
|
|
|
|
|
visibility: 'visible',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
@ -339,7 +339,7 @@
|
|
|
|
|
},
|
|
|
|
|
paint: {
|
|
|
|
|
'fill-color': '#ffffff',
|
|
|
|
|
'fill-opacity': 0.8 /* 透明度 */,
|
|
|
|
|
'fill-opacity': 1 /* 透明度 */,
|
|
|
|
|
},
|
|
|
|
|
layout: {
|
|
|
|
|
visibility: 'visible',
|
|
|
|
|
@ -536,14 +536,16 @@
|
|
|
|
|
* 行政区划:countyLayer
|
|
|
|
|
*
|
|
|
|
|
* */
|
|
|
|
|
function handlerChangeLayerVisible(layerName, checked) {
|
|
|
|
|
if (map.getLayer(layerName)) {
|
|
|
|
|
if (checked) {
|
|
|
|
|
map.setLayoutProperty(layerName, 'visibility', 'visible');
|
|
|
|
|
} else {
|
|
|
|
|
map.setLayoutProperty(layerName, 'visibility', 'none');
|
|
|
|
|
function handlerChangeLayerVisible(layers, checked) {
|
|
|
|
|
layers?.forEach((item,index)=>{
|
|
|
|
|
if (map.getLayer(item)) {
|
|
|
|
|
if (checked) {
|
|
|
|
|
map.setLayoutProperty(item, 'visibility', 'visible');
|
|
|
|
|
} else {
|
|
|
|
|
map.setLayoutProperty(item, 'visibility', 'none');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 切换县区
|
|
|
|
|
@ -655,8 +657,8 @@
|
|
|
|
|
handlerLoadMaskLayer();
|
|
|
|
|
loadMonitorLayer();
|
|
|
|
|
loadFuFeiLayer();
|
|
|
|
|
getHangFeiAreaData();
|
|
|
|
|
getHangFeiPlanData();
|
|
|
|
|
getHangFeiAreaData();
|
|
|
|
|
emits('onload');
|
|
|
|
|
map.on('click', (e) => {
|
|
|
|
|
var center = map.getCenter(); // 获取当前视图中心点
|
|
|
|
|
@ -779,7 +781,7 @@
|
|
|
|
|
source: 'uavSource',
|
|
|
|
|
layout: {
|
|
|
|
|
'icon-image': 'uavIcon',
|
|
|
|
|
'icon-size': 1,
|
|
|
|
|
'icon-size': 0.8,
|
|
|
|
|
'text-field': ['get', 'account'],
|
|
|
|
|
'text-size': 14,
|
|
|
|
|
'text-font': ['Open Sans Semibold', 'Arial Unicode MS Bold'],
|
|
|
|
|
@ -907,17 +909,48 @@
|
|
|
|
|
data: geojson,
|
|
|
|
|
});
|
|
|
|
|
map.addLayer({
|
|
|
|
|
id: 'hangfeiarea',
|
|
|
|
|
id: 'hangfeiareaLine',
|
|
|
|
|
type: 'line',
|
|
|
|
|
source: 'hangfeiAreaSource',
|
|
|
|
|
paint: {
|
|
|
|
|
'line-color': '#6F7FF4', // 设置线的颜色
|
|
|
|
|
'line-color': '#e37575', // 设置线的颜色
|
|
|
|
|
'line-width': 3, // 设置线的宽度
|
|
|
|
|
},
|
|
|
|
|
layout:{
|
|
|
|
|
"visibility":"none"
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
map.addLayer({
|
|
|
|
|
id: 'hangfeiareaFill',
|
|
|
|
|
type: 'fill',
|
|
|
|
|
source: 'hangfeiAreaSource',
|
|
|
|
|
paint: {
|
|
|
|
|
'fill-color': '#e37575',
|
|
|
|
|
'fill-opacity': 0.3
|
|
|
|
|
},
|
|
|
|
|
layout:{
|
|
|
|
|
"visibility":"none"
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
map.addLayer({
|
|
|
|
|
'id': 'hangfeiareaLable',
|
|
|
|
|
'type': 'symbol',
|
|
|
|
|
'source': 'hangfeiAreaSource',
|
|
|
|
|
'layout': {
|
|
|
|
|
'text-field': ['get', 'xz'],
|
|
|
|
|
'text-font': ['Open Sans Bold', 'Arial Unicode MS Bold'],
|
|
|
|
|
'text-size': 12,
|
|
|
|
|
'text-anchor': 'center',
|
|
|
|
|
"visibility":"none"
|
|
|
|
|
},
|
|
|
|
|
'paint': {
|
|
|
|
|
// 'text-color': '#000000'
|
|
|
|
|
'text-color': '#041B36',
|
|
|
|
|
'text-halo-color': '#fff',
|
|
|
|
|
'text-halo-width': 2,
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 航飞规划
|
|
|
|
|
@ -936,7 +969,7 @@
|
|
|
|
|
data: geojson,
|
|
|
|
|
});
|
|
|
|
|
map.addLayer({
|
|
|
|
|
id: 'hangfeiplan',
|
|
|
|
|
id: 'hangfeiplanLine',
|
|
|
|
|
type: 'line',
|
|
|
|
|
source: 'hangfeiPlanSource',
|
|
|
|
|
paint: {
|
|
|
|
|
@ -947,6 +980,36 @@
|
|
|
|
|
"visibility":"none"
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
map.addLayer({
|
|
|
|
|
id: 'hangfeiplanFill',
|
|
|
|
|
type: 'fill',
|
|
|
|
|
source: 'hangfeiPlanSource',
|
|
|
|
|
paint: {
|
|
|
|
|
'fill-color': '#6F7FF4',
|
|
|
|
|
'fill-opacity': 0.5
|
|
|
|
|
},
|
|
|
|
|
layout:{
|
|
|
|
|
"visibility":"none"
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
map.addLayer({
|
|
|
|
|
'id': 'hangfeiplanLable',
|
|
|
|
|
'type': 'symbol',
|
|
|
|
|
'source': 'hangfeiPlanSource',
|
|
|
|
|
'layout': {
|
|
|
|
|
'text-field': ['get', 'Name'],
|
|
|
|
|
'text-font': ['Open Sans Bold', 'Arial Unicode MS Bold'],
|
|
|
|
|
'text-size': 12,
|
|
|
|
|
'text-anchor': 'center',
|
|
|
|
|
"visibility":"none"
|
|
|
|
|
},
|
|
|
|
|
'paint': {
|
|
|
|
|
// 'text-color': '#000000'
|
|
|
|
|
'text-color': '#041B36',
|
|
|
|
|
'text-halo-color': '#fff',
|
|
|
|
|
'text-halo-width': 2,
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 抛出函数
|
|
|
|
|
|