forked from tumerorkun/react-leaflet-search
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
49 lines (46 loc) · 1.48 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { Control, Layer, Icon } from 'leaflet'
import { LayerContainer, Map, MapControl, MapControlProps } from "react-leaflet";
export interface ReactLeafletSearchProps extends MapControlProps {
zoom?: number;
search?: [number, number];
provider?: string;
providerKey?: string;
inputPlaceholder?: string;
markerIcon?: Icon;
showPopup?: boolean;
showMarker?: boolean;
closeResultsOnClick?: boolean;
openSearchOnLoad?: boolean;
providerOptions?: { [key: string]: any };
searchBounds?: [[number, number], [number, number]];
popUp?: (SearchInfo: string) => JSX.Element;
leaflet?: {
map?: Map;
pane?: string;
layerContainer?: LayerContainer;
popupContainer?: Layer;
};
mapStateModifier?: ((arg:[number,number]) => any) | string;
zoomPanOptions?: {
animate?: boolean;
duration?: number;
easeLinearity?: number;
noMoveStart?: boolean;
};
}
export interface ReactLeafletSearchState {
search: boolean | [number, number];
info: boolean | string;
}
export class ReactLeafletSearch extends MapControl<ReactLeafletSearchProps> {
public div: HTMLElement;
public map: Map;
public markerIcon: Icon;
public state: ReactLeafletSearchState;
public props: ReactLeafletSearchProps;
public createLeafletElement(props: ReactLeafletSearchProps): Control;
public latLngHandler(latLng: [number, number], info: string): void;
public removeMarkerHandler(): void;
public goToLatLng(latLng: [number, number], info: string): void;
public flyTo(): void;
}