Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
optional
对象具有以下属性
|
Example:
var geo = new Cesium.GeoSetbackLineAnalysis({
viewer: viewer,
distance: 10,
landlineColor: Cesium.Color.RED,
backlineColor: Cesium.Color.PINK,
lineWidth: 5,
backSpaceColor: Cesium.Color.YELLOW.withAlpha(0.5),
extrudedHeight: 100
});
// 设置用地红线点坐标(经纬度、高程)
var coordinates = [
[114.41049001460442, 30.476871278653746, 33.93945159689302],
[114.41084194068833, 30.479780160864443, 41.60124424409017],
[114.41094444544547, 30.48069174633191, 41.806145711147074],
[114.41092984845501, 30.480750437006687, 41.70495020839203],
[114.41087008069913, 30.480795851339657, 41.793280153558875],
[114.41082629324362, 30.480810114585122, 41.851947788808424],
[114.40982991240577, 30.480888474010683, 42.94447029762088],
];
geo.setLandLineCoordinates(coordinates);// 传入用地红线坐标
geo.activate(); // 激活显示用地红线、退线和退线空间
geo.showLandline = false; // 用地红线可见性设置
geo.showBackline = false; // 退线可见性设置
geo.showBackSpace = false; // 退线空间可见性设置
geo.destroy(); // 销毁
Demo:
Members
设置退线方向
-
Default Value:
false
设置退线的可见性
-
Default Value:
true
设置退线空间的可见性
-
Default Value:
true
设置用地红线的可见性
-
Default Value:
true
Methods
初始化
清除退线
销毁
修改退线距离
Name | Type | Description |
---|---|---|
val |
Number | 退线距离(单位:米) |
传入用地红线顶点坐标数据数组
GeoJson格式为:{type: "Feature", geometry: {type: "Polygon", coordinates: []}, properties: {}}
Name | Type | Description |
---|---|---|
coordinates |
Array | 用地红线点坐标数据构成的数组,每个点数据包含经纬度(单位:度)和高程(单位:米) |
Example:
var coordinates = [
[114.41049001460442, 30.476871278653746, 33.93945159689302],
[114.41084194068833, 30.479780160864443, 41.60124424409017],
[114.41094444544547, 30.48069174633191, 41.806145711147074],
[114.41092984845501, 30.480750437006687, 41.70495020839203],
[114.41087008069913, 30.480795851339657, 41.793280153558875],
[114.41082629324362, 30.480810114585122, 41.851947788808424],
[114.40982991240577, 30.480888474010683, 42.94447029762088],
];
this.setLandlineCoordinates(coordinates);