kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
10 lines (9 loc) • 688 B
TypeScript
import type { IControl, ControlPosition } from '../types';
import type { MapContextValue } from './map';
declare type ControlOptions = {
position?: ControlPosition;
};
declare function useControl<T extends IControl>(onCreate: (context: MapContextValue) => T, opts?: ControlOptions): T;
declare function useControl<T extends IControl>(onCreate: (context: MapContextValue) => T, onRemove: (context: MapContextValue) => void, opts?: ControlOptions): T;
declare function useControl<T extends IControl>(onCreate: (context: MapContextValue) => T, onAdd: (context: MapContextValue) => void, onRemove: (context: MapContextValue) => void, opts?: ControlOptions): T;
export default useControl;