cesium-print Plugin
Cesium 动态打印插件 cesium-print is a plugin for cesium printing
Usage
Include it in your code after importing npm, like:
npm install cesium-print -dev
Use it like:
;
viewer = "cesiumContainer" contextOptions: id: "cesiumCanvas"//must webgl: preserveDrawingBuffer: true //打印cesium canvas dom CesiumPrint ;
You can submit the options object like:
//打印cesium canvas dom CesiumPrint ; }) ;
Currently this plugin supports the following options:
penColor
- Default:
red
- Acceptable-Values: color string
- Function Desc: pen Color
strokeWidth
- Default:
1
- Acceptable-Values: number
- Function: stroke width ( unit px )
width
- Default:
978
- Acceptable-Values: number
- Function: print width ( unit px )
height
- Default:
650
, creates a hidden iframe if no-vaild iframe selector is passed - Acceptable-Values: number
- Function: print width ( unit px )
fontSize
- Default:
32
- Acceptable-Values: number
- Function: print title font size ( unit px )
downLoadEnable
- Default:
true
- Acceptable-Values: Boolean
- Function: down load print file enable
title
- Default:
print
, uses the host page title - Acceptable-Values: Any single-line string
- Function: To change the printed title
Browsers
- Google Chrome - v ...
- Firefox - v ...
License
....
Demo
Code Demo
https://github.com/richard1015/cesium-vue-example /(cesium-print,cesium-navigation-es6)
Other Cesium Plugin
Like our work? Get in touch 51844712@qq.com!