Class: BillboardEntity

Glodon.CIMCube.Animation.Effect. BillboardEntity

Cesium锚点(即将废弃)

new BillboardEntity(map, opt)

Cesium锚点
Parameters:
Name Type Description
map Glodon.CIMCube CIMCube实例
opt Object Cesium锚点参数
Properties
Name Type Description
originPosition Object 锚点位置 对象内属性lon,lat,height
Properties
Name Type Description
lon Number 经度
lat Number 纬度
height Number 高度
billboard Object 锚点图片
Properties
Name Type Description
imageUrl String 锚点图片URL
width Number 锚点图片宽度
height Number 锚点图片高度
scale Number 锚点图片比例
label Object 文字标签
Properties
Name Type Description
text String 文字标签内容
font String 字体;'12pt Microsoft YaHei',
fillColor String 字体颜色
outlineWidth Number 描边宽度
outlineColor String 描边颜色
pixelOffsetX Number 偏移量 x
pixelOffsetY Number 偏移量 y
showBackground Boolean 是否使用背景色,默认为false
backgroundColor String 背景色,默认为白色
backgroundPaddingX Number 背景padding的X,默认为0
backgroundPaddingY Number 背景padding的Y,默认为0
opts.disableDepthTestDistance Number 相机离图形的距离大于该值则开启深度检测(单位米)

Members


enableMouseMove :boolean

是否允许鼠标移动事件
Type:
  • boolean

Methods


addEventListener(type, listener [, thisArg])

在此事件派发器上添加事件监听.
Parameters:
Name Type Argument Description
type string 事件类型.
listener function 事件监听器.
thisArg Object <optional>
事件监听器的this指针(可选).
Returns:
调用时将删除此事件侦听器的函数.
Type
function

dispatchEvent(event)

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

dispose()

释放资源

hasEventListener(type [, listener])

检查此事件派发器上是否存在事件监听,如果不传递事件监听器,则判断是否存在指定事件类型的事件监听.
Parameters:
Name Type Argument Description
type string 事件类型
listener function <optional>
事件监听器(可选).
Returns:
是否存在指定类型及指定事件监听器的事件监听.
Type
boolean

hide()

隐藏

off(type, listener)

从此事件派发器上删除指定事件监听.
Parameters:
Name Type Description
type string 事件类型.
listener function 事件监听器.

on(type, listener [, thisArg])

在此事件派发器上添加事件监听.
Parameters:
Name Type Argument Description
type string 事件类型.
listener function 事件监听器.
thisArg Object <optional>
事件监听器的this指针(可选).

removeEventListener(type, listener)

从此事件派发器上删除指定事件监听.
Parameters:
Name Type Description
type string 事件类型.
listener function 事件监听器.

removeEventListeners(type)

从此事件派发器上删除事件监听,如果不提供事件类型,则删除全部事件监听.
Parameters:
Name Type Description
type string 事件类型.

show()

显示

Events


LEFT_CLICK

鼠标左键点击触发
Example
billboardEntity.on(Glodon.CIMCube.Global.Defines.ScreenSpaceEventType.LEFT_CLICK, function (event) {
 console.log(event);
})