///
import * as React from 'react';
export type EventMap = Object;
export type PluginList = 'Scale' | 'ToolBar' | 'MapType' | 'OverView' | 'ControlBar'
export interface PluginConfig {
name: PluginList;
options?: Object;
}
export type ArrayLngLat = [number, number];
export interface LngLatPos {
lng: number;
lat: number;
}
export interface FullLngLatPos {
longitude: number;
latitude: number;
}
export interface AMapLngLat {
offset(): AMapLngLat;
distance(): number;
getLng(): number;
getLat(): number;
equanls(): boolean;
toString(): string;
}
export type LngLat = ArrayLngLat | LngLatPos | FullLngLatPos | AMapLngLat;
export type Path = Array | Array | Array;
export type PolygonPath = Path | [Path, Path];
export type ArrayPixel = [number, number];
export interface AMapPixel {
getX(): number;
getY(): number;
equals(): boolean;
toString(): string;
}
export type Pixel = AMapPixel | ArrayPixel;
export interface ObjSize {
width: number;
height: number;
}
export interface AMapSize {
getWidth(): number;
getHeight(): number;
toString(): string;
}
export type Size = ObjSize | AMapSize;
export type MapFeature = 'bg' | 'point' | 'road' | 'building';
export interface MapProps {
protocol?: string;
amapkey?: string;
version?: string;
useAMapUI?: boolean | Function;
children?: any;
onInstanceCreated?: Function;
plugins?: Array;
events?: EventMap;
loading?: any;
viewMode?: '2D'|'3D';
center?: LngLat;
zoom?: number;
zooms?: [number, number];
animateEnable?: boolean;
doubleClickZoom?: boolean;
dragEnable?: boolean;
isHotspot?: boolean;
jogEnable?: boolean;
keyboardEnable?: boolean;
resizeEnable?: boolean;
rotateEnable?: boolean;
scrollWheel?: boolean;
touchZoom?: boolean;
zoomEnable?: boolean;
showIndoorMap?: boolean;
expandZoomRange?: boolean;
pitch?: number;
mapStyle?: string;
labelzIndex?: number;
skyColor?: string;
buildingAnimation?: boolean;
pitchEnable?: boolean;
showBuildingBlock?: boolean;
features?: Array;
indoorMap?: any;
cursor?: string;
layers?: Array;
view?: any;
city?: string;
bounds?: any;
limitBounds?: any;
status?: any;
rotation?: number;
touchZoomCenter?: number;
}
export interface MarkerProps {
position?: LngLat;
offset?: Pixel;
icon?: any;
onInstanceCreated?: Function;
className?: string;
content?: string | HTMLElement;
draggable?: boolean;
visible?: boolean;
cursor?: string;
zIndex?: number;
angle?: number;
animation?: string;
markers?: Array