1. ScanArea

圆形扫描区域 实现圆形扫描区域,可进行设置位置、扫描速率、半径、颜色、场景扫描、闪电、雾场景渲染,扫描类型为圆形、雷达。

1.1. 初始化 new ScanArea(options)

Param Type Default Description
options Object

配置

options.position Array

含经纬度高程的中心点,如[120,30,20]

options.type String

扫描类型,类型可为'radar'或者'circle'。

[options.height] Number 0

可选,高度,默认为0。

[options.radius] Number 500

可选, 扫描半径,默认为500。

[options.color] String '#FF0000'

可选,颜色,默认为'#FF0000'。

[options.duration] Number 2000

可选, 扫描速率,毫秒,默认为2000。

[options.percent] Number 0.8

可选,百分比,只对雾场景主题options.theme=true时有效,用于调节雾浓度,默认为0.8。

[options.N] Number 4.0

可选, N次方,用于计算环宽度,对type为'circle'时有效,N越大,环宽度越小,默认为4.0,

[options.light] Boolean false

可选, 是否启用光场景扫描效果,true为启用,false为不启用,默认为false。

[options.flash] Boolean false

可选, 是否启用闪光,true为启用,false为不启用,默认为false。

[options.theme] Boolean false

可选,是否启用雾场景主题,true为启用,false为不启用,默认为false。

Example

let scan = new BOSGeo.ScanArea({
    position: [114.054437, 22.551279, 5], //经纬度中心点
    type: 'circle',   // 'circle'、'radar' 扫描类型为圆形 雷达
    duration: 1000,   // 扫描速率
    color: '#F0FFFF', // 颜色
    radius: 200,      // 扫描半径
    // light: true,   // 是否场景扫描效果
    // flash: true,    // 是否闪电
    theme: true         //启用雾场景主题
});

1.2. 方法

1.2.1. scanArea.add(options)

添加扫描

Param Type Default Description
options Object

配置

options.position Array

含经纬度高程的中心点,如[120,30,20]

options.type String

扫描类型,类型可为'radar'或者'circle'。

[options.height] Number 0

可选,高度,默认为0。

[options.radius] Number 500

可选, 扫描半径,默认为500。

[options.color] String '#FF0000'

可选,颜色,默认为'#FF0000'。

[options.duration] Number 2000

可选, 扫描速率,毫秒,默认为2000。

[options.percent] Number 0.8

可选,百分比,只对雾场景主题options.theme=true时有效,用于调节雾浓度,默认为0.8。

[options.N] Number 4.0

可选, N次方,用于计算环宽度,对type为'circle'时有效,N越大,环宽度越小,默认为4.0,

[options.light] Boolean false

可选, 是否启用光场景扫描效果,true为启用,false为不启用,默认为false。

[options.flash] Boolean false

可选, 是否启用闪光,true为启用,false为不启用,默认为false。

[options.theme] Boolean false

可选,是否启用雾场景主题,true为启用,false为不启用,默认为false。

1.2.2. scanArea.lightup(scanColor, position)

添加光效场景扫描

Param Type Description
scanColor Color

颜色

position Array

含经纬度高程的中心点[120,30,20]

Example

let color = BOSGeo.Color.fromCssColorString('#f2feff');
let center = [120, 23, 20]
scan.lightup(color, center);

1.2.3. scanArea.flashup(scanColor)

添加闪电

Param Type Description
scanColor Color

颜色

Example

let color = BOSGeo.Color.fromCssColorString('#f2feff');
scan.flashup(color);

1.2.4. scanArea.themeup(scanColor)

场景主题

Param Type Description
scanColor Color

颜色

Example

let color = BOSGeo.Color.fromCssColorString('#f2feff');
scan.themeup(color);

1.2.5. scanArea.remove(type)

根据类型移除效果

Param Type Description
type String

类型为 circle radar light flash theme

Example

scan.remove('circle');

1.2.6. scanArea.removeAll()

移除全部

Example

scan.removeAll();
版权所有@盈嘉互联(北京)科技有限公司 京ICP备15051988号-9 Copyright © 2022 all right reserved,powered by Gitbook该文件修订时间: 2022-02-22 17:53:54

results matching ""

    No results matching ""