修改监控字体颜色

dianlixunjian
刘妍 2024-08-08 15:14:29 +08:00
parent 802fa91206
commit 35e9ffd026
1 changed files with 12 additions and 11 deletions

View File

@ -63,7 +63,6 @@
},
},
layers: [
{
id: 'dianzi-biaozhu',
type: 'raster',
@ -93,7 +92,8 @@
layout: {
visibility: 'none',
},
},{
},
{
id: 'dianzi',
type: 'raster',
source: 'dianzi',
@ -537,14 +537,13 @@
*
* */
function handlerChangeLayerVisible(layerName, checked) {
if(map.getLayer(layerName)){
if (map.getLayer(layerName)) {
if (checked) {
map.setLayoutProperty(layerName, 'visibility', 'visible');
} else {
map.setLayoutProperty(layerName, 'visibility', 'none');
}
}
}
//
@ -742,7 +741,9 @@
visibility: 'none',
},
paint: {
'text-color': '#fff',
'text-color': '#041B36',
'text-halo-color': '#fff',
'text-halo-width': 2,
},
});
@ -753,10 +754,10 @@
}
//
function handlerUpdateUavLayer(uavLayerGeoJson){
if(map.getSource("uavSource")){
map.getSource("uavSource").setData(uavLayerGeoJson);
}else{
function handlerUpdateUavLayer(uavLayerGeoJson) {
if (map.getSource('uavSource')) {
map.getSource('uavSource').setData(uavLayerGeoJson);
} else {
map.loadImage('/videosupervision/uav.png', function (error, image) {
if (error) throw error;
if (!map.hasImage('uavIcon')) {
@ -786,7 +787,7 @@
},
paint: {
'text-color': '#fff',
'text-halo-color':"#000",
'text-halo-color': '#000',
'text-halo-width': 1,
},
});
@ -799,7 +800,7 @@
handlerChangeLayerVisible, //
handlerLoadPolygon,
handlerLocation, //
handlerUpdateUavLayer, //
handlerUpdateUavLayer, //
});
</script>
<style type="less" scoped>