Class: Tiles3DLayer

Glodon.CIMCube.Layer. Tiles3DLayer

3DTiles图层类,用来加载和管理3DTiles数据

new Tiles3DLayer(opts)

3DTiles图层构造函数
Parameters:
Name Type Description
opts Object 图层配置参数
Properties
Name Type Argument Default Description
origin Array <optional>
图层原点在地球上的位置,用经纬度表示,例:[106.689936, 29.559434, 500.0]
offset Array <optional>
偏移量,单位米,例:[1000.0, 500.0, 100.0]
rotation Array <optional>
旋转参数(右手坐标系,第一个元素绕X轴旋转指定角度,第二个元素绕Y轴旋转指定角度,第三个元素绕Z轴旋转指定角度)
scale Number <optional>
1.0 图层放大与缩小比例,默认1
shadowMode Glodon.CIMCube.Global.Defines.ShadowMode <optional>
Glodon.CIMCube.Global.Defines.ShadowMode.DISABLED 阴影模式
classificationType Glodon.CIMCube.Global.Defines.ClassificationType <optional>
分类类型,用于设置模型
crs String <optional>
数据坐标系,例:opts.crs="EPSG:4528"
projectTo2D Boolean <optional>
false 是否将图层精准的投影到二维视图下
lightColor Array | Color <optional>
模型着色时的灯光颜色。未定义时,将使用场景的灯光颜色。例:[255,255,255]
cacheable boolean <optional>
false 是否使用IndexedDB,默认为false
luminanceAtZenith Number <optional>
0.2 光源亮度,默认0.2
gamma Number <optional>
1.0 伽马值,默认为:1
contrast Number <optional>
1.0 对比度,默认为:1
hue Number <optional>
0.0 颜色的色相 (H)SB,默认0.0;值范围:-PI~PI
saturation Number <optional>
1.0 颜色的饱和度 H(S)B,默认1.0;值范围:0~2
brightness Number <optional>
1.0 颜色的明度 HS(B),默认1.0;值范围:0~2
gradient Object <optional>
渐进色特效
Properties
Name Type Argument Default Description
show Boolean <optional>
false 是否显示
startHeight Number <optional>
0.0 起始高度(单位米),默认0.0
endHeight Number <optional>
50.0 终了高度(单位米),默认50.0
startColor Color <optional>
#000000 起始颜色,默认为#000000
endColor Color <optional>
rgba(0,127.5,255,1.0) 终了颜色,默认为rgba(0,127.5,255,1.0)
gradientImage Object <optional>
图片融合渐变特效参数
Properties
Name Type Argument Default Description
startHeight Number <optional>
0.0 渐变区域的最小高度(单位米),默认0.0
endHeight Number <optional>
100.0 渐变区域的最大高度(单位米),默认100.0
startImage String <optional>
渐变区域的最小高度对应的图片Url;图片中透明度为与模型原始颜色融合比例;0.5场合,会融合50%
endImage String <optional>
渐变区域的最大高度对应的图片Url
region Array <optional>
设置图层渐变区域,例如:[{lon:119,lat:59},{lon:120,lat:60}];
halo Object <optional>
光环特效;
Properties
Name Type Argument Default Description
show Boolean <optional>
false 是否显示
startHeight Number <optional>
0.0 起始高度(单位米),默认0.0
endHeight Number <optional>
100.0 终了高度(单位米),默认100.0
haloColor Color <optional>
#777777 环的颜色,默认#777777
haloThick Number <optional>
环的厚度(单位米),默认1.0
duration Number <optional>
光环时长(单位秒),默认0.5
delay Number <optional>
光环动画间隔时长(单位秒),默认1.0
mode Glodon.CIMCube.Global.Defines.DynamicHaloMode <optional>
模式【up】,【down】,【upToDown】,【downToUp】
topGlow Boolean <optional>
false 是否开启顶部发光效果
breathe Object <optional>
呼吸特效;
Properties
Name Type Argument Default Description
show Boolean <optional>
false 是否显示
baseHeight Number <optional>
0.0 基础高度(单位米),默认0.0
heightRange Number <optional>
50.0 呼吸范围(单位米)
breatheColor Color <optional>
rgba(0,127.5,255,1.0) 呼吸颜色,默认rgba(0,127.5,255,1.0)
duration Number <optional>
2.0 呼吸时长(单位秒),默认2.0
delay Number <optional>
1.0 呼吸间隔时长(单位秒),默认1.0
dynamicPoint Object 动态点特效;
Properties
Name Type Argument Default Description
show Boolean <optional>
false 是否显示
type Number <optional>
"breathe" 特效类型,默认"breathe":呼吸特效
color Color <optional>
rgba(0,127.5,255,1.0) 特效颜色,默认rgba(0,127.5,255,1.0)
duration Number <optional>
2.0 特效时长(单位秒),默认2.0
delay Number <optional>
1.0 特效间隔时长(单位秒),默认1.0
radius Number <optional>
1 特效半径,默认1m
points Array <optional>
特效点坐标数组,模型坐标:[{Cartesian3},Cartesian3,...]
preferLeaves boolean <optional>
false 是否优先加载子节叶点;默认不开启,false;
skipLevelOfDetail boolean <optional>
false 是否跳过详细级别;默认关闭,false;(此优化项,可能会造成粗模与精模同屏更为明显,根据数据情况设置)
maximumScreenSpaceError Number <optional>
16 屏幕间隔误差最大值,影响模型lod级别加载;区间
metallicRoughnessFactor Array <optional>
[0.5,0.5] 金属度|粗糙度调整;建议用在白膜上,会替换材质中原本金属度|粗糙度; 例:[0.5,0.5];取值范围:0~1
requestTilesetJson Boolean <optional>
false show参数为false时,是否请求tileset.json文件,默认false,不请求文件。
phongLighting Boolean <optional>
false 是否使用一般的光照模型(冯氏光照)
faceToCamera Boolean <optional>
false 是否自动朝向相机,默认为false
enableSceneLighting Boolean <optional>
true 是否受场景光照影响,默认为true
outlineColor Color <optional>
'#000000' 轮廓线颜色,默认为黑色(需要数据支持CESIUM_primitive_outline扩展)
doubleSided Boolean | undefined <optional>
图层是否使用双面材质, 会覆盖图层内部材质的双面属性, 该值默认为undefined

Extends

Members


alpha :Number

透明度 0.0~1.0
Type:
  • Number
Overrides:

brightness :Number

明度调整
Type:
  • Number

cacheable :Boolean

是否可缓存
Type:
  • Boolean
Inherited From:
Overrides:

canHighlight :Boolean

可否高亮
Type:
  • Boolean
Inherited From:
Overrides:

canSelected :Boolean

可否被选中
Type:
  • Boolean
Inherited From:
Overrides:

classificationType :Glodon.CIMCube.Global.Defines.ClassificationType

分类类型
Type:
  • Glodon.CIMCube.Global.Defines.ClassificationType

colorMode :String

色彩模式调整
Type:
  • String

contrast :Number

对比度调整
Type:
  • Number

dragCenter :Cartesian3

获取拖拽中心
Type:
  • Cartesian3

<readonly> drawCalls :Number

绘制调用(CPU调用图形编程接口的次数)
Type:
  • Number

enableMouseMove :Boolean

图层是否可以触发鼠标移动事件
Type:
  • Boolean
Inherited From:
Overrides:
Default Value:
  • true

enableRealisticRendering :Boolean

是否启用真实渲染
Type:
  • Boolean

enableSceneLighting :Boolean

是否受场景光照影响
Type:
  • Boolean

faceToCamera :Boolean

是否自动朝向相机
Type:
  • Boolean

gamma :Number

伽马值调整
Type:
  • Number

glowColor :String

发光颜色
Type:
  • String
Inherited From:
Overrides:

glowTimeInterval :String

闪烁的颜色
Type:
  • String
Inherited From:
Overrides:

hue :Number

色相调整
Type:
  • Number

id :String

id
Type:
  • String
