Parameters:
| Name |
Type |
Argument |
Description |
map |
Glodon.CIMCube
|
|
|
options |
Object
|
<optional>
|
Properties
| Name |
Type |
Argument |
Default |
Description |
layers |
Tiles3DLayer
|
Array.<Tiles3DLayer>
|
|
|
指定3DTiles图层;(需要图层已经添加到地图中) |
region |
Array.<Array.<Number>>
|
Array.<Object>
|
|
|
闭合范围 [[lon,lat,height]|[lon,lat,height],...], 范围判断仅用经纬度, 高度用来划线 |
offset |
Array.<Number>
|
<optional>
|
[0,0,0]
|
克隆体相对源位置东、北、上偏移(米) |
simplify |
Boolean
|
<optional>
|
true
|
是否开启轮廓抽稀;采用道格拉斯‑普克算法(Douglas–Peucker algorithm) |
simplifyMaxPoints |
Number
|
<optional>
|
30
|
抽稀开启时的最大保留点数;未开启抽稀或输入点数不超过该值时不走抽稀算法 |
gradient |
Object
|
<optional>
|
|
克隆体渐进色,见 Tiles3DLayer.setGradientEffect |
lodFactor |
Number
|
<optional>
|
5
|
LoD 系数,克隆体降级,值越大越降级 |
showConnectorLines |
Boolean
|
<optional>
|
true
|
是否绘制原始端点与抬升端点垂直连线 |
connectorLineStyle |
Object
|
<optional>
|
|
DynamicLines 样式:lineColor、lineWidth、lineType |
animationDuration |
Number
|
<optional>
|
3
|
克隆体入场动画时长(秒),透明度与偏移同步过渡;为 0 时不使用动画;大于 0 时在克隆图层 LOADED 后才开始 |
|
Example
const sourceLayer = map.layerManager.getLayer("oblique_photo");
const cloneTool = new Glodon.CIMCube.Utils.SpatialTilesetCloner(map, {
layers: sourceLayer,
region: [[106.71, 29.60, 0], [106.77, 29.59, 0], [106.75, 29.55, 0]],
offset: [0, 0, 200],
lodFactor: 2,
showConnectorLines: true,
connectorLineStyle: { lineColor: "#FFEB3B", lineWidth: 2 }
});