docs(district): update world data

This commit is contained in:
thinkinggis 2020-06-11 15:02:47 +08:00
parent c1ae9a4ebc
commit ddacfa2ce5
6 changed files with 122 additions and 180 deletions

View File

@ -190,6 +190,9 @@ scene.on('loaded', () => {
data: ProvinceData,
joinBy: [ 'NAME_CHN', 'name' ],
depth: 1,
provinceStroke: '#783D2D',
cityStroke: '#EBCCB4',
cityStrokeWidth: 1,
fill: {
color: {
field: 'NAME_CHN',

View File

@ -9,7 +9,7 @@ const scene = new Scene({
style: 'blank',
zoom: 0,
minZoom: 0,
maxZoom: 10
maxZoom: 5
})
});
scene.on('loaded', () => {

View File

@ -7,12 +7,12 @@ const dataLevel2: { [key: string]: any } = {
fill: {
type: 'pbf',
url:
'https://gw.alipayobjects.com/os/bmw-prod/d666a08d-fce1-48e2-913a-87d81772bcc9.bin',
'https://gw.alipayobjects.com/os/bmw-prod/e66cdd3f-cd41-4533-9746-d8fdbe0a0056.bin',
},
line: {
type: 'pbf',
url:
'https://gw.alipayobjects.com/os/bmw-prod/62f61f5f-cca7-4137-845d-13c8f9969664.bin',
'https://gw.alipayobjects.com/os/bmw-prod/f1b0fd97-ac90-4adb-b99c-01709e0e52c8.bin',
},
label: {
type: 'pbf',

View File

@ -197,7 +197,7 @@ export default class Country extends React.Component {
];
scene.on('loaded', () => {
const Layer = new CountryLayer(scene, {
visible: false,
visible: true,
data: ProvinceData,
joinBy: ['NAME_CHN', 'name'],
// label: {

View File

@ -23,254 +23,187 @@ export default class Country extends React.Component {
maxZoom: 4,
}),
});
const data = [
const ProvinceData = [
{
name: '湖北',
confirm: 16678,
suspect: 0,
heal: 533,
dead: 479,
name: '云南省',
code: 530000,
value: 17881.12,
},
{
name: '广东',
confirm: 895,
suspect: 0,
heal: 37,
dead: 0,
name: '黑龙江省',
code: 230000,
value: 16361.62,
},
{
name: '浙江',
confirm: 895,
suspect: 0,
heal: 65,
dead: 0,
name: '贵州省',
code: 520000,
value: 14806.45,
},
{
name: '河南',
confirm: 764,
suspect: 0,
heal: 41,
dead: 2,
name: '北京市',
code: 110000,
value: 30319.98,
},
{
name: '湖南',
confirm: 661,
suspect: 0,
heal: 35,
dead: 0,
name: '河北省',
code: 130000,
value: 36010.27,
},
{
name: '江西',
confirm: 548,
suspect: 0,
heal: 27,
dead: 0,
name: '山西省',
code: 140000,
value: 16818.11,
},
{
name: '安徽',
confirm: 530,
suspect: 0,
heal: 20,
dead: 0,
name: '吉林省',
code: 220000,
value: 15074,
},
{
name: '重庆',
confirm: 376,
suspect: 0,
heal: 15,
dead: 2,
name: '宁夏回族自治区',
code: 640000,
value: 3705.18,
},
{
name: '江苏',
confirm: 341,
suspect: 0,
heal: 13,
dead: 0,
name: '辽宁省',
code: 210000,
value: 25315.35,
},
{
name: '山东',
confirm: 307,
suspect: 0,
heal: 13,
dead: 0,
name: '海南省',
code: 460000,
value: 4832.05,
},
{
name: '四川',
confirm: 301,
suspect: 0,
heal: 23,
dead: 1,
name: '内蒙古自治区',
code: 150000,
value: 17289.22,
},
{
name: '北京',
confirm: 253,
suspect: 0,
heal: 24,
dead: 1,
name: '天津市',
code: 120000,
value: 18809.64,
},
{
name: '上海',
confirm: 243,
suspect: 0,
heal: 15,
dead: 1,
name: '新疆维吾尔自治区',
code: 650000,
value: 12199.08,
},
{
name: '福建',
confirm: 205,
suspect: 0,
heal: 7,
dead: 0,
name: '上海市',
code: 310000,
value: 32679.87,
},
{
name: '黑龙江',
confirm: 190,
suspect: 0,
heal: 7,
dead: 2,
name: '陕西省',
code: 610000,
value: 24438.32,
},
{
name: '陕西',
confirm: 165,
suspect: 0,
heal: 6,
dead: 0,
name: '甘肃省',
code: 620000,
value: 8246.07,
},
{
name: '广西',
confirm: 150,
suspect: 0,
heal: 10,
dead: 0,
name: '安徽省',
code: 340000,
value: 30006.82,
},
{
name: '河北',
confirm: 135,
suspect: 0,
heal: 4,
dead: 1,
name: '香港特别行政区',
code: 810000,
value: 0,
},
{
name: '云南',
confirm: 124,
suspect: 0,
heal: 5,
dead: 0,
name: '广东省',
code: 440000,
value: 97277.77,
},
{
name: '海南',
confirm: 91,
suspect: 0,
heal: 4,
dead: 1,
name: '河南省',
code: 410000,
value: 48055.86,
},
{
name: '辽宁',
confirm: 81,
suspect: 0,
heal: 3,
dead: 0,
name: '湖南省',
code: 430000,
value: 36425.78,
},
{
name: '山西',
confirm: 81,
suspect: 0,
heal: 4,
dead: 0,
name: '江西省',
code: 360000,
value: 21984.78,
},
{
name: '天津',
confirm: 69,
suspect: 0,
heal: 2,
dead: 1,
name: '四川省',
code: 510000,
value: 40678.13,
},
{
name: '贵州',
confirm: 64,
suspect: 0,
heal: 8,
dead: 0,
name: '广西壮族自治区',
code: 450000,
value: 20353.51,
},
{
name: '甘肃',
confirm: 57,
suspect: 0,
heal: 4,
dead: 0,
name: '江苏省',
code: 320000,
value: 92595.4,
},
{
name: '吉林',
confirm: 54,
suspect: 0,
heal: 1,
dead: 0,
name: '澳门特别行政区',
code: 820000,
value: null,
},
{
name: '内蒙古',
confirm: 42,
suspect: 0,
heal: 3,
dead: 0,
name: '浙江省',
code: 330000,
value: 56197.15,
},
{
name: '宁夏',
confirm: 34,
suspect: 0,
heal: 1,
dead: 0,
name: '山东省',
code: 370000,
value: 76469.67,
},
{
name: '新疆',
confirm: 32,
suspect: 0,
heal: 0,
dead: 0,
name: '青海省',
code: 630000,
value: 2865.23,
},
{
name: '香港',
confirm: 18,
suspect: 0,
heal: 0,
dead: 1,
name: '重庆市',
code: 500000,
value: 20363.19,
},
{
name: '青海',
confirm: 17,
suspect: 0,
heal: 3,
dead: 0,
name: '福建省',
code: 350000,
value: 35804.04,
},
{
name: '台湾',
confirm: 11,
suspect: 0,
heal: 0,
dead: 0,
name: '湖北省',
code: 420000,
value: 39366.55,
},
{
name: '澳门',
confirm: 10,
suspect: 0,
heal: 0,
dead: 0,
name: '西藏自治区',
code: 540000,
value: 1477.63,
},
{
name: '西藏',
confirm: 1,
suspect: 0,
heal: 0,
dead: 0,
name: '台湾省',
code: 710000,
value: null,
},
];
scene.on('loaded', () => {
const Layer = new CountryLayer(scene, {
data,
data: ProvinceData,
depth: 1,
joinBy: ['NAME_CHN', 'name'],
fill: {
scale: 'quantile',
color: {
field: 'confirm',
field: 'value',
values: [
'#feedde',
'#fdd0a2',
@ -299,7 +232,7 @@ export default class Country extends React.Component {
});
scene2.on('loaded', () => {
const Layer2 = new CountryLayer(scene2, {
data,
data: ProvinceData,
label: {
enable: false,
},
@ -307,10 +240,16 @@ export default class Country extends React.Component {
enable: false,
},
autoFit: false,
// label: {
// field: 'NAME_CHN',
// textAllowOverlap: true,
// },
depth: 1,
joinBy: ['NAME_CHN', 'name'],
fill: {
scale: 'quantile',
color: {
field: 'confirm',
field: 'value',
values: [
'#feedde',
'#fdd0a2',

View File

@ -27,7 +27,7 @@ export default class Country extends React.Component {
const Layer = new WorldLayer(scene, {
data: [],
bubble: {
enable: true,
enable: false,
color: {
field: 'NAME_CHN',
values: [