# new PrintControl(options)
打印工具
参数:
| 名称 | 类型 | 描述 | 
|---|---|---|
options | 
  
  Object | 构造参数  | 
sizeModes | 
  
  Array.<String> | 目前支持 ['Current', 'A4Landscape', 'A4Portrait']  | 
filename | 
  
  String | 打印文件名  | 
exportOnly | 
  
  Boolean | 是否仅导出  | 
hideControlContainer | 
  
  Boolean | 隐藏控件容器  | 
示例
// ES5引入方式
const { Map, MapView } = Zondy
const { PrintControl } = Zondy.Widget
// ES6引入方式
import { Map, MapView, PrintControl } from "@mapgis/webclient-leaflet-plugin"
// 初始化图层管理容器
const map = new Map();
// 初始化地图视图对象
const mapView = new MapView({
  // 视图id
  viewId: "viewer-id",
  // 图层管理容器
  map: map
});
// 打印控件
const printControl = new PrintControl({
  view: mapView,
  visible: true
})
// 添加控件
mapView.ui.add(printControl)
    
                    