qm-map-canvas
v1.0.5
Published
feature canvas print tool base on canvas
Downloads
15
Readme
qm-map-canvas
qm-map-canvas 是一款基于 React、Mapboxgl 的 canvas 的要素出图工具
安装
使用 npm 或 yarn 安装
npm install qm-map-canvas --force
依赖
qm-map-canvas 开发依赖于[email protected],file-saver,jspdf 库
使用
import { MapUtil } from "qm-map-canvas";
const map = new Map();
type TOption={
mapData: any;
mapDataExtent:number[]
mapBaseUrl: string
mapZoom?: number,
canvasWidth?: number,
canvasHeight?: number,
canvasTitle?:string
}
const mapUtil = new MapUtil(options);
// 添加底图
mapUtil.getBaseLayer();
// 出图
mapUtil.addLineCanvasLayer();
mapUtil.addPolygonCanvasLayer();
mapUtil.addPointCanvasLayer();