1.5.1 • Published 11 months ago

@bdh-gis/mapbox-gl-print v1.5.1

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

<< 所有组件

🏷️ @bdh-gis/mapbox-gl-print

地图打印

npm i @bdh-gis/mapbox-gl-print
import Print from '@bdh-gis/mapbox-gl-print';
import '@bdh-gis/mapbox-gl-print/src/index.css';

map.addControl(new Print({
  width: 100,
  height: 100,
  format: 'png',
  dpi: 96,
  isCreateCrosshair: true,
  isCreatePrintArea: true
}));

Options

export type AnyEvent =
  | 'CONTROL_BUTTON_CLICK'
  | 'CREATE_BUTTONS'
  | 'CREATE_PANEL'
  | 'PANEL_CLOSE'
  | 'PANEL_RESET'
  | 'WIDTH_CHANGE'
  | 'HEIGHT_CHANGE'
  | 'FORMAT_CHANGE'
  | 'DPI_CHANGE'
  | 'PRINT';
export type Panel = {
  header?: HTMLDivElement;
  headerTitle?: HTMLDivElement;
  headerClose?: HTMLDivElement;
  body?: HTMLDivElement;
  bodyEditRows?: {
    row: HTMLDivElement;
    rowLabel: HTMLDivElement;
    rowValue: HTMLDivElement | HTMLInputElement | HTMLSelectElement;
  }[];
  bodyButtonsRow?: HTMLDivElement;
  bodyButtons?: HTMLDivElement[];
  width?: number;
  height?: number;
  format?: string;
  dpi?: number;
  crosshair?: CrosshairManager;
  printArea?: PrintAreaManager;
};
export type Options = {
  width?: number;
  height?: number;
  format?: string;
  dpi?: number;
  isCreateCrosshair?: boolean;
  isCreatePrintArea?: boolean;
  isCreateButtons?: boolean;
  isCreatePanel?: boolean;
  buttons?: Utils.ButtonOptions[];
  panelContainer?: HTMLDivElement;
  panel?: {
    header: Utils.PanelOptions;
    body: {
      editRows: Utils.EditRow[];
      buttonsRow: Utils.RowButton[];
    };
  };
  onEvents?: (event: AnyEvent, data?: any) => void;
};
1.5.1

11 months ago

1.5.0

12 months ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

0.0.5

1 year ago