Tileset

3dTiles模型封装

new TS.Tileset(url, options)

3dTiles模型封装
Name Type Description
url String 3dTiles路径
options Object 配置

Extends

Members

allowDrillPick : Boolean

获取 或 设置 是否支持穿透选择
Inherited From:
获取 或 设置属性
Inherited From:

delegate : Cesium.Entity

获取CesiumEntity对象
Inherited From:

description : String

描述
Inherited From:

editabled : Boolean

获取 或 设置 是否可编辑
Inherited From:
获取 name
Inherited From:
获取父类
Inherited From:
鼠标点击订阅
Inherited From:
鼠标双击订阅
Inherited From:
鼠标离开订阅
Inherited From:
鼠标悬浮订阅
Inherited From:

onMouseRightClick

订阅鼠标右键点击
Inherited From:
覆盖物添加订阅
Inherited From:

onOverlayRemoved : Event

覆盖物移除订阅
Inherited From:

readonly overlayId : String

获取底层Id
Inherited From:

properties : Object

获取 或 设置属性

readyPromise : Promise.<Cesium.Cesium3DTileset>

获取准备回调
获取 或 设置X轴旋转的角度
获取 或 设置Y轴旋转的角度
获取 或 设置Z轴旋转的角度
获取 或者 设置 缩放的大小
获取 或 设置是否显示
Inherited From:
获取状态
Inherited From:

Methods

快速添加到图层中
Name Type Description
layer Layer
Returns:
Inherited From:
删除图层
Returns:
Inherited From:
飞行到覆盖物
Inherited From:

setCustomShader(customShader)Tileset

获取 或 设置着色器
Name Type Description
customShader String 着色器代码
Returns:
设置高度
Name Type Description
height Number
Returns:

setLabel(text, textStyle)Overlay

设置Label
Name Type Description
text stirng
textStyle
Returns:
Inherited From:

setPosition(position)Tileset

设置位置
Name Type Description
position Position
Returns:
旋转
Name Type Description
x Number X方向旋转量
y Number Y方向旋转量
z Number Z方向旋转量
设置缩放
Name Type Description
scale Number 缩放比例,用小数标识
Returns:
设置样式
Name Type Description
style Cesium.Cesium3DTileStyle 3DTiles的样式
Returns:
Example:
let style = new TS.TilesetStyle({
  color: {
    conditions: [
      ['${Height} >= 100', 'color("purple", 0.5)'], //Height 为模型设置的属性
      ['${Height} >= 50', 'color("red")'],
      ['true', 'color("blue")'],
    ],
  },
  show: '${Height} > 0',
})

toGeojson()string

保存为Geojson
Returns:
Inherited From:
缩放到覆盖物
Inherited From: