构造函数,示例如下:
// 网络图像数据源
const image_net:ImageEntity = new ImageEntity('https://webmap0.bdimg.com/wolfman/static/common/images/new/newlogo-new_3c175be.png');
// rawfile图像数据源
const image_rawfile:ImageEntity = new ImageEntity('rawfile://custom_logo.png');
// PixelMap图像像素类,可以通过OffscreenCanvas获取
private settings: RenderingContextSettings = new RenderingContextSettings(true)
let offContext = this.offCanvas.getContext("2d", this.settings);
/**** 省略画布图像操作 ****/
let pixelmap = offContext.getPixelMap(150, 150, 130, 130);
const image_pixelmap:ImageEntity = new ImageEntity(pixelmap, vp2px(130), vp2px(130));
图像来源 必填
Optional width: number | ImageOpt图像宽度 选填
Optional height: number图像高度 选填
Optional options: ImageOpt图像操作 选填
1.0.0
图像数据
1.1.0
图像资源类
Abstract
提供地图覆盖物需要的图像资源
Since
1.0.0
Package
@bdmap/map