layer
Functions
- addLandmark(jsonData, callback)
添加地标点
- updateLandmark(jsonData, callback)
更新标点数据
- setIconProperty(jsonData, callback)
更新标点数据
- setIconStyle(jsonData, callback)
更新标点数据
- setDomState(jsonData)
更新标点数据
- removeLandmark(jsonData, callback)
删除地标点
- setOverlayVisibility(jsonData, callback)
设置图层显隐
- removeOverlay(jsonData, callback)
删除图层
- getOverlaysOrder(jsonData, callback)
获取图层顺序
- moveOverlayForward(jsonData, callback)
前移图层
- moveOverlayBackward(jsonData, callback)
后移图层
- addPath(jsonData, callback)
添加路径
- updatePathCoord(jsonData, callback)
更新路径数据
- updatePathStyle(jsonData, callback)
更新路径数据
- addPartical(jsonData, callback)
序列帧动画,表现闪烁,火光,烟雾等
- updatePartical(jsonData, callback)
更新序列帧动画的样式,表现闪烁,火光,烟雾等
- addArea(jsonData, callback)
添加区域
- updateAreaCoord(jsonData, callback)
更新区域数据
- updateAreaStyle(jsonData, callback)
更新区域样式
- addCubeHeat(jsonData, callback)
添加立体热力图
- updateCubeHeatCoord(jsonData, callback)
更新立体热力图数据
- updateCubeHeatStyle(jsonData, callback)
更新立体热力图样式
- addSmog(jsonData, callback)
创建烟雾
- updateSmog(jsonData, callback)
更新烟雾
addLandmark(jsonData, callback)
添加地标点
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.iconSize | String | 尺寸类型 fix固定大小(不被相机深度衰减) real真实大小(会被相机深度衰减) |
jsonData.url | String | 地标图路径 |
jsonData.originPoint | String | 地标原点 center: 中点 bottom: 底部中点 |
jsonData.iconContentType | String | 内容类型 text文本 icon矢量图 |
jsonData.offsetX | Number | 文本或者矢量图X方向偏移值 |
jsonData.offsetY | Number | 文本或者矢量图Y方向偏移值 |
jsonData.fontFamily | String | 文本字体 |
jsonData.fontSize | Number | 字体大小 |
jsonData.color | String | 字体颜色 |
jsonData.content | String | 文本内容 |
jsonData.coordType | Number | XY 轴坐标类别,0:X 米,Y米; 1: X 经度,Y 纬度 |
jsonData.position | Array | 定位点 |
callback | function | 回调函数 |
updateLandmark(jsonData, callback)
更新标点数据
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.originPoint | String | 地标原点 center: 中点 bottom: 底部中点 |
jsonData.content | String | 文本内容 |
jsonData.coordType | Number | XY 轴坐标类别,0:X 米,Y米; 1: X 经度,Y 纬度 |
jsonData.position | Array | 定位点 |
jsonData.scale | Array | 缩放比例 |
callback | function | 回调函数 |
setIconProperty(jsonData, callback)
更新标点数据
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.originPoint | String | 地标原点 center: 中点 bottom: 底部中点 |
jsonData.content | String | 文本内容 |
jsonData.coordType | Number | XY 轴坐标类别,0:X 米,Y米; 1: X 经度,Y 纬度 |
jsonData.position | Array | 定位点 |
jsonData.scale | Array | 缩放比例 |
callback | function | 回调函数 |
setIconStyle(jsonData, callback)
更新标点数据
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.originPoint | String | 地标原点 center: 中点 bottom: 底部中点 |
jsonData.content | String | 文本内容 |
jsonData.coordType | Number | XY 轴坐标类别,0:X 米,Y米; 1: X 经度,Y 纬度 |
jsonData.position | Array | 定位点 |
jsonData.scale | Array | 缩放比例 |
callback | function | 回调函数 |
setDomState(jsonData)
更新标点数据
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.visible | Boolean | 弹窗显隐 |
jsonData.boxOffsetX | Number | 横向偏移 |
jsonData.boxOffsetY | Number | 纵向偏移 |
jsonData.element | HTMLElement | 弹窗内容 |
removeLandmark(jsonData, callback)
删除地标点
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
callback | function | 回调函数 |
setOverlayVisibility(jsonData, callback)
设置图层显隐
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | Array | 场景已有的模型唯一辨识 |
jsonData.visible | Boolean | 模型的显隐状态,true: 显示,false:隐藏 |
callback | function | 回调函数 |
removeOverlay(jsonData, callback)
删除图层
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
callback | function | 回调函数 |
getOverlaysOrder(jsonData, callback)
获取图层顺序
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
callback | function | 回调函数 |
moveOverlayForward(jsonData, callback)
前移图层
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.offset | Number | 前移数 |
callback | function | 回调函数 |
moveOverlayBackward(jsonData, callback)
后移图层
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.offset | Number | 后移数 |
callback | function | 回调函数 |
addPath(jsonData, callback)
添加路径
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.coordType | Number | XY 轴坐标类别,0:X 米,Y米; 1: X 经度,Y 纬度 |
jsonData.points | Array | 路径点——对象数组{coord,coordZ},coord:XY轴坐标(数组),coordZ:Z轴坐标(单位:米) |
jsonData.color | String | 路径颜色 |
jsonData.width | Number | 路径宽度(单位:米) |
callback | function | 回调函数 |
updatePathCoord(jsonData, callback)
更新路径数据
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.coordType | Number | XY 轴坐标类别,0:X 米,Y米; 1: X 经度,Y 纬度 |
jsonData.points | Array | 路径点——对象数组{coord,coordZ},coord:XY轴坐标(数组),coordZ:Z轴坐标(单位:米) |
callback | function | 回调函数 |
updatePathStyle(jsonData, callback)
更新路径数据
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.color | String | 路径颜色 |
jsonData.width | Number | 路径宽度(单位:米) |
callback | function | 回调函数 |
addPartical(jsonData, callback)
序列帧动画,表现闪烁,火光,烟雾等
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | object | 参数 |
jsonData.dirUrl | string | 贴图路径目录 |
jsonData.texture | Array | 包含贴图名的String序列 |
jsonData.size | number | 贴图大小 |
jsonData.appearance | number | 1整个面向镜头,2垂直面向镜头,3水平放置 |
jsonData.speed | number | 速度0~100 |
jsonData.bloom | boolean | 是否发光,true发辉光,false不发光 |
jsonData.isBloom | boolean | 是否发光,true发辉光,false不发光 |
callback | function | 回调函数 |
updatePartical(jsonData, callback)
更新序列帧动画的样式,表现闪烁,火光,烟雾等
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | object | 参数 |
jsonData.dirUrl | string | 贴图路径目录 |
jsonData.texture | Array | 包含贴图名的String序列 |
jsonData.size | number | 贴图大小 |
jsonData.appearance | number | 1整个面向镜头,2垂直面向镜头,3水平放置 |
jsonData.speed | number | 速度0~100 |
jsonData.bloom | boolean | 是否发光,true发辉光,false不发光 |
jsonData.isBloom | boolean | 是否发光,true发辉光,false不发光 |
jsonData.path | Array | 位置描述的number数组 |
callback | function | 回调函数 |
addArea(jsonData, callback)
添加区域
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.coordType | Number | XY 轴坐标类别,0:X 米,Y米; 1: X 经度,Y 纬度 |
jsonData.height | Number | 区域高度 |
jsonData.isClosure | Boolean | 是否闭合区域 |
jsonData.map | String | 贴图URL,无就使用默认贴图 |
jsonData.direction | Number | 区域流动方向 0: 向上 1: 向右 2:向左 3: 向下 |
jsonData.color | String | 区域颜色 |
jsonData.speed | Number | 流动速度 |
jsonData.points | Array | 路径点——对象数组{coord,coordZ},coord:XY轴坐标(数组),coordZ:Z轴坐标(单位:米) |
callback | function | 回调函数 |
updateAreaCoord(jsonData, callback)
更新区域数据
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.coordType | Number | XY 轴坐标类别,0:X 米,Y米; 1: X 经度,Y 纬度 |
jsonData.points | Array | 路径点——对象数组{coord,coordZ},coord:XY轴坐标(数组),coordZ:Z轴坐标(单位:米) |
callback | function | 回调函数 |
updateAreaStyle(jsonData, callback)
更新区域样式
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.height | Number | 区域高度 |
jsonData.isClosure | Boolean | 是否闭合区域 |
jsonData.direction | Number | 区域流动方向 0: 向上 1: 向右 2:向左 3: 向下 |
jsonData.color | String | 区域颜色 |
jsonData.speed | Number | 流动速度 |
callback | function | 回调函数 |
addCubeHeat(jsonData, callback)
添加立体热力图
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.coordType | Number | XY 轴坐标类别,0:X 米,Y米; 1: X 经度,Y 纬度 |
jsonData.opacity | Number | 透明度 |
jsonData.precision | Number | 网格精度 |
jsonData.height | Number | 全局最大高度 |
jsonData.colorType | String | 色彩类型 rainbow:彩虹 cooltowarm:冷暖色 blackbody:黑色 grayscale:灰色 |
jsonData.wireframe | Boolean | 是否线框模式 |
jsonData.points | Array | 路径点——对象数组{coord,coordZ},coord:XY轴坐标(数组),coordZ:权重,radius:半径(单位:米) |
callback | function | 回调函数 |
updateCubeHeatCoord(jsonData, callback)
更新立体热力图数据
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.coordType | Number | XY 轴坐标类别,0:X 米,Y米; 1: X 经度,Y 纬度 |
jsonData.points | Array | 路径点——对象数组{coord,coordZ},coord:XY轴坐标(数组),coordZ:权重,radius:半径(单位:米) |
callback | function | 回调函数 |
updateCubeHeatStyle(jsonData, callback)
更新立体热力图样式
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | Object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.opacity | Number | 透明度 |
jsonData.precision | Number | 网格精度 |
jsonData.height | Number | 全局最大高度 |
jsonData.colorType | String | 色彩类型 rainbow:彩虹 cooltowarm:冷暖色 blackbody:黑色 grayscale:灰色 |
jsonData.wireframe | Boolean | 是否线框模式 |
callback | function | 回调函数 |
addSmog(jsonData, callback)
创建烟雾
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.position | Array | 定位点 |
jsonData.color | String | 颜色 |
jsonData.luminance | Number | 明度 |
jsonData.opacity | Number | 不透明度 |
jsonData.size | Number | 尺寸 |
jsonData.rotationY | Number | 绕Y轴旋转角度 |
jsonData.speed | Number | 速度 |
jsonData.path | Array | 烟雾位置[x,y,z,x,y,z...] |
callback | function | 回调函数 |
updateSmog(jsonData, callback)
更新烟雾
Kind: global function
Param | Type | Description |
---|---|---|
jsonData | object | 参数 |
jsonData.index | String | 场景已有的模型唯一辨识 |
jsonData.color | String | 颜色 |
jsonData.luminance | Number | 明度 |
jsonData.opacity | Number | 不透明度 |
jsonData.size | Number | 尺寸 |
jsonData.rotationY | Number | 绕Y轴旋转角度 |
jsonData.speed | Number | 速度 |
jsonData.path | Array | 烟雾位置[x,y,z,x,y,z...] |
callback | function | 回调函数 |