修改驾驶仓地图
parent
b55d4403e3
commit
405a461709
File diff suppressed because one or more lines are too long
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@ function __SetOption(data) {
|
|||
let option = {
|
||||
grid: {
|
||||
top: '10px',
|
||||
left: '20px',
|
||||
right: '30px',
|
||||
left: '10px',
|
||||
right: '40px',
|
||||
bottom: 0,
|
||||
},
|
||||
yAxis: [
|
||||
|
|
|
|||
Loading…
Reference in New Issue