UNPKG

@uiw/react-amap-map

Version:

基于 React 封装的高德地图组件。AMap Component Based On React.

26 lines (25 loc) 775 B
import React from 'react'; type InitialState = { AMap?: typeof AMap; map?: AMap.Map; container?: HTMLDivElement | null; }; export declare const initialState: Partial<InitialState>; export declare const reducer: (state: InitialState, action: InitialState) => { AMap?: typeof AMap; map?: AMap.Map; container?: HTMLDivElement | null; }; export interface Context { state: Partial<InitialState>; dispatch: React.Dispatch<InitialState>; } export declare const Context: React.Context<Context>; export declare function useMapContext(): { state: Partial<InitialState>; dispatch: React.Dispatch<InitialState>; AMap?: typeof AMap | undefined; map?: AMap.Map | undefined; container?: (HTMLDivElement | null) | undefined; }; export {};