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