Merge branch 'District' of github.com:antvis/L7 into District

This commit is contained in:
thinkinggis 2020-05-18 21:01:47 +08:00
commit de0fedb7e7
3 changed files with 185 additions and 7 deletions

View File

@ -2,6 +2,178 @@
import { Scene } from '@antv/l7';
import { CountryLayer } from '@antv/l7-district';
import { Mapbox } from '@antv/l7-maps';
const ProvinceData = [
{
name: '云南省',
code: 530000,
value: 17881.12
},
{
name: '黑龙江省',
code: 230000,
value: 16361.62
},
{
name: '贵州省',
code: 520000,
value: 14806.45
},
{
name: '北京市',
code: 110000,
value: 30319.98
},
{
name: '河北省',
code: 130000,
value: 36010.27
},
{
name: '山西省',
code: 140000,
value: 16818.11
},
{
name: '吉林省',
code: 220000,
value: 15074
},
{
name: '宁夏回族自治区',
code: 640000,
value: 3705.18
},
{
name: '辽宁省',
code: 210000,
value: 25315.35
},
{
name: '海南省',
code: 460000,
value: 4832.05
},
{
name: '内蒙古自治区',
code: 150000,
value: 17289.22
},
{
name: '天津市',
code: 120000,
value: 18809.64
},
{
name: '新疆维吾尔自治区',
code: 650000,
value: 12199.08
},
{
name: '上海市',
code: 310000,
value: 32679.87
},
{
name: '陕西省',
code: 610000,
value: 24438.32
},
{
name: '甘肃省',
code: 620000,
value: 8246.07
},
{
name: '安徽省',
code: 340000,
value: 30006.82
},
{
name: '香港特别行政区',
code: 810000,
value: 0
},
{
name: '广东省',
code: 440000,
value: 97277.77
},
{
name: '河南省',
code: 410000,
value: 48055.86
},
{
name: '湖南省',
code: 430000,
value: 36425.78
},
{
name: '江西省',
code: 360000,
value: 21984.78
},
{
name: '四川省',
code: 510000,
value: 40678.13
},
{
name: '广西壮族自治区',
code: 450000,
value: 20353.51
},
{
name: '江苏省',
code: 320000,
value: 92595.4
},
{
name: '澳门特别行政区',
code: 820000,
value: null
},
{
name: '浙江省',
code: 330000,
value: 56197.15
},
{
name: '山东省',
code: 370000,
value: 76469.67
},
{
name: '青海省',
code: 630000,
value: 2865.23
},
{
name: '重庆市',
code: 500000,
value: 20363.19
},
{
name: '福建省',
code: 350000,
value: 35804.04
},
{
name: '湖北省',
code: 420000,
value: 39366.55
},
{
name: '西藏自治区',
code: 540000,
value: 1477.63
},
{
name: '台湾省',
code: 710000,
value: null
}
];
const scene = new Scene({
id: 'map',
map: new Mapbox({
@ -31,6 +203,12 @@ scene.on('loaded', () => {
'#a63603'
]
}
},
popup: {
enable: true,
Html: props => {
return `<span>${props.NAME_CHN}</span>`;
}
}
});
});

View File

@ -116,7 +116,7 @@
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0",
"tslint-plugin-prettier": "^1.3.0",
"tslint-react": "^5.0.0",
"tslint-react": "4.1.0",
"typescript": "^3.7.0-beta",
"webpack": "^4.17.1",
"webpack-cli": "^3.1.0",

View File

@ -25552,12 +25552,12 @@ tslint-plugin-prettier@^1.3.0:
eslint-plugin-prettier "^2.2.0"
tslib "^1.7.1"
tslint-react@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-5.0.0.tgz#d0ae644e8163bdd3e134012e9353094904e8dd44"
integrity sha512-/IbcSmoBPlFic8kQaRfQ4knTY4mivwo5LVzvozvX6Dyu2ynEnrh1dIcR2ujjyp/IodXqY/H5GbxFxSMo/Kf2Hg==
tslint-react@4.1.0:
version "4.1.0"
resolved "https://registry.npmjs.org/tslint-react/-/tslint-react-4.1.0.tgz#7153b724a8cfbea52423d0ffa469e8eba3bcc834"
integrity sha512-Y7CbFn09X7Mpg6rc7t/WPbmjx9xPI8p1RsQyiGCLWgDR6sh3+IBSlT+bEkc0PSZcWwClOkqq2wPsID8Vep6szQ==
dependencies:
tsutils "^3.17.1"
tsutils "^3.9.1"
tslint@^5.11.0:
version "5.20.1"
@ -25585,7 +25585,7 @@ tsutils@^2.29.0:
dependencies:
tslib "^1.8.1"
tsutils@^3.17.1:
tsutils@^3.17.1, tsutils@^3.9.1:
version "3.17.1"
resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==