UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

94 lines (93 loc) 3.02 kB
import { MapStateActions, ReceiveMapConfigPayload, ActionTypes } from '@kepler.gl/actions'; import { MapState, Bounds, Viewport } from '@kepler.gl/types'; /** * Default initial `mapState` * @memberof mapStateUpdaters * @constant * @property pitch Default: `0` * @property bearing Default: `0` * @property latitude Default: `37.75043` * @property longitude Default: `-122.34679` * @property zoom Default: `9` * @property dragRotate Default: `false` * @property width Default: `800` * @property height Default: `800` * @property minZoom: `undefined`, * @property maxZoom: `undefined`, * @property maxBounds: `undefined`, * @property isSplit: `false`, * @property isViewportSynced: `true`, * @property isZoomLocked: `false`, * @property splitMapViewports: `[]` * @public */ export declare const INITIAL_MAP_STATE: MapState; /** * Update map viewport * @memberof mapStateUpdaters * @public */ export declare const updateMapUpdater: (state: MapState, action: MapStateActions.UpdateMapUpdaterAction) => MapState; /** * Fit map viewport to bounds * @memberof mapStateUpdaters * @public */ export declare const fitBoundsUpdater: (state: MapState, action: MapStateActions.FitBoundsUpdaterAction) => MapState; /** * Toggle between 3d and 2d map. * @memberof mapStateUpdaters * @public */ export declare const togglePerspectiveUpdater: (state: MapState, action: MapStateActions.TogglePerspectiveUpdaterAction) => MapState; /** * reset mapState to initial State * @memberof mapStateUpdaters * @public */ export declare const resetMapConfigUpdater: (state: MapState) => MapState; /** * Update `mapState` to propagate a new config * @memberof mapStateUpdaters * @public */ export declare const receiveMapConfigUpdater: (state: MapState, { payload: { config, options, bounds } }: { type?: typeof ActionTypes.RECEIVE_MAP_CONFIG; payload: ReceiveMapConfigPayload; }) => MapState; /** * Toggle between one or split maps * @memberof mapStateUpdaters * @public */ export declare const toggleSplitMapUpdater: (state: MapState, action: MapStateActions.ToggleSplitMapUpdaterAction) => MapState; /** * Toggle between locked and unlocked split viewports * @memberof mapStateUpdaters * @public */ export declare const toggleSplitMapViewportUpdater: (state: MapState, action: MapStateActions.ToggleSplitMapViewportUpdaterAction) => { isViewportSynced: boolean; isZoomLocked: boolean; pitch: number; bearing: number; latitude: number; longitude: number; zoom: number; dragRotate: boolean; width: number; height: number; minZoom?: number | undefined; maxZoom?: number | undefined; maxBounds?: Bounds | undefined; initialState?: any; scale?: number | undefined; isSplit: boolean; splitMapViewports: Viewport[]; }; export declare function getMapDimForSplitMap(isSplit: any, state: any): { width?: undefined; } | { width: number; }; export declare function pickViewportPropsFromMapState(state: MapState): Viewport;