KMLLayer

new YS.KMLLayer(ys)

KML文件解析
Name Type Description
ys YouScene YouScene的实例化对象

Methods

addEntity(entity)

加载实体
Name Type Description
entity Icon | Line | Polygon entity实体

clear(entity)

清空KMLLayer
Name Type Description
entity Icon | Line | Polygon 实体

destroy(entity)

销毁KMLLayer
Name Type Description
entity Icon | Line | Polygon 实体

exportKML(entity)String

实体导出kml字符串
Name Type Description
entity Icon | Line | Polygon 实体
Returns:

getById(id)Icon|Line|Polygon

根据id查找实体
Name Type Description
id String entity的id
Returns:
entity实体

loadKML(kml)Array.<(Icon|Line|Polygon)>

加载kml字符串
Name Type Description
kml Sting kml字符串
Returns:

remove(entity)

删除实体
Name Type Description
entity Icon | Line | Polygon entity实体

Events

click

点击kml实体事件
Name Type Description
entity Icon | Line | Polygon 点击的kml实体