Inherited From:
Overrides:

isPipeline :Boolean

数据是否是管线类型
Type:
  • Boolean
Inherited From:
Overrides:

lightColor :ArrayList|Color

光颜色调整
Type:
  • ArrayList | Color

luminanceAtZenith :Number

图层光源亮度
Type:
  • Number

matrix :Object

图层偏移
Type:
  • Object
Inherited From:
Overrides:

maximumScreenSpaceError :Number

最大屏幕空间误差
Type:
  • Number

maxVisibleDistance :Number

最大可见距离,相机距离小于此值时数据可见。默认Infinity
Type:
  • Number

metallicRoughnessFactor :ArrayList

金属度与粗糙度调整;建议用在白膜上,会替换材质中原本金属度|粗糙度; 例:[0.5,0.5];取值范围:0~1
Type:
  • ArrayList

name :String

图层名称
Type:
  • String
Inherited From:
Overrides:

<readonly> numberOfVertices :Number

顶点个数(调试模式下使用)
Type:
  • Number

offset :Array

获取偏移量,第一个元素表示向东偏移的距离,第二个元素表示向北偏移的距离,第三个元素表示向上偏移的距离,单位米
Type:
  • Array

origin :Array.<Number>

图层原点在地球上的位置,用经纬度表示,例:[106.689936, 29.559434, 500.0]
Type:
  • Array.<Number>

pickable :Boolean

pickable
Type:
  • Boolean
Inherited From:
Overrides:

pointCloudStyle :Object

设置点云图层样式(参考Cesium.Cesium3DTileStyle)
Type:
  • Object
Example
//除了默认提供的POSITION_ABSOLUTE与POSITION, 额外增加了 ELEVATION 与 UNDER_BOUNDING_HEIGHT
const style = {
    color: {
        conditions: [
             ["${ELEVATION} >= 16", "color('purple', 0.5)"]
             ["${ELEVATION} >= 10", "color('red')"],
             ["${ELEVATION} >= 9", "color('orange')"],
             ["${ELEVATION} >= 8", "color('yellow')"],
             ["${ELEVATION} >= 7", "color('lime')"],
             ["${ELEVATION} >= 6", "color('cyan')"],
             ["true", "color('blue')"],
         ],
     }
 }
 tiles3DLayer.pointCloudStyle = style;

preferLeaves :Boolean

是否优先加载子节叶点
Type:
  • Boolean

<readonly> ready :Boolean

数据是否已经加载
Type:
  • Boolean
Inherited From:
Overrides:

rotation :Array.<Number>

旋转参数(右手坐标系,第一个元素绕X轴旋转指定角度,第二个元素绕Y轴旋转指定角度,第三个元素绕Z轴旋转指定角度)
Type:
  • Array.<Number>

rotationPointOffset :Cartesian3

图层指定的旋转点,模型坐标系下基于原点的偏移点,默认是包围盒中心点
Type:
  • Cartesian3
Inherited From:
Overrides:

saturation :Number

饱和度调整
Type:
  • Number

scale :Number

缩放比例系数
Type:
  • Number

selectedColor :String

选中颜色
Type:
  • String
Inherited From:
Overrides:

shadowMode :Glodon.CIMCube.Global.Defines.ShadowMode

阴影模式
Type:

show :Boolean

图层是否显示
Type:
  • Boolean
Overrides:

showBoundingVolume :Boolean

是否显示包围体
Type:
  • Boolean

showGeometricError :Boolean

显示几何误差
Type:
  • Boolean

showUrl :Boolean

显示URL(调试模式下使用)
Type:
  • Boolean

sizeForDragger :Number

获取图层大小
Type:
  • Number

skipLevelOfDetail :Boolean

是否跳过详细级别
Type:
  • Boolean

style :Object

图层样式,参考Cesium.Cesium3DTileStyle
Type:
  • Object
Example
const style = {
    color: {
        conditions: [
             ["${Floor} >= 16", "color('purple', 0.5)"],//层数大于等于16的,颜色为紫色,透明度为0.5
             ["${Floor} >= 10", "color('red')"],
             ["${Floor} >= 9", "color('orange')"],
             ["${Floor} >= 8", "color('yellow')"],
             ["${Floor} >= 7", "color('lime')"],
             ["${Floor} >= 6", "color('cyan')"],
             ["true", "color('blue')"],
         ],
     },
     //只显示层数大于等于10以上的
     show: '${Floor} >= 10'
 }
 tiles3DLayer.style = style;

<readonly> tileset :Cesium.Cesium3DTileset

返回封装的Cesium3DTileset对象
Type:
  • Cesium.Cesium3DTileset

transform :Cesium.Matrix4

模型变换矩阵
Type:
  • Cesium.Matrix4

<readonly> type :String

图层类型
Type:
  • String
Inherited From:
Overrides:

url :String

图层url地址
Type:
  • String
Inherited From:
Overrides:

Methods


addDragHandle(options)

在场景中添加操作句柄
Parameters:
Name Type Description
options Object 配置参数
Properties
Name Type Argument Default Description
dragModelTipUI DragModelTipUI <optional>
自定义的tip ui实例
tips String <optional>
'单击鼠标左键选择需要操作的模型' 提示字符
showTips Boolean <optional>
true 是否显示提示字符
dragModelUI DragModelUI <optional>
自定义的模型实例;
enableTranslationX Boolean <optional>
true // X轴平移
enableTranslationY Boolean <optional>
true // Y轴平移
enableTranslationZ Boolean <optional>
true // Z轴平移
enableTranslationXY Boolean <optional>
true // XOY面平移
enableTranslationYZ Boolean <optional>
true // YOZ面平移
enableTranslationXZ Boolean <optional>
true // XOZ面平移
enableRotationX Boolean <optional>
true // X轴旋转
enableRotationY Boolean <optional>
true // X轴旋转
enableRotationZ Boolean <optional>
true // X轴旋转
enableScaleX Boolean <optional>
false // X缩放
enableScaleY Boolean <optional>
false // Y缩放
enableScaleZ Boolean <optional>
false // Z缩放
targetScaleRange Array.<Number> <optional>
[0.1, +infinity] 缩放范围
axisTranslationYColor String <optional>
red Y轴平移颜色
axisTranslationXColor String <optional>
green X轴平移颜色
axisTranslationZColor String <optional>
blue Z轴平移颜色
axisTranslationXYColor String <optional>
red XOY面平移颜色
axisTranslationYZColor String <optional>
green YOZ面平移颜色
axisTranslationXZColor String <optional>
blue XOZ面平移颜色
axisRotationXColor String <optional>
red X轴旋转颜色
axisRotationYColor String <optional>
green Y轴旋转颜色
axisRotationZColor String <optional>
blue Z轴旋转颜色
axisScaleXColor String <optional>
red X轴缩放颜色
axisScaleYColor String <optional>
green Y轴缩放颜色
axisScaleZColor String <optional>
blue Z轴缩放颜色
continueEdit Boolean <optional>
false 是否持续编辑,即点击下个对象将会让组件转移到其上;
UIScaling Number <optional>
1.0 缩放UI的系数,engine会忽略小于等于0的数字;
noUI Boolean <optional>
false 是否不创建UI
lockDirectionAngle Number <optional>
0 指定方向移动, 单位:度; y-x的0度为正北, z-x的0度为垂直地表向外, z-y的0度为垂直地表向上
enableLockDirectionTranslationYX Boolean <optional>
false YX平面内指定方向移动
enableLockDirectionTranslationZX Boolean <optional>
false ZX平面内指定方向移动
enableLockDirectionTranslationZY Boolean <optional>
false ZY平面内指定方向移动
lockDirectionTranslationColorYX String <optional>
'red' YX平面内指定方向移动颜色
lockDirectionTranslationColorZX String <optional>
'green' ZX平面内指定方向移动颜色
lockDirectionTranslationColorZY String <optional>
'blue' ZY平面内指定方向移动颜色
enableRightButtonMove Boolean <optional>
false 是否启用右键移动
Overrides:
  • Glodon.CIMCube.Layer.BaseLayer#addDragHandle

addMultiClippingPlane(id, collections, region)

添加多裁剪平面
Parameters:
Name Type Description
id String 多裁剪平面ID
collections Array.<Cesium.MultiClippingPlane> 多裁剪平面
region Object 裁剪区域信息

addTo(map)

将图层添加到图层管理器中
Parameters:
Name Type Description
map Glodon.CIMCube 地图实例
Inherited From:
Overrides:

clearFeatureEffect()

清空所有Feature效果

disableFeatureEffect()

关闭Feature效果

dispatchEvent(event)

在此事件派发器上派发事件.
Parameters:
Name Type Description
event Object 待派发的事件.
Inherited From:
Overrides:

dispose()

释放资源

enableBreatheEffect(enable)

动态呼吸特效(开启前必须通过setBreatheEffect设置参数)
Parameters:
Name Type Description
enable Boolean 是否开启动态呼吸特效

enableDynamicHaloEffect(enable)

动态光环特效(开启前必须通过setDynamicHaloEffect设置参数)
Parameters:
Name Type Description
enable Boolean 是否开启动态光环特效

enableDynamicPointEffect(enable)

动态点特效(开启前必须通过setDynamicPointEffect设置参数)
Parameters:
Name Type Description
enable Boolean 是否开启动态点特效

enableFeatureEffect()

开启Feature效果(开启前必须通过setFeatureEffect设置参数)

enableGradientEffect(enable)

渐变特效(开启前必须通过setGradientEffect设置参数)
Parameters:
Name Type Description
enable Boolean 是否开启渐变特效

enableGradientImageEffect(enable)

图片融合渐变特效(开启前必须通过setGradientImageEffect设置参数)
Parameters:
Name Type Description
enable Boolean 是否开启图片融合渐变特效

enableLineamentEffect(enable)

白膜轮廓特效(开启前必须通过setLineamentEffect设置参数)
Parameters:
Name Type Description
enable Boolean 是否开启渐变特效

flyTo()

摄像机定位到图层

flyToSubLayer(layer [, options])

飞行至子图层
Parameters:
Name Type Argument Description
layer String 子图层的id
options Object <optional>
飞行参数:
Properties
Name Type Argument Description
duration Number <optional>
飞行的持续时间(以秒为单位)。如果省略,会尝试根据飞行距离计算理想的持续时间
offset HeadingPitchRange <optional>
在以目标为中心的局部东-北-上参考系中与目标的偏移量
complete Camera.FlightCompleteCallback <optional>
飞行完成时执行的函数
cancel Camera.FlightCancelledCallback <optional>
飞行取消时执行的函数

getBoundingMaxHeight()

获取图层最高高度
Returns:
高度
Type
Number

getBoundingSphere()

获取模型包围球
Returns:
包围球,参见Cesium.BoundingSphere
Type
BoundingSphere

getBoundingVolumeHeight()

获取图层包围盒高度
Returns:
高度
Type
Number

getClipTarget()

获取裁剪目标
Returns:
裁剪目标
Type
Cartesian3

getENUPosition(llh)

获取包围盒中心点的偏移坐标
Parameters:
Name Type Description
llh Object 世界坐标,经度,纬度,高度
Properties
Name Type Description
lon Number 经度
lat Number 纬度
height Number 高度
Returns:
偏移坐标: 东北天 ENU,East-North-Up
Type
Cartesian3

getOriginWorldCoord()

获取图层原点坐标
Returns:
图层原点坐标
Type
Cartesian3

getParentId()

获取父节点ID
Inherited From:
Overrides:
Returns:
父节点ID
Type
String

getPositionCenter()

获取模型包围球中心点
Returns:
三维空间点位,参见Cesium.Cartesian3
Type
Cartesian3

hideSubLayers(layers)

隐藏子图层
Parameters:
Name Type Description
layers Array.<String> 子图层的id数组

localToWorldPosition(localPosition)

通过模型局部坐标获取世界坐标
Parameters:
Name Type Description
localPosition Cartesian3 笛卡尔局部坐标
Returns:
模型世界坐标
Type
Cartesian3

move(angle, distance [, mode])

指定角度移动, 逆时针旋转,右手坐标系
Parameters:
Name Type Argument Default Description
angle Number 表示指定角度, 单位:度; y-x的0度为正北, z-x的0度为垂直地表向外, z-y的0度为垂直地表向外;
distance Number 移动的距离, 单位:米;
mode String <optional>
"y-x" 指定平面内进行移动; 枚举值:y-x、z-x、z-y;
Returns:
图层offset
Type
Array

removeDragHandle()

在场景中移除操作句柄
Inherited From:
Overrides:

removeFeatureEffect(ids, field)

删除指定Feature效果
Parameters:
Name Type Description
ids Array featureID数组
field String 字段名称

removeMultiClippingPlane(id)

移除多裁剪平面
Parameters:
Name Type Description
id String 多裁剪平面ID

setBreatheEffect(opts)

设置动态呼吸特效参数
Parameters:
Name Type Description
opts Object 特效参数
Properties
Name Type Description
baseHeight Number 基础高度(单位米),默认0.0
heightRange Number 呼吸范围(单位米)
breatheColor Color 呼吸颜色,默认rgba(0,127.5,255,1.0)
duration Number 呼吸时长(单位秒),默认2.0
delay Number 呼吸间隔时长(单位秒),默认1.0

setClippingPlanes(value, areasInfo)

设置裁剪平面
Parameters:
Name Type Description
value Cesium.ClippingPlaneCollection 裁剪平面
areasInfo Object 裁剪区域信息

setColorBlendMode(options)

设置颜色着色模式
Parameters:
Name Type Description
options Object 选项
Properties
Name Type Argument Default Description
mode String <optional>
"Highlight" 模型着色模式,枚举:Highlight、Replace、Mix,默认为Highlight
mixAmount Number <optional>
0.5 混合度值,当model为Mix时,存在混合度值,阈值范围:0-1,默认为0.5

setDebugWireframe(value)

线框模式(调试模式下使用)
Parameters:
Name Type Description
value Boolean 是否开启

setDynamicHaloEffect(opts)

设置动态光环特效参数
Parameters:
Name Type Description
opts Object 特效参数
Properties
Name Type Description
startHeight Number 起始高度(单位米),默认0.0
endHeight Number 终了高度(单位米),默认100.0
haloColor Color 环的颜色,默认#777777
haloThick Number 环的厚度(单位米),默认1.0
duration Number 光环时长(单位秒),默认0.5
delay Number 光环动画间隔时长(单位秒),默认1.0
mode Glodon.CIMCube.Global.Defines.DynamicHaloMode 模式【up】,【down】,【upToDown】,【downToUp】
topGlow Boolean 是否开启顶部发光效果

setDynamicPointEffect(opts)

设置动态点特效参数
Parameters:
Name Type Description
opts Object 特效参数
Properties
Name Type Description
type Number 特效类型,默认"breathe":呼吸特效
color Color 特效颜色,默认rgba(0,127.5,255,1.0)
duration Number 特效时长(单位秒),默认2.0
delay Number 特效间隔时长(单位秒),默认1.0
radius Number 特效半径,默认1m
points Array 特效点坐标数组,模型坐标,最多支持16个点:[{Cartesian3},Cartesian3,...]

setFeatureEffect(ids, opts)

设置Feature效果(开启前必须通过setFeatureEffect设置参数)
Parameters:
Name Type Description
ids Array featureID数组
opts Object 特效参数
Properties
Name Type Argument Default Description
color Color 颜色/闪烁颜色(canFlash参数为true时必传)
show Boolean Feature是否可见
canFlash Boolean 是否闪烁(Feature可见时生效)
duration Number <optional>
2 闪烁时长,默认时长为2s
count Number <optional>
2 闪烁的次数,默认为2次
field String <optional>
id 字段名称

setGradientEffect(opts)

