修改驾驶仓地图

main
ihzero 2024-05-10 22:56:57 +08:00
parent b55d4403e3
commit 405a461709
4 changed files with 24 additions and 17 deletions

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,7 @@ const convertData = (data) => {
var geoCoordMap = []
chinaMap.features.forEach((item) => {
geoCoordMap[item.properties.name] = item.properties.centroid ?? item.properties.center
if(item.properties.name=='河北省' ) console.log(item.properties.centroid)
// if(item.properties.name=='' ) console.log(item.properties.centroid)
})
var res = []
for (var i = 0; i < data.length; i++) {
@ -56,6 +56,9 @@ const chatInit = () => {
tooltip: {
trigger: 'item',
formatter: function (params) {
if(params.name=="南海诸岛") return ''
if (typeof params.value[2] == 'undefined') {
return params.name + ' : ' + params.value
} else {
@ -74,18 +77,18 @@ const chatInit = () => {
color: 'rgb(249, 249, 249)', //
},
regions: [
{
name: "南海诸岛",
itemStyle: {
//
normal: {
opacity: 0, // 0
}
},
label: {
show: false //
}
}
// {
// name: "",
// itemStyle: {
// //
// normal: {
// opacity: 0, // 0
// }
// },
// label: {
// show: false //
// }
// }
],
itemStyle: {
areaColor: '#24CFF4',
@ -162,7 +165,11 @@ const chatInit = () => {
fontSize: 14,
},
formatter(value) {
return value.data.value[2]
if (typeof value.data.value[2] == 'undefined') {
return 0
}
return value.data.value[2] ?? 0
},
},
itemStyle: {

View File

@ -107,8 +107,8 @@ function __SetOption(data) {
let option = {
grid: {
top: '10px',
left: '20px',
right: '30px',
left: '10px',
right: '40px',
bottom: 0,
},
yAxis: [

BIN
驾驶舱.zip 100644

Binary file not shown.