1. Interpolation

kriging插值

1.1. new Interpolation(options)

Param Type Default Description
options

echarts配置

options.points Object

数据点集合。

[options.colors] Array ['#60ff44',"#01A600"]

颜色条带。

options.bounds Array

插值边界范围经纬度坐标数组。

[options.valueField] String 'weight'

用于插值统计的字段名,默认为'weight'。

[options.x] String 'x'

统计的经度字段名,默认为'x'。

[options.y] String 'y'

统计的纬度字段名,默认为'y'。

[options.gridDistance] Number 0.005

地图栅格分辨率,单位度。

[options.canvasWidth] Number 2000

插值图宽度。

[options.canvasHeight] Number 2000

插值图高度。

[options.opacity] Number 0.8

插值图层不透明度,范围为[0,1]。

[options.model] String 'exponential'

插值训练模型方法,有gaussian、exponential或spherical模型,默认为'exponential'。

[options.id] String

插值图canvas的div的id,不设置时使用createGuid()生成唯一值。

Example

let interpolation = new BOSGeo.Interpolation({   //kriging插值
    points: point, //数据点集合。
    bounds: bounds, //边界范围,存在时,lngRange、latRange不起作用。
    opacity: 0.8,  // 插值图层不透明度。
    gridDistance: 0.002 //地图栅格分辨率,单位度。
});

1.2. 属性

属性名 Type Description
show Boolean

是否显示

opacity Number

透明度,范围为0-1。

1.3. 方法

1.3.1. interpolation.returnImgae() ⇒ String

生成瓦片图片

Returns : String -

返回base64的图片对象

Example

let interpolation = new BOSGeo.Interpolation({   //kriging插值
    points: point, //数据点集合。
    bounds: bounds, //边界范围。                                     
    opacity: 0.8,  // 插值图层不透明度。
    gridDistance: 0.002 //地图栅格分辨率,单位度。
});
let img = interpolation.returnImgae();

1.3.2. interpolation.setData(points, bounds)

更新数据与范围

Param Type Description
points Array

点合集

bounds Array

边界范围

Example

let interpolation = new BOSGeo.Interpolation({   //kriging插值
    points: point, //数据点集合。
    bounds: bounds, //边界范围。
    opacity: 0.8,  // 插值图层不透明度。
    gridDistance: 0.002 //地图栅格分辨率,单位度。
});
interpolation.setData(points, bounds);

1.3.3. interpolation.zoomTo()

缩放至本图层

1.3.4. interpolation.remove()

添加前移除

1.3.5. interpolation.destroy()

销毁

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

results matching ""

    No results matching ""