1 | // Type definitions for Google Maps JavaScript API 3.43
|
2 | // Project: https://developers.google.com/maps/
|
3 | // Definitions by: Chris Wrench <https://github.com/cgwrench>,
|
4 | // Kiarash Ghiaseddin <https://github.com/Silver-Connection>,
|
5 | // Grant Hutchins <https://github.com/nertzy>,
|
6 | // Denis Atyasov <https://github.com/xaolas>,
|
7 | // Michael McMullin <https://github.com/mrmcnerd>,
|
8 | // Martin Costello <https://github.com/martincostello>,
|
9 | // Sven Kreiss <https://github.com/svenkreiss>
|
10 | // Umar Bolatov <https://github.com/bolatovumar>
|
11 | // Michael Gauthier <https://github.com/gauthierm>
|
12 | // Colin Doig <https://github.com/captain-igloo>
|
13 | // Dmitry Demensky <https://github.com/demensky>
|
14 | // Vladimir Dashukevich <https://github.com/life777>
|
15 | // Simon Haenisch <https://github.com/simonhaenisch>
|
16 | // Gavin Nitta <https://github.com/gshigeto>
|
17 | // Bat-Orshikh Baavgaikhuu <https://github.com/Bat-Orshikh>
|
18 | // Justin Poehnelt <https://github.com/jpoehnelt>
|
19 | // Dmitriy Skrylnikov <https://github.com/skrylnikov>
|
20 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
21 |
|
22 | // TypeScript Version: 3.5
|
23 |
|
24 | /*
|
25 | The MIT License
|
26 |
|
27 | Copyright (c) 2012 Folia A/S. http://www.folia.dk
|
28 |
|
29 | Permission is hereby granted, free of charge, to any person obtaining a copy
|
30 | of this software and associated documentation files (the "Software"), to deal
|
31 | in the Software without restriction, including without limitation the rights
|
32 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
33 | copies of the Software, and to permit persons to whom the Software is
|
34 | furnished to do so, subject to the following conditions:
|
35 |
|
36 | The above copyright notice and this permission notice shall be included in
|
37 | all copies or substantial portions of the Software.
|
38 |
|
39 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
40 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
41 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
42 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
43 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
44 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
45 | THE SOFTWARE.
|
46 | */
|
47 |
|
48 | /// <reference path="./style-reference.d.ts" />
|
49 |
|
50 | /// <reference path="./reference/map.d.ts" />
|
51 | /// <reference path="./reference/coordinates.d.ts" />
|
52 | /// <reference path="./reference/event.d.ts" />
|
53 | /// <reference path="./reference/control.d.ts" />
|
54 | /// <reference path="./reference/geometry.d.ts" />
|
55 |
|
56 | /// <reference path="./reference/marker.d.ts" />
|
57 | /// <reference path="./reference/info-window.d.ts" />
|
58 | /// <reference path="./reference/polygon.d.ts" />
|
59 | /// <reference path="./reference/data.d.ts" />
|
60 | /// <reference path="./reference/overlay-view.d.ts" />
|
61 | /// <reference path="./reference/kml.d.ts" />
|
62 | /// <reference path="./reference/image-overlay.d.ts" />
|
63 | /// <reference path="./reference/drawing.d.ts" />
|
64 | /// <reference path="./reference/visualization.d.ts" />
|
65 | /// <reference path="./reference/max-zoom.d.ts" />
|
66 |
|
67 | /// <reference path="./reference/street-view.d.ts" />
|
68 | /// <reference path="./reference/street-view-service.d.ts" />
|
69 |
|
70 | /// <reference path="./reference/places-widget.d.ts" />
|
71 | /// <reference path="./reference/places-service.d.ts" />
|
72 | /// <reference path="./reference/places-autocomplete-service.d.ts" />
|
73 | /// <reference path="./reference/geocoder.d.ts" />
|
74 |
|
75 | /// <reference path="./reference/directions.d.ts" />
|
76 | /// <reference path="./reference/distance-matrix.d.ts" />
|
77 | /// <reference path="./reference/elevation.d.ts" />
|
78 |
|
79 | declare namespace google.maps {
|
80 | /**
|
81 | * Version of the Google Maps JavaScript API that the browser has loaded.
|
82 | * Like '3.38.11'.
|
83 | * @see {@link https://developers.google.com/maps/documentation/javascript/versions#version-checks Maps JavaScript API}
|
84 | */
|
85 | const version: string;
|
86 |
|
87 | // TODO find source documentation
|
88 | interface Attribution {
|
89 | iosDeepLinkId?: string;
|
90 | source?: string;
|
91 | webUrl?: string;
|
92 | }
|
93 |
|
94 | // TODO find source documentation
|
95 | class SaveWidget {
|
96 | constructor(container: Node, opts?: SaveWidgetOptions);
|
97 | getAttribution(): Attribution;
|
98 | getPlace(): Place;
|
99 | setAttribution(attribution: Attribution): void;
|
100 | setOptions(opts: SaveWidgetOptions): void;
|
101 | setPlace(place: Place): void;
|
102 | }
|
103 |
|
104 | // TODO find source documentation
|
105 | interface SaveWidgetOptions {
|
106 | attribution?: Attribution;
|
107 | place?: Place;
|
108 | }
|
109 |
|
110 | // TODO find source documentation
|
111 | class FusionTablesLayer extends MVCObject {
|
112 | constructor(options: FusionTablesLayerOptions);
|
113 | getMap(): Map;
|
114 | setMap(map: Map | null): void;
|
115 | setOptions(options: FusionTablesLayerOptions): void;
|
116 | }
|
117 |
|
118 | // TODO find source documentation
|
119 | interface FusionTablesLayerOptions {
|
120 | clickable?: boolean;
|
121 | heatmap?: FusionTablesHeatmap;
|
122 | map?: Map;
|
123 | query?: FusionTablesQuery;
|
124 | styles?: FusionTablesStyle[];
|
125 | suppressInfoWindows?: boolean;
|
126 | }
|
127 |
|
128 | // TODO find source documentation
|
129 | interface FusionTablesQuery {
|
130 | from?: string;
|
131 | limit?: number;
|
132 | offset?: number;
|
133 | orderBy?: string;
|
134 | select?: string;
|
135 | where?: string;
|
136 | }
|
137 |
|
138 | // TODO find source documentation
|
139 | interface FusionTablesStyle {
|
140 | markerOptions?: FusionTablesMarkerOptions;
|
141 | polygonOptions?: FusionTablesPolygonOptions;
|
142 | polylineOptions?: FusionTablesPolylineOptions;
|
143 | where?: string;
|
144 | }
|
145 |
|
146 | // TODO find source documentation
|
147 | interface FusionTablesHeatmap {
|
148 | enabled: boolean;
|
149 | }
|
150 |
|
151 | // TODO find source documentation
|
152 | interface FusionTablesMarkerOptions {
|
153 | iconName: string;
|
154 | }
|
155 |
|
156 | // TODO find source documentation
|
157 | interface FusionTablesPolygonOptions {
|
158 | fillColor?: string;
|
159 | fillOpacity?: number;
|
160 | strokeColor?: string;
|
161 | strokeOpacity?: number;
|
162 | strokeWeight?: number;
|
163 | }
|
164 |
|
165 | // TODO find source documentation
|
166 | interface FusionTablesPolylineOptions {
|
167 | strokeColor?: string;
|
168 | strokeOpacity?: number;
|
169 | strokeWeight?: number;
|
170 | }
|
171 |
|
172 | // TODO find source documentation
|
173 | interface FusionTablesMouseEvent {
|
174 | infoWindowHtml?: string;
|
175 | latLng?: LatLng;
|
176 | pixelOffset?: Size;
|
177 | row?: object; // Object<FusionTablesCell>
|
178 | }
|
179 |
|
180 | // TODO find source documentation
|
181 | interface FusionTablesCell {
|
182 | columnName?: string;
|
183 | value?: string;
|
184 | }
|
185 |
|
186 | // TODO find source documentation
|
187 | namespace adsense {
|
188 | class AdUnit extends MVCObject {
|
189 | constructor(container: Element, opts: AdUnitOptions);
|
190 | getBackgroundColor(): string;
|
191 | getBorderColor(): string;
|
192 | getChannelNumber(): string;
|
193 | getContainer(): Element;
|
194 | getFormat(): AdFormat;
|
195 | getMap(): Map;
|
196 | getPosition(): ControlPosition;
|
197 | getPublisherId(): string;
|
198 | getTextColor(): string;
|
199 | getTitleColor(): string;
|
200 | getUrlColor(): string;
|
201 | setBackgroundColor(backgroundColor: string): void;
|
202 | setBorderColor(borderColor: string): void;
|
203 | setChannelNumber(channelNumber: string): void;
|
204 | setFormat(format: AdFormat): void;
|
205 | setMap(map: Map | null): void;
|
206 | setPosition(position: ControlPosition): void;
|
207 | setTextColor(textColor: string): void;
|
208 | setTitleColor(titleColor: string): void;
|
209 | setUrlColor(urlColor: string): void;
|
210 | }
|
211 |
|
212 | interface AdUnitOptions {
|
213 | backgroundColor?: string;
|
214 | borderColor?: string;
|
215 | channelNumber?: string;
|
216 | format?: AdFormat;
|
217 | map?: Map;
|
218 | position?: ControlPosition;
|
219 | publisherId?: string;
|
220 | textColor?: string;
|
221 | titleColor?: string;
|
222 | urlColor?: string;
|
223 | }
|
224 |
|
225 | enum AdFormat {
|
226 | BANNER = '468x60_as',
|
227 | BUTTON = '125x125_as',
|
228 | HALF_BANNER = '234x60_as',
|
229 | LARGE_HORIZONTAL_LINK_UNIT = '728x15_0ads_al',
|
230 | LARGE_RECTANGLE = '336x280_as',
|
231 | LARGE_VERTICAL_LINK_UNIT = '180x90_0ads_al',
|
232 | LEADERBOARD = '728x90_as',
|
233 | MEDIUM_RECTANGLE = '300x250_as',
|
234 | MEDIUM_VERTICAL_LINK_UNIT = '160x90_0ads_al',
|
235 | SKYSCRAPER = '120x600_as',
|
236 | SMALL_HORIZONTAL_LINK_UNIT = '468x15_0ads_al',
|
237 | SMALL_RECTANGLE = '180x150_as',
|
238 | SMALL_SQUARE = '200x200_as',
|
239 | SMALL_VERTICAL_LINK_UNIT = '120x90_0ads_al',
|
240 | SQUARE = '250x250_as',
|
241 | VERTICAL_BANNER = '120x240_as',
|
242 | WIDE_SKYSCRAPER = '160x600_as',
|
243 | X_LARGE_VERTICAL_LINK_UNIT = '200x90_0ads_al',
|
244 | }
|
245 | }
|
246 |
|
247 | namespace visualization {
|
248 | // TODO find source documentation
|
249 | class MapsEngineLayer extends MVCObject {
|
250 | constructor(options: MapsEngineLayerOptions);
|
251 | getLayerId(): string;
|
252 | getLayerKey(): string;
|
253 | getMap(): Map;
|
254 | getMapId(): string;
|
255 | getOpacity(): number;
|
256 | getProperties(): MapsEngineLayerProperties;
|
257 | getStatus(): MapsEngineStatus;
|
258 | getZIndex(): number;
|
259 | setLayerId(layerId: string): void;
|
260 | setLayerKey(layerKey: string): void;
|
261 | setMap(map: Map | null): void;
|
262 | setMapId(mapId: string): void;
|
263 | setOpacity(opacity: number): void;
|
264 | setOptions(options: MapsEngineLayerOptions): void;
|
265 | setZIndex(zIndex: number): void;
|
266 | }
|
267 |
|
268 | // TODO find source documentation
|
269 | interface MapsEngineLayerOptions {
|
270 | accessToken?: string;
|
271 | clickable?: boolean;
|
272 | fitBounds?: boolean;
|
273 | layerId?: string;
|
274 | layerKey?: string;
|
275 | map?: Map;
|
276 | mapId?: string;
|
277 | opacity?: number;
|
278 | suppressInfoWindows?: boolean;
|
279 | zIndex?: number;
|
280 | }
|
281 |
|
282 | // TODO find source documentation
|
283 | interface MapsEngineLayerProperties {
|
284 | name: string;
|
285 | }
|
286 |
|
287 | // TODO find source documentation
|
288 | interface MapsEngineMouseEvent {
|
289 | featureId?: string;
|
290 | infoWindowHtml?: string;
|
291 | latLng?: LatLng;
|
292 | pixelOffset?: Size;
|
293 | }
|
294 |
|
295 | // TODO find source documentation
|
296 | enum MapsEngineStatus {
|
297 | INVALID_LAYER = 'INVALID_LAYER',
|
298 | OK = 'OK',
|
299 | UNKNOWN_ERROR = 'UNKNOWN_ERROR',
|
300 | }
|
301 |
|
302 | // TODO find source documentation
|
303 | class MouseEvent {
|
304 | stop(): void;
|
305 | }
|
306 |
|
307 | // TODO find source documentation
|
308 | class MapsEventListener {}
|
309 | }
|
310 | }
|