
package.dist.esm.components.use-control.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of react-map-gl Show documentation
Show all versions of react-map-gl Show documentation
React components for Mapbox GL JS-compatible libraries
The newest version!
import type { IControl, ControlPosition } from '../types';
import type { MapContextValue } from './map';
declare type ControlOptions = {
position?: ControlPosition;
};
declare function useControl(onCreate: (context: MapContextValue) => T, opts?: ControlOptions): T;
declare function useControl(onCreate: (context: MapContextValue) => T, onRemove: (context: MapContextValue) => void, opts?: ControlOptions): T;
declare function useControl(onCreate: (context: MapContextValue) => T, onAdd: (context: MapContextValue) => void, onRemove: (context: MapContextValue) => void, opts?: ControlOptions): T;
export default useControl;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy