FeatureManager

new FeatureManager()

Tileset中Feature管理类

Methods

cancelCustomColor()

取消自定义颜色模式

cancelHighlight()

取消高亮

cancelOnlyHide()

显示隐藏的Feature

cancelOnlyShow()

取消只显示模式

cancelSelected()

取消 高亮、闪烁、只显示、只隐藏

cancelTwinkled()

取消闪烁

customColor(ids, colorFn)

指定自定义颜色的Feature
Name Type Description
ids Array.<String>
colorFn function 接受指定Feature的Id,根据Id返回该Feature应该要设置的颜色值

getFeatureId(feature)String|undefined

获取Feature的Id
Name Type Description
feature Object Cesium3DTileFeature类型
Returns:

getPathName(tileset)String

获取Tileset对象的layerPathLayerNode#path
Name Type Description
tileset Cesium3DTileset
Returns:

getSourceName(uri)String|undefined

根据uri获取数据源
Name Type Description
uri String
Returns:

highlight(id, color)

高亮 Feature
Name Type Description
id String feature的Id,获取Id方法 FeatureManager#getFeatureId
color Color 颜色可以自定义

highlightMulti(id, color)

高亮 Feature
Name Type Description
id String feature的Id,获取Id方法 FeatureManager#getFeatureId
color Color 颜色可以自定义

onlyHide(ids)

只隐藏指定Feature
Name Type Description
ids Array.<String> 获取Id方法 FeatureManager#getFeatureId

onlyShow(ids)

只显示指定Feature,其余Feature隐藏
Name Type Description
ids Array.<String> 获取Id方法 FeatureManager#getFeatureId

removeCustomColor(ids)

移除指定自定义颜色的Feature
Name Type Description
ids Array.<String>

setHideColor(color)

设置隐藏色
Name Type Description
color Color

setHighlightColor(color)

设置高亮色
Name Type Description
color Color

twinkled(id)

闪烁指定Feature
Name Type Description
id String 获取Id方法 FeatureManager#getFeatureId

updateCustomColor(ids)

更新指定自定义颜色的Feature
Name Type Description
ids Array.<String>