KmlLayer

GeoJson 图层

new TS.KmlLayer(url, id)

GeoJson 图层
Name Type Description
url String 读取路径的URl
id String 可选的 图层的唯一ID

Extends

Members

_viewer : Cesium.Viewer

Inherited From:
获取或者设置属性
Inherited From:

readonly delegate

获取 Cesium原生对象
Inherited From:

editabled : Boolean

获取 或 设置 是否可以编辑
Inherited From:
获取 图层的ID标识
Inherited From:

layerId : string

获取图层的底层唯一标识
Inherited From:

readonly onLayerAdded : Event

图层添加订阅
Inherited From:

readonly onLayerRemoved : Event

图层移除订阅
Inherited From:
Inherited From:
获取或设置图层的显示状态
Inherited From:
获取状态
Inherited From:

readonly values : Array.<Overlay>

获取全部
Inherited From:

Methods

添加一个或多个覆盖物(要素)
Name Type Description
overlay Overlay | Array.<Overlay> | Cesium.Entity | Array.<Cesium.Entity>
Returns:
Inherited From:
直接添加到识图中
Name Type Description
viewer Viewer
Returns:
Inherited From:
清空全部覆盖物 子类需要重写
Inherited From:
将本图层销毁,并且移除viewer
Inherited From:
销毁图层
Inherited From:

each(method, context)LayerBase

迭代每个覆盖物并将其作为参数传递给回调函数
Name Type Description
method LayerBase.Callback 循环方法
context Object 上下文,如果传入,则第一个参数是这个,否则是this
Returns:
Inherited From:
Example:
layer.each(function(context,overlay){
  // To Do Something
})

exportKml(modelCallback)

导出Kmz
Name Type Description
modelCallback
Inherited From:
飞行到图层
Inherited From:

getAll()Array.<Overlay>

获取全部覆盖物
Returns:
Inherited From:

getById(id)Overlay|undefined

根据覆盖物ID获取覆盖物
Name Type Description
id String 覆盖物ID
Returns:
Inherited From:

getByName(name)Overlay|undfined

根据name获取覆盖物
Name Type Description
name String Name
Returns:
Inherited From:

getByProperties(attrName, attrVal)

根据属性字段和属性值获取覆盖物
Name Type Description
attrName String 属性字段
attrVal Object 属性值
Returns:
Inherited From:
移除覆盖物
Name Type Description
overlay Overlay
Returns:
Inherited From:

setStyle(style)

sets the style, the style will apply to every overlay of the layer Subclasses need to be overridden
Name Type Description
style
Inherited From:
保存到Geojson
Returns:
Inherited From:

toModelLayer(ModelUrl)VectorLayer

将图层中的点,赋予模型
Name Type Description
ModelUrl
Returns:

toVectorLayer()Promise

将当前图层转换成矢量图层
Returns:
完成转换的回调
缩放到图层
Inherited From: