fix(source & line model): 支持带洞的边形绘制边界

This commit is contained in:
thinkinggis 2020-08-07 21:18:50 +08:00
parent 7b02173bcb
commit 8647b9f050
17 changed files with 1076 additions and 98 deletions

View File

@ -23,7 +23,7 @@ order: 2
- visible 地图是否可见
- joinBy 数据关联,属性数据如何内部空间数据关联绑定 目前支持 NAME_CHN,adcode 字段连接
对照表 `Array [string, string]` 第一个值为空间数据字段,第二个为传入数据字段名
- depth 数据显示层级 0国家级1:省级2: 市级3线
- depth 数据显示层级 0国家级1:省级2: 市级3
- showBorder `boolean` 是否显示国界线,默认显示,不建议不显示
- simplifyTolerance 数据抽稀容差,默认不抽稀 `boolean | number` 单位为度,一度约 111km数字越大精度越低。参考设置数据 0.01
- label 标注配置项 支持常量,不支持数据映射

View File

@ -24,7 +24,7 @@ order: 2
- joinBy 数据关联,属性数据如何内部空间数据关联绑定 目前支持 NAME_CHN,adcode 字段连接
- simplifyTolerance 数据抽稀容差,默认不抽稀 `boolean | number` 单位为度,一度约 111km数字越大精度越低。参考设置数据 0.01
对照表 `Array [string, string]` 第一个值为空间数据字段,第二个为传入数据字段名
- depth 数据显示层级 0国家级1:省级2: 市级3线
- depth 数据显示层级 0国家级1:省级2: 市级3
- label 标注配置项 支持常量,不支持数据映射
- enable `boolean` 是否显示标注

View File

@ -83,7 +83,7 @@ District 支持下面几种图
- data `Array` 属性数据用于可视化渲染
- joinBy 数据关联,属性数据如何内部空间数据关联绑定 目前支持 NAME_CHN,adcode 字段连接
对照表 `Array [string, string]` 第一个值为空间数据字段,第二个为传入数据字段名
- depth 数据显示层级 0国家级1:省级2: 市级3线
- depth 数据显示层级 0国家级1:省级2: 市级3
- label 标注配置项 支持常量,不支持数据映射
- enable `boolean` 是否显示标注
- color 标注字体颜色 常量

View File

@ -42,7 +42,7 @@ District 支持下面几种图
- visible 地图是否可见
- joinBy 数据关联,属性数据如何内部空间数据关联绑定 目前支持 NAME_CHN,adcode 字段连接
对照表 `Array [string, string]` 第一个值为空间数据字段,第二个为传入数据字段名
- depth 数据显示层级 0国家级1:省级2: 市级3线
- depth 数据显示层级 0国家级1:省级2: 市级3
- showBorder `boolean` 是否显示国界线,默认显示,不建议不显示
- simplifyTolerance 数据抽稀容差,默认不抽稀 `boolean | number` 单位为度一度约111km数字越大精度越低。参考设置数据 0.01
- label 标注配置项 支持常量,不支持数据映射

View File

@ -42,7 +42,7 @@ District 支持下面几种图
对照表 `Array [string, string]` 第一个值为空间数据字段,第二个为传入数据字段名
- showBorder `boolean` 是否显示国界线,默认显示,不建议不显示
- simplifyTolerance 数据抽稀容差,默认不抽稀 `boolean | number` 单位为度一度约111km数字越大精度越低。参考设置数据 0.01
- depth 数据显示层级 0国家级1:省级2: 市级3线
- depth 数据显示层级 0国家级1:省级2: 市级3
- label 标注配置项 支持常量,不支持数据映射
- enable `boolean` 是否显示标注
- color 标注字体颜色 常量

View File

@ -41,7 +41,7 @@ District 支持下面几种图
- data `Array` 属性数据用于可视化渲染
- joinBy 数据关联,属性数据如何内部空间数据关联绑定 目前支持 NAME_CHN,adcode 字段连接
对照表
- depth 数据显示层级 0国家级1:省级2: 市级3线
- depth 数据显示层级 0国家级1:省级2: 市级3
- label 标注配置项 支持常量,不支持数据映射
- enable `boolean` 是否显示标注
- color 标注字体颜色 常量

