@mikezimm/fps-core-v7
Version:
Library of reusable core interfaces, types and constants migrated from fps-library-v2
51 lines • 1.61 kB
TypeScript
/**
* 2024-10-31 GeoLocation code originally migrated from PhotoForm Webpart sample
* Happy Halloween 2024!
* 2024-11-04 updated
*/
import { IReactCSSProperties } from "../../../../types/react/IReactCSSTypes";
/**
* By default:
* enableDetails = true, allowEditing = false, showAltitude = true, heading = 'GPS Location Form'
*/
export interface IFpsGpsLocationFormProps {
heading?: string;
style?: IReactCSSProperties;
className?: string;
buttonClass?: string;
onGetLocation?: (position: IFpsGeolocationPosition) => void;
onSubmit?: (position: IFpsGeolocationPosition) => void;
enableDetails?: boolean;
allowEditing?: boolean;
showAltitude?: boolean;
}
export interface IFpsGeolocationPosition {
timestamp: number;
localTime: string;
coords: IFpsGeolocationCoordinates;
status: string;
message: string;
error: IFpsGeolocationPositionError | undefined;
}
export interface IFpsGeolocationCoordinates {
accuracy: number;
latitude: number;
longitude: number;
altitude: number | undefined;
altitudeAccuracy: number | undefined;
heading: number | undefined;
speed: number | undefined;
}
export interface IFpsGeolocationPositionError {
code: IFpsGeolocationPositionErrorCode;
message: string;
PERMISSION_DENIED?: number;
POSITION_UNAVAILABLE?: number;
TIMEOUT?: number;
}
export declare enum IFpsGeolocationPositionErrorCode {
PERMISSION_DENIED = 1,
POSITION_UNAVAILABLE = 2,
TIMEOUT = 3
}
//# sourceMappingURL=interfaces.d.ts.map