@bdh-gis/ol-utils
v1.5.1
Published
Utils for ol
Downloads
116
Readme
🏷️ @bdh-gis/ol-utils
通用组件
npm i @bdh-gis/ol-utils
import Utils from '@bdh-gis/ol-utils';
const utils = new Utils()
Options
export type AnyEvent =
| 'CONTROL_BUTTON_CLICK'
| 'CREATE_BUTTONS'
| 'CREATE_PANEL'
| 'UPDATE_PANEL'
| 'PANEL_OPEN'
| 'PANEL_CLOSE'
| 'BASELAYER_SWITCH'
| 'BASELAYER_ADD';
export type Panel = {
header?: HTMLDivElement;
headerTitle?: HTMLDivElement;
headerClose?: HTMLDivElement;
body?: HTMLDivElement;
bodyImgs?: {
wrapperEl: HTMLDivElement;
imgEl: HTMLDivElement;
labelEl: HTMLDivElement;
deleteEl?: HTMLDivElement;
}[];
};
export type Options = {
baselayers?: Utils.Img[];
isCreateButtons?: boolean;
isCreatePanel?: boolean;
buttons?: Utils.ButtonOptions[];
panelContainer?: HTMLDivElement;
panel?: {
header: Utils.PanelOptions;
body: {
imgs: Utils.Img[];
};
};
onEvents?: (event: AnyEvent, data?: any) => void;
};