UNPKG

@razi91/types-ol-ext

Version:
37 lines (35 loc) 1.15 kB
import ol_control_Control from 'ol/control/Control'; export interface Options { className: string; hideOnClick?: boolean; closeBox?: boolean; } /** Control overlay for OL3 * The overlay control is a control that display an overlay over the map * * @constructor * @extends {ol_control_Control} * @fire change:visible * @param {Object=} options Control options. * @param {string} className class of the control * @param {boolean} hideOnClick hide the control on click, default false * @param {boolean} closeBox add a closeBox to the control, default false */ export default class Notification extends ol_control_Control { constructor(options?: Options); /** * Display a notification on the map * @param what the notification to show, default get the last one * @param [duration=3000] duration in ms, if -1 never hide */ show(what?: string | Node, duration?: number): void; /** * Remove a notification on the map */ hide(): void; /** * Toggle a notification on the map * @param {number} [duration=3000] duration in ms */ toggle(duration?: number): void; }