设置渐变特效参数
Parameters:
Name Type Description
opts Object 特效参数
Properties
Name Type Description
startHeight Number 起始高度(单位米),默认0.0
endHeight Number 终了高度(单位米),默认50.0
startColor Color 起始颜色,默认为#000000
endColor Color 终了颜色,默认为rgba(0,127.5,255,1.0)

setGradientImageEffect(opts)

设置图片融合渐变特效参数
Parameters:
Name Type Description
opts Object 特效参数
Properties
Name Type Description
startHeight Number 渐变区域的最小高度(单位米),默认0.0
endHeight Number 渐变区域的最大高度(单位米),默认100.0
startImage String 渐变区域的最小高度对应的图片Url;图片中透明度为与模型原始颜色融合比例;0.5场合,会融合50%
endImage String 渐变区域的最大高度对应的图片Url
region Array 设置图层渐变区域,例如:[{lon:119,lat:59},{lon:120,lat:60}];

setLineamentEffect(opts)

设置白膜轮廓特效参数
Parameters:
Name Type Description
opts Object 特效参数
Properties
Name Type Description
startHeight Number 最大高度(单位米),默认0.0
duration Number 持续时间,默认0.5
color Color 起始颜色,默认为#000000
limeanetID Number 选中的featureid,默认9999
twinkle Boolean 是否闪烁,默认false
model Object 选中的model

setModelSilhouette(feature, options)

Parameters:
Name Type Description
feature Cesium3DTileFeature
options Object 轮廓选项
Properties
Name Type Argument Default Description
color Object <optional>
"yellow" 轮廓选项
size Object <optional>
0.05 轮廓宽度,像素为单位的边缘长度

setMultiClippingPlanes(value, areasInfo)

设置多裁剪平面
Parameters:
Name Type Description
value Cesium.MultiClippingPlaneCollection 多裁剪平面
areasInfo Object 裁剪区域信息

setStandardView(view [, options])

设置标准视图
Parameters:
Name Type Argument Description
view Glodon.CIMCube.Global.Defines.StandardView 标准视图
options Object <optional>
参数:
Properties
Name Type Argument Default Description
duration Number <optional>
飞行的持续时间(以秒为单位)。如果省略,会尝试根据飞行距离计算理想的持续时间
distanceScale Number <optional>
2 距离系数
complete Camera.FlightCompleteCallback <optional>
飞行完成时执行的函数

setStyleFromGeojson(style)

Parameters:
Name Type Description
style Object 样式对象

showSubLayers(layers)

显示子图层
Parameters:
Name Type Description
layers Array.<String> 子图层的id数组

spatialAdjust(sourcePoints, targetPoints)

模型的对齐校正
Parameters:
Name Type Description
sourcePoints Array 原始经纬度列表,例:[{lon:116,30.2,10},...]
targetPoints Array 校正后经纬度列表,例:[{lon:118,29.1,20},...]
Returns:
矫正结果
Type
Object

updateLayerTransformation()

更新图层变换

worldPositionToLocal(worldPosition)

通过世界坐标获取模型局部坐标
Parameters:
Name Type Description
worldPosition Cartesian3 笛卡尔世界坐标
Returns:
模型局部坐标
Type
Cartesian3

zoomToSubLayer(layer)

缩放至子图层
Parameters:
Name Type Description
layer String 子图层的id

Events


LOADED

数据加载完成后触发
Example
layer.on(Glodon.CIMCube.Global.Defines.LayerEventType.LOADED, function (event) {
 console.log(event);
})

TILELOADED

瓦片完成时触发
Example
layer.on(Glodon.CIMCube.Global.Defines.LayerEventType.TILELOADED, function (event) {
 console.log(event);
})

TRANSFORM_CHANGED

图层变换矩阵发生变化后触发
Example
layer.on(Glodon.CIMCube.Global.Defines.LayerEventType.TRANSFORM_CHANGED, function (event) {
 console.log(event);
})

VISIBLE

瓦片显示时触发
Example
layer.on(Glodon.CIMCube.Global.Defines.LayerEventType.VISIBLE, function (event) {
 console.log(event);
})