Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
optional
对象具有以下属性
|
Example:
var geo = new GeoSurfaceExtraction({
viewer: viewer,
extrudedHeight: 2000,
image: "images/grass.jpg",
sideMaterial: "images/side.jpg",
repeat: new Cesium.Cartesian2(5, 5),
sideRepeat:new Cesium.Cartesian2(2, 2)
});
var feature = {
type: "Feature",
geometry: { type: "Polygon",coordinates: [[99.20610461279317, 29.76131355698835, 4692.9244219942575],[99.20552478742327, 29.76182378219685, 4699.5932658281645],[99.2049578979335, 29.761740643395676, 4698.795275017911],[99.2044055290456, 29.762161629659865, 4707.250874426393], [99.19248606195193, 29.760097385943723, 4803.195203781556],[99.20621301079032, 29.760666113325815, 4692.299520938956],[99.20610461279317, 29.76131355698835, 4692.9244219942575]]},
properties: {}
};
// 加载多边形数据
geo.setPolygon(feature);
// 绘制几何体
geo.render();
// 清除几何体
geo.destroy();
// 设置拔高高度
geo.extrudedHeight = 2000;
Demo:
Members
插值间距
-
Default Value:
100
设置拔高高度,单位为米
-
Default Value:
1000
设置可见性
-
Default Value:
true
Methods
清除绘制的几何体
加载绘制的几何体
传入GeoJson格式的多边形顶点数据
GeoJson格式为:{type: "Feature", geometry: {type: "Polygon", coordinates: []}, properties: {}}
Name | Type | Description |
---|---|---|
geoJson |
Object | 格式为GeoJson的多边形顶点数据 |
Example:
{
type: "Feature",
geometry: {
type: "Polygon",
coordinates: [
[99.20610461279317, 29.76131355698835, 4692.9244219942575],[99.20552478742327, 29.76182378219685, 4699.5932658281645],[99.2049578979335, 29.761740643395676, 4698.795275017911],[99.20608750107924, 29.76012829921614, 4700.487188616946],[99.20608750107924, 29.76012829921614, 4700.487188616946],[99.20621301079032, 29.760666113325815, 4692.299520938956],[99.20610461279317, 29.76131355698835, 4692.9244219942575]]
},
properties: {}
}