This repository has been archived by the owner on Nov 23, 2023. It is now read-only.
forked from fullstackreact/google-maps-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
102 lines (75 loc) · 2.58 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import 'googlemaps'
import * as React from 'react'
interface IGoogleApiOptions {
apiKey: string,
libraries?: string[],
client?: string,
url?: string,
version?: string,
language?: string,
region?: string,
LoadingContainer?: any
}
type GoogleApiOptionsFunc = (props: any) => IGoogleApiOptions
type Omit<T1, T2> = Pick<T1, Exclude<keyof T1, keyof T2>>
export type GoogleAPI = typeof google
export function GoogleApiWrapper(opts: IGoogleApiOptions | GoogleApiOptionsFunc):
<TProps extends IProvidedProps>(ctor: React.ComponentType<TProps>) => React.ComponentType<Omit<TProps, IProvidedProps>>
export interface IProvidedProps {
google: GoogleAPI
loaded?: boolean
}
type mapEventHandler = (mapProps?: IMapProps, map?: google.maps.Map, event?) => any
export interface IMapProps extends google.maps.MapOptions {
google: GoogleAPI
loaded?: boolean
bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral
centerAroundCurrentLocation?: boolean
initialCenter?: google.maps.LatLngLiteral
visible?: boolean
onReady?: mapEventHandler
onClick?: mapEventHandler
onDragend?: mapEventHandler
onRecenter?: mapEventHandler
onBoundsChanged?: mapEventHandler
onCenterChanged?: mapEventHandler
onDblclick?: mapEventHandler
onDragstart?: mapEventHandler
onHeadingChange?: mapEventHandler
onIdle?: mapEventHandler
onMaptypeidChanged?: mapEventHandler
onMousemove?: mapEventHandler
onMouseover?: mapEventHandler
onMouseout?: mapEventHandler
onProjectionChanged?: mapEventHandler
onResize?: mapEventHandler
onRightclick?: mapEventHandler
onTilesloaded?: mapEventHandler
onTiltChanged?: mapEventHandler
onZoomChanged?: mapEventHandler
}
type markerEventHandler = (props?: IMarkerProps, marker?: google.maps.Marker, event?) => any
export interface IMarkerProps extends Partial<google.maps.MarkerOptions> {
mapCenter?: google.maps.LatLng | google.maps.LatLngLiteral
onClick?: markerEventHandler
onMouseover?: markerEventHandler
}
export class Map extends React.Component<IMapProps, any> {
}
export class Marker extends React.Component<IMarkerProps, any> {
}
export class Polygon extends React.Component<any, any> {
}
export class Polyline extends React.Component<any, any> {
}
export class Circle extends React.Component<any, any> {
}
export interface IInfoWindowProps extends Partial<google.maps.InfoWindowOptions> {
google: typeof google
map: google.maps.Map
marker: google.maps.Marker
mapCenter?: google.maps.LatLng | google.maps.LatLngLiteral
visible?: boolean
}
export class InfoWindow extends React.Component<IInfoWindowProps, any> {
}