vue3-maplibre-gl
Version:
Vue 3 components and composables for MapLibre GL JS - Build interactive maps with ease
27 lines (26 loc) • 1.03 kB
TypeScript
import { GeolocateControl, Map, GeolocateControlOptions, ControlPosition } from 'maplibre-gl';
import { ShallowRef, MaybeRef } from 'vue';
import { Nullable } from '../../types';
interface GeolocateControlProps {
map: MaybeRef<Nullable<Map>>;
position?: ControlPosition;
options?: GeolocateControlOptions;
debug?: boolean;
}
interface GeolocateControlActions {
geolocateControl: ShallowRef<Nullable<GeolocateControl>>;
isControlAdded: ShallowRef<boolean>;
removeControl: () => void;
addControl: () => void;
trigger: () => void;
}
/**
* Composable for managing MapLibre GL Geolocate Control
* Provides reactive geolocate control with error handling and lifecycle management
*
* @param props - Configuration options for the geolocate control
* @returns Actions and state for the geolocate control
*/
export declare function useGeolocateControl({ map, position, options, debug, }: GeolocateControlProps): GeolocateControlActions;
export {};
//# sourceMappingURL=useGeolocateControl.d.ts.map