View File

@ -41,7 +41,7 @@ District 支持下面几种图
- data `Array` 属性数据用于可视化渲染
- joinBy 数据关联,属性数据如何内部空间数据关联绑定 目前支持 NAME_CHN,adcode 字段连接
对照表
- depth 数据显示层级 0国家级1:省级2: 市级3线
- depth 数据显示层级 0国家级1:省级2: 市级3
- label 标注配置项 支持常量,不支持数据映射
- enable `boolean` 是否显示标注
- color 标注字体颜色 常量

View File

@ -71,15 +71,18 @@ export function PointImageTriangulation(feature: IEncodeFeature) {
export function LineTriangulation(feature: IEncodeFeature) {
const { coordinates } = feature;
let path = coordinates as number[][][] | number[][];
if (Array.isArray(path[0][0])) {
path = coordinates[0] as number[][];
if (!Array.isArray(path[0][0])) {
path = [coordinates] as number[][][];
}
const line = new ExtrudePolyline({
dash: true,
join: 'bevel', //
});
const linebuffer = line.extrude(path as number[][]);
path.forEach((item: any) => {
// 处理带洞的多边形
line.extrude(item as number[][]);
});
const linebuffer = line.complex;
return {
vertices: linebuffer.positions, // [ x,y,z, distance, miter,total ]
indices: linebuffer.indices,

View File

@ -41,6 +41,12 @@ export interface IExtrudeLineOption {
thickness: number;
}
export default class ExtrudePolyline {
public complex: {
positions: number[];
indices: number[];
normals: number[];
startIndex: number;
};
private join: string;
private cap: string;
private miterLimit: number;
@ -58,17 +64,15 @@ export default class ExtrudePolyline {
this.miterLimit = opts.miterLimit || 10;
this.thickness = opts.thickness || 1;
this.dash = opts.dash || false;
}
public extrude(points: number[][]) {
const complex: {
positions: number[];
indices: number[];
normals: number[];
} = {
this.complex = {
positions: [],
indices: [],
normals: [],
startIndex: 0,
};
}
public extrude(points: number[][]) {
const complex = this.complex;
if (points.length <= 1) {
return complex;
}
@ -77,7 +81,8 @@ export default class ExtrudePolyline {
this.normal = null;
this.totalDistance = 0;
const total = points.length;
for (let i = 1, count = 0; i < total; i++) {
let count = complex.startIndex;
for (let i = 1; i < total; i++) {
const last = points[i - 1] as vec2;
const cur = points[i] as vec2;
const next = i < points.length - 1 ? points[i + 1] : null;
@ -93,7 +98,7 @@ export default class ExtrudePolyline {
complex.positions[i * 6 + 5] = this.totalDistance;
}
}
complex.startIndex = complex.positions.length / 6;
return complex;
}
private segment(

View File

@ -2,7 +2,6 @@ export * from './component/SceneContext';
export { default as AMapScene } from './component/AMapScene';
export { default as MapboxScene } from './component/MapboxScene';
export { default as Scene } from './component/Scene';
export * from './component/Layer';
export { default as Control } from './component/Control';
export { default as CustomControl } from './component/CustomControl';
export * from './component/Layer';

View File

@ -48,23 +48,13 @@ export default function geoJSON(
(currentFeature: Feature<Geometries, Properties>, featureIndex: number) => {
const coord = getCoords(currentFeature);
const id = featureIndex;
if (currentFeature.geometry.type === 'MultiPolygon') {
coord.forEach((coor) => {
const dataItem = {
...currentFeature.properties,
coordinates: [coor],
_id: id,
};
resultData.push(dataItem);
});
} else {
const dataItem: IParseDataItem = {
...currentFeature.properties,
coordinates: coord,
_id: id,
};
resultData.push(dataItem);
}
const dataItem: IParseDataItem = {
...currentFeature.properties,
coordinates: coord,
_id: id,
};
resultData.push(dataItem);
// }
},
);
return {

View File

@ -55,7 +55,6 @@ export default class Country extends React.Component {
},
},
});
console.log(this.drillDown);
});
}

View File

@ -16,11 +16,12 @@ export default class HexagonLayerDemo extends React.Component {
public async componentDidMount() {
const scene = new Scene({
id: 'map',
map: new GaodeMap({
map: new Mapbox({
pitch: 0,
style: 'blank',
center: [140.067171, 36.26186],
zoom: 0,
zoom: 3,
maxZoom: 0,
}),
});
@ -41,7 +42,7 @@ export default class HexagonLayerDemo extends React.Component {
},
transforms: [
{
type: 'hexagon',
type: 'grid',
size: 200000,
field: 'v',
method: 'sum',
@ -51,7 +52,7 @@ export default class HexagonLayerDemo extends React.Component {
.size('sum', (value) => {
return value * 20;
})
.shape('hexagonColumn')
.shape('squareColumn')
.color(
'count',
[

View File

@ -1,5 +1,6 @@
import { storiesOf } from '@storybook/react';
import * as React from 'react';
import HolePolygon from './components/hole'
import Line from './components/line';
import MultiLine from './components/multiLine';
import MultiPolygon from './components/multiPolygon';
@ -11,4 +12,5 @@ storiesOf('数据', module)
.add('multiPolygon', () => <MultiPolygon />, {})
.add('updatePolygon', () => <UpdatePolygon />, {})
.add('MultiLine', () => <MultiLine />, {})
.add('HolePolygon', () => <HolePolygon />, {})
.add('折线', () => <Line />, {});

View File

@ -0,0 +1,135 @@
import { LineLayer, PolygonLayer, Scene } from '@antv/l7';
import { GaodeMap, Mapbox } from '@antv/l7-maps';
import * as React from 'react';
function convertRGB2Hex(rgb: number[]) {
return (
'#' + rgb.map((r) => ('0' + Math.floor(r).toString(16)).slice(-2)).join('')
);
}
export default class MultiPolygon extends React.Component {
private gui: dat.GUI;
private $stats: Node;
private scene: Scene;
public componentWillUnmount() {
this.scene.destroy();
}
public async componentDidMount() {
const response = await fetch(
// 'https://gw.alipayobjects.com/os/basement_prod/f79485d8-d86f-4bb3-856d-537b586be06e.json',
'https://gw.alipayobjects.com/os/basement_prod/619a6f16-ecb0-4fca-9f9a-b06b67f6f02b.json',
);
const scene = new Scene({
id: 'map',
map: new GaodeMap({
pitch: 0,
style: 'dark',
center: [-44.40673828125, -18.375379094031825],
zoom: 12,
}),
});
const data = {
type: 'FeatureCollection',
features: [
{
type: 'Feature',
properties: {},
geometry: {
type: 'MultiPolygon',
coordinates: [
[
[
[110.5224609375, 32.731840896865684],
[113.0712890625, 32.731840896865684],
[113.0712890625, 34.56085936708384],
[110.5224609375, 34.56085936708384],
[110.5224609375, 32.731840896865684],
],
[
[111.26953125, 33.52307880890422],
[111.26953125, 34.03445260967645],
[112.03857421875, 34.03445260967645],
[112.03857421875, 33.52307880890422],
[111.26953125, 33.52307880890422],
],
],
[
[
[115.04882812499999, 34.379712580462204],
[114.9609375, 33.46810795527896],
[115.8837890625, 33.50475906922609],
[115.86181640625001, 34.379712580462204],
[115.04882812499999, 34.379712580462204],
],
],
],
},
},
{
type: 'Feature',
properties: {},
geometry: {
type: 'Polygon',
coordinates: [
[
[113.8623046875, 30.031055426540206],
[116.3232421875, 30.031055426540206],
[116.3232421875, 31.090574094954192],
[113.8623046875, 31.090574094954192],
[113.8623046875, 30.031055426540206],
],
[
[117.26806640625, 32.13840869677249],
[118.36669921875, 32.13840869677249],
[118.36669921875, 32.47269502206151],
[117.26806640625, 32.47269502206151],
[117.26806640625, 32.13840869677249],
],
],
},
},
],
};
// console.log(data.features[5]);
// data.features = data.features.slice(6);
const layer = new PolygonLayer({
autoFit: true,
})
.source(data)
.shape('fill')
.color('red')
.style({
opacity: 1.0,
});
const layer2 = new PolygonLayer({
autoFit: true,
})
.source(data)
.shape('line')
.color('#fff')
.style({
opacity: 1.0,
});
scene.addLayer(layer);
scene.addLayer(layer2);
console.log(layer);
}
public render() {
return (
<div
id="map"
style={{
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
}}
/>
);
}
}

View File

@ -34,18 +34,20 @@ export default class MultiLine extends React.Component {
type: 'Feature',
properties: {},
geometry: {
type: 'LineString',
type: 'MultiLineString',
coordinates: [
[90.703125, 34.59704151614417],
[112.8515625, 39.095962936305476],
[117.42187500000001, 29.53522956294847],
[127.61718749999999, 34.016241889667015],
[129.0234375, 40.713955826286046],
[136.40625, 36.87962060502676],
[136.40625, 28.304380682962783],
[130.078125, 25.16517336866393],
[125.5078125, 20.96143961409684],
[130.078125, 17.644022027872726],
[
[142.03125, 65.36683689226321],
[187.03125, 50.28933925329178],
[187.734375, 21.94304553343818],
[155.390625, -4.214943141390639],
],
[
[217.96875, 70.61261423801925],
[257.34375, 51.6180165487737],
[257.34375, -39.90973623453718],
[223.59375, -45.08903556483102],
],
],
},
},

View File

@ -34,55 +34,897 @@ export default class MultiPolygon extends React.Component {
const data = await response.json();
// console.log(data.features[5]);
// data.features = data.features.slice(6);
const layer = new PolygonLayer()
.source({
type: 'FeatureCollection',
features: [
{
type: 'Feature',
properties: {},
geometry: {
type: 'Polygon',
coordinates: [
[
[118.70796203613281, 31.84956532831343],
[118.67019653320312, 31.783049527817784],
[118.70384216308594, 31.757947795369688],
[118.7944793701172, 31.79647323968844],
[118.78829956054686, 31.85073184447357],
[118.70796203613281, 31.84956532831343],
],
],
},
},
{
type: 'Feature',
properties: {},
geometry: {
type: 'Polygon',
coordinates: [
[
[116.96044921875, 29.38217507514529],
[114.41162109375, 30.315987718557867],
[114.78515624999999, 28.43971381702788],
[114.93896484374999, 27.0982539061379],
[116.98242187499999, 27.01998400798257],
[119.20166015625, 28.091366281406945],
[119.17968749999999, 29.38217507514529],
[116.96044921875, 29.38217507514529],
],
],
},
},
],
})
.shape('extrude')
.size(10)
const layer = new PolygonLayer({
autoFit: true,
})
.source(data)
// .source({
// "type": "FeatureCollection",
// "features": [
// {
// "type": "Feature",
// "geometry": {
// "type": "Polygon",
// "coordinates": [
// [
// [
// 120.77635306891,
// 30.724101690221,
// 0
// ],
// [
// 120.7762750691,
// 30.723561703888,
// 0
// ],
// [
// 120.77232406917,
// 30.723597702916,
// 0
// ],
// [
// 120.77109506876,
// 30.7235147052,
// 0
// ],
// [
// 120.77108606943,
// 30.723752699288,
// 0
// ],
// [
// 120.77053906909,
// 30.72372769994,
// 0
// ],
// [
// 120.76927406959,
// 30.723672701042,
// 0
// ],
// [
// 120.76934906903,
// 30.723773698488,
// 0
// ],
// [
// 120.76930006953,
// 30.723889695569,
// 0
// ],
// [
// 120.76871506955,
// 30.723738699561,
// 0
// ],
// [
// 120.76694306899,
// 30.723900695172,
// 0
// ],
// [
// 120.76675406884,
// 30.724130689598,
// 0
// ],
// [
// 120.76683306938,
// 30.731139519176,
// 0
// ],
// [
// 120.76731206906,
// 30.740623287754,
// 0
// ],
// [
// 120.77071906901,
// 30.740450291653,
// 0
// ],
// [
// 120.77472406937,
// 30.740246297132,
// 0
// ],
// [
// 120.77522406896,
// 30.73904932611,
// 0
// ],
// [
// 120.77553406948,
// 30.737387366644,
// 0
// ],
// [
// 120.775429069,
// 30.734489437681,
// 0
// ],
// [
// 120.77559706923,
// 30.732567483938,
// 0
// ],
// [
// 120.7756120693,
// 30.732077496173,
// 0
// ],
// [
// 120.77564206943,
// 30.731053521125,
// 0
// ],
// [
// 120.77558106933,
// 30.729099568997,
// 0
// ],
// [
// 120.77573906952,
// 30.728197590445,
// 0
// ],
// [
// 120.77594006936,
// 30.727771600943,
// 0
// ],
// [
// 120.77571006921,
// 30.727633604778,
// 0
// ],
// [
// 120.77633306882,
// 30.725467657006,
// 0
// ],
// [
// 120.77635706911,
// 30.724694676455,
// 0
// ],
// [
// 120.7762630694,
// 30.724677676787,
// 0
// ],
// [
// 120.77636606933,
// 30.724431682439,
// 0
// ],
// [
// 120.77635306891,
// 30.724101690221,
// 0
// ]
// ],
// [
// [
// 120.78582906896,
// 30.73962431227,
// 0
// ],
// [
// 120.78075606875,
// 30.740043302046,
// 0
// ],
// [
// 120.77649206883,
// 30.740156299253,
// 0
// ],
// [
// 120.77655806895,
// 30.746082154606,
// 0
// ],
// [
// 120.77659106946,
// 30.749030082542,
// 0
// ],
// [
// 120.77668906937,
// 30.755218931839,
// 0
// ],
// [
// 120.7766900692,
// 30.755294929765,
// 0
// ],
// [
// 120.77677806906,
// 30.760002815113,
// 0
// ],
// [
// 120.77684706956,
// 30.763676725444,
// 0
// ],
// [
// 120.77693106922,
// 30.764071715491,
// 0
// ],
// [
// 120.77850006939,
// 30.763877720881,
// 0
// ],
// [
// 120.78000106889,
// 30.763923719559,
// 0
// ],
// [
// 120.78126706911,
// 30.767494632229,
// 0
// ],
// [
// 120.78106206907,
// 30.767561630413,
// 0
// ],
// [
// 120.7771500695,
// 30.76884759917,
// 0
// ],
// [
// 120.77726406931,
// 30.772810502392,
// 0
// ],
// [
// 120.77719506881,
// 30.774495461324,
// 0
// ],
// [
// 120.77506906915,
// 30.777083397968,
// 0
// ],
// [
// 120.77807606907,
// 30.778478364399,
// 0
// ],
// [
// 120.77837906902,
// 30.778518363155,
// 0
// ],
// [
// 120.78929006934,
// 30.783340245421,
// 0
// ],
// [
// 120.79258006912,
// 30.784790210168,
// 0
// ],
// [
// 120.80403806889,
// 30.789838086536,
// 0
// ],
// [
// 120.80657006933,
// 30.785639189419,
// 0
// ],
// [
// 120.80679106927,
// 30.784983205662,
// 0
// ],
// [
// 120.80726206944,
// 30.782574264547,
// 0
// ],
// [
// 120.80872606913,
// 30.779160347623,
// 0
// ],
// [
// 120.80891006926,
// 30.778613361097,
// 0
// ],
// [
// 120.80907106892,
// 30.778645360213,
// 0
// ],
// [
// 120.81142606891,
// 30.779116348975,
// 0
// ],
// [
// 120.81145306957,
// 30.778889354564,
// 0
// ],
// [
// 120.81242706881,
// 30.77915934739,
// 0
// ],
// [
// 120.81266706902,
// 30.778689359075,
// 0
// ],
// [
// 120.81422306877,
// 30.779359342674,
// 0
// ],
// [
// 120.81454406916,
// 30.778939353179,
// 0
// ],
// [
// 120.81465406876,
// 30.77889535443,
// 0
// ],
// [
// 120.81680006941,
// 30.780012327073,
// 0
// ],
// [
// 120.81631606882,
// 30.780578312863,
// 0
// ],
// [
// 120.81904406908,
// 30.782179274046,
// 0
// ],
// [
// 120.81921006876,
// 30.782099275703,
// 0
// ],
// [
// 120.82012306881,
// 30.780940304439,
// 0
// ],
// [
// 120.8222420688,
// 30.779044350724,
// 0
// ],
// [
// 120.82267706899,
// 30.778673359141,
// 0
// ],
// [
// 120.8250490696,
// 30.775960425999,
// 0
// ],
// [
// 120.82709006887,
// 30.773821478205,
// 0
// ],
// [
// 120.82853006917,
// 30.772139519191,
// 0
// ],
// [
// 120.82859706912,
// 30.77195152339,
// 0
// ],
// [
// 120.8260130688,
// 30.770295564052,
// 0
// ],
// [
// 120.82687006877,
// 30.769355587288,
// 0
// ],
// [
// 120.82775306957,
// 30.768551606328,
// 0
// ],
// [
// 120.82840006948,
// 30.767794625092,
// 0
// ],
// [
// 120.82924806922,
// 30.767183639911,
// 0
// ],
// [
// 120.82956306887,
// 30.767025643638,
// 0
// ],
// [
// 120.8300850691,
// 30.766907646828,
// 0
// ],
// [
// 120.83112206899,
// 30.767073642299,
// 0
// ],
// [
// 120.83186506916,
// 30.767103642221,
// 0
// ],
// [
// 120.83211206903,
// 30.766588654343,
// 0
// ],
// [
// 120.83212506945,
// 30.76642065885,
// 0
// ],
// [
// 120.83096706918,
// 30.766113666077,
// 0
// ],
// [
// 120.830691069,
// 30.765966669795,
// 0
// ],
// [
// 120.8318870689,
// 30.764626702071,
// 0
// ],
// [
// 120.83182506897,
// 30.764508705408,
// 0
// ],
// [
// 120.83101306921,
// 30.764081715521,
// 0
// ],
// [
// 120.83121306923,
// 30.76358172742,
// 0
// ],
// [
// 120.83109206885,
// 30.763485730451,
// 0
// ],
// [
// 120.83162406913,
// 30.76276574743,
// 0
// ],
// [
// 120.83128806957,
// 30.762583751955,
// 0
// ],
// [
// 120.83173806893,
// 30.761936768301,
// 0
// ],
// [
// 120.83159806919,
// 30.761865769958,
// 0
// ],
// [
// 120.83158806915,
// 30.76176977205,
// 0
// ],
// [
// 120.83195806904,
// 30.761185786185,
// 0
// ],
// [
// 120.83188806872,
// 30.760991791162,
// 0
// ],
// [
// 120.83238006882,
// 30.759888817599,
// 0
// ],
// [
// 120.83255406889,
// 30.759835819366,
// 0
// ],
// [
// 120.83485306881,
// 30.760244809563,
// 0
// ],
// [
// 120.83522506925,
// 30.760230809735,
// 0
// ],
// [
// 120.83541906942,
// 30.760145811837,
// 0
// ],
// [
// 120.83580606904,
// 30.759772820627,
// 0
// ],
// [
// 120.83672306928,
// 30.75859084962,
// 0
// ],
// [
// 120.8370330689,
// 30.75795286482,
// 0
// ],
// [
// 120.83712906916,
// 30.757575874094,
// 0
// ],
// [
// 120.83731706948,
// 30.757475877026,
// 0
// ],
// [
// 120.83784206919,
// 30.75752287536,
// 0
// ],
// [
// 120.83800606922,
// 30.757456877594,
// 0
// ],
// [
// 120.83843806904,
// 30.755851916172,
// 0
// ],
// [
// 120.83828506888,
// 30.755732919085,
// 0
// ],
// [
// 120.83816606905,
// 30.755780917973,
// 0
// ],
// [
// 120.83806606949,
// 30.755974913461,
// 0
// ],
// [
// 120.83687606944,
// 30.755997912761,
// 0
// ],
// [
// 120.83656306945,
// 30.754973937972,
// 0
// ],
// [
// 120.83672906913,
// 30.754009961081,
// 0
// ],
// [
// 120.83664706911,
// 30.753562972564,
// 0
// ],
// [
// 120.83587106933,
// 30.752338002178,
// 0
// ],
// [
// 120.83373706928,
// 30.74996805985,
// 0
// ],
// [
// 120.83359406916,
// 30.749953060308,
// 0
// ],
// [
// 120.83324306953,
// 30.750084057055,
// 0
// ],
// [
// 120.83158306912,
// 30.750821038877,
// 0
// ],
// [
// 120.83163306935,
// 30.751102032064,
// 0
// ],
// [
// 120.83138306911,
// 30.751146031168,
// 0
// ],
// [
// 120.83073506938,
// 30.749989059514,
// 0
// ],
// [
// 120.83072506933,
// 30.749820063853,
// 0
// ],
// [
// 120.83233206914,
// 30.74894908466,
// 0
// ],
// [
// 120.83250906959,
// 30.749030082542,
// 0
// ],
// [
// 120.83267106907,
// 30.748864086839,
// 0
// ],
// [
// 120.83239006886,
// 30.748490096151,
// 0
// ],
// [
// 120.83134006945,
// 30.74767411564,
// 0
// ],
// [
// 120.83089006919,
// 30.747915109638,
// 0
// ],
// [
// 120.82928206956,
// 30.748447097158,
// 0
// ],
// [
// 120.82681206904,
// 30.749072081502,
// 0
// ],
// [
// 120.82493606872,
// 30.749914061024,
// 0
// ],
// [
// 120.82305806876,
// 30.750518046341,
// 0
// ],
// [
// 120.82194506959,
// 30.750846038145,
// 0
// ],
// [
// 120.82183906929,
// 30.75081403905,
// 0
// ],
// [
// 120.81857006943,
// 30.751646019006,
// 0
// ],
// [
// 120.81729506898,
// 30.752173006514,
// 0
// ],
// [
// 120.81635906937,
// 30.752413000324,
// 0
// ],
// [
// 120.81493806934,
// 30.752386001215,
// 0
// ],
// [
// 120.8143710689,
// 30.750924036714,
// 0
// ],
// [
// 120.80927506913,
// 30.752456998829,
// 0
// ],
// [
// 120.80860206929,
// 30.752373001526,
// 0
// ],
// [
// 120.80814106915,
// 30.751777015766,
// 0
// ],
// [
// 120.8080980695,
// 30.742568240055,
// 0
// ],
// [
// 120.80808006905,
// 30.738753333537,
// 0
// ],
// [
// 120.80803706939,
// 30.734523436641,
// 0
// ],
// [
// 120.80777306891,
// 30.728363587009,
// 0
// ],
// [
// 120.80781406891,
// 30.727287612728,
// 0
// ],
// [
// 120.80764106956,
// 30.726292637257,
// 0
// ],
// [
// 120.80756106919,
// 30.724460681717,
// 0
// ],
// [
// 120.80576006922,
// 30.723453706722,
// 0
// ],
// [
// 120.805084069,
// 30.723696700368,
// 0
// ],
// [
// 120.80054706927,
// 30.723970693668,
// 0
// ],
// [
// 120.80055206929,
// 30.728390585902,
// 0
// ],
// [
// 120.80135606956,
// 30.734556435666,
// 0
// ],
// [
// 120.80156006887,
// 30.736018399964,
// 0
// ],
// [
// 120.80184706893,
// 30.738810332081,
// 0
// ],
// [
// 120.80186006935,
// 30.738939328783,
// 0
// ],
// [
// 120.79892806887,
// 30.738954328496,
// 0
// ],
// [
// 120.79595506929,
// 30.738970328085,
// 0
// ],
// [
// 120.79431506897,
// 30.738979327756,
// 0
// ],
// [
// 120.79089806897,
// 30.739133324223,
// 0
// ],
// [
// 120.78582906896,
// 30.73962431227,
// 0
// ]
// ]
// ]
// },
// "properties": {
// "name": "东栅街道"
// }
// }
// ]
// })
.shape('fill')
.color('red')
.style({
opacity: 1.0,
});
scene.addLayer(layer);
console.log(layer);
}
public render() {