-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.d.ts
16421 lines (16418 loc) · 629 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Google Maps JS API Version: 3.58
// tslint:disable:enforce-name-casing
// tslint:disable:no-any
// tslint:disable:interface-over-type-literal
// tslint:disable:array-type
// tslint:disable:no-empty-interface
// tslint:disable:no-unnecessary-class
// tslint:disable:strict-export-declare-modifiers
// Generated by an automated process. DO NOT EDIT!
declare namespace google.maps {
/**
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
*
* A relational description of a location. Includes a ranked set of nearby
* landmarks and the areas containing the target location.
*/
export interface AddressDescriptor {
/**
* A ranked list of containing or adjacent areas. The most useful
* (recognizable and precise) areas are ranked first.
*/
areas: google.maps.Area[];
/**
* A ranked list of nearby landmarks. The most useful (recognizable and
* nearby) landmarks are ranked first.
*/
landmarks: google.maps.Landmark[];
}
/**
* Animations that can be played on a marker. Use the {@link
* google.maps.Marker.setAnimation} method on Marker or the {@link
* google.maps.MarkerOptions.animation} option to play an animation.
*
* Access by calling `const {Animation} = await
* google.maps.importLibrary("marker")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
*/
export enum Animation {
/**
* Marker bounces until animation is stopped by calling {@link
* google.maps.Marker.setAnimation} with <code>null</code>.
*/
BOUNCE = 0.0,
/**
* Marker drops from the top of the map to its final location. Animation
* will cease once the marker comes to rest and {@link
* google.maps.Marker.getAnimation} will return <code>null</code>. This type
* of animation is usually specified during creation of the marker.
*/
DROP = 1.0,
}
/**
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
*
* A place that is a small region, such as a neighborhood, sublocality, or
* large complex that contains the target location.
*/
export interface Area {
/**
* Defines the spatial relationship between the target location and the
* area.
*/
containment: google.maps.Containment;
/**
* The name for the area.
*/
display_name: string;
/**
* The language of the name for the area.
*/
display_name_language_code: string;
/**
* The Place ID of the underlying area. Can be used to resolve more
* information about the area through Place Details or Place ID Lookup.
*/
place_id: string;
}
/**
* A layer showing bike lanes and paths.
*
* Access by calling `const {BicyclingLayer} = await
* google.maps.importLibrary("maps")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
*/
export class BicyclingLayer extends google.maps.MVCObject {
/**
* Returns the map on which this layer is displayed.
*/
getMap(): google.maps.Map | null;
/**
* Renders the layer on the specified map. If map is set to
* <code>null</code>, the layer will be removed.
*/
setMap(map: google.maps.Map | null): void;
}
/**
* The display options for the Camera control.
*/
export interface CameraControlOptions {
/**
* Position id. Used to specify the position of the control on the map.
* @defaultValue {@link google.maps.ControlPosition.INLINE_START_BLOCK_END}
*/
position?: google.maps.ControlPosition | null;
}
/**
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
*
* Used for setting the map's camera options.
*/
export interface CameraOptions {
center?: google.maps.LatLngLiteral | google.maps.LatLng;
heading?: number;
tilt?: number;
zoom?: number;
}
/**
* Used for retrieving camera parameters, such as that of the GL camera used
* for the {@link google.maps.WebGLOverlayView}.
*/
export interface CameraParams extends google.maps.CameraOptions {
center: google.maps.LatLng;
heading: number;
tilt: number;
zoom: number;
}
/**
* A circle on the Earth's surface; also known as a "spherical
* cap".
*
* Access by calling `const {Circle} = await
* google.maps.importLibrary("maps")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
*/
export class Circle extends google.maps.MVCObject {
/**
* A circle on the Earth's surface; also known as a "spherical
* cap".
*
* Access by calling `const {Circle} = await
* google.maps.importLibrary("maps")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
*/
constructor(
circleOrCircleOptions?:
| google.maps.Circle
| null
| google.maps.CircleLiteral
| google.maps.CircleOptions,
);
/**
* Gets the <code>LatLngBounds</code> of this Circle.
*/
getBounds(): google.maps.LatLngBounds | null;
/**
* Returns the center of this circle.
*/
getCenter(): google.maps.LatLng | null;
/**
* Returns whether this circle can be dragged by the user.
*/
getDraggable(): boolean;
/**
* Returns whether this circle can be edited by the user.
*/
getEditable(): boolean;
/**
* Returns the map on which this circle is displayed.
*/
getMap(): google.maps.Map | null;
/**
* Returns the radius of this circle (in meters).
*/
getRadius(): number;
/**
* Returns whether this circle is visible on the map.
*/
getVisible(): boolean;
/**
* Sets the center of this circle.
*/
setCenter(
center: google.maps.LatLng | null | google.maps.LatLngLiteral,
): void;
/**
* If set to <code>true</code>, the user can drag this circle over the map.
*/
setDraggable(draggable: boolean): void;
/**
* If set to <code>true</code>, the user can edit this circle by dragging
* the control points shown at the center and around the circumference of
* the circle.
*/
setEditable(editable: boolean): void;
/**
* Renders the circle on the specified map. If map is set to
* <code>null</code>, the circle will be removed.
*/
setMap(map: google.maps.Map | null): void;
setOptions(options: google.maps.CircleOptions | null): void;
/**
* Sets the radius of this circle (in meters).
*/
setRadius(radius: number): void;
/**
* Hides this circle if set to <code>false</code>.
*/
setVisible(visible: boolean): void;
}
/**
* Object literal which represents a circle.
*/
export interface CircleLiteral extends google.maps.CircleOptions {
/**
* The center of the Circle.
*/
center: google.maps.LatLng | google.maps.LatLngLiteral;
/**
* The radius in meters on the Earth's surface.
*/
radius: number;
}
/**
* CircleOptions object used to define the properties that can be set on a
* Circle.
*/
export interface CircleOptions {
/**
* The center of the Circle.
*/
center?: google.maps.LatLng | google.maps.LatLngLiteral | null;
/**
* Indicates whether this <code>Circle</code> handles mouse events.
* @defaultValue <code>true</code>
*/
clickable?: boolean | null;
/**
* If set to <code>true</code>, the user can drag this circle over the map.
* @defaultValue <code>false</code>
*/
draggable?: boolean | null;
/**
* If set to <code>true</code>, the user can edit this circle by dragging
* the control points shown at the center and around the circumference of
* the circle.
* @defaultValue <code>false</code>
*/
editable?: boolean | null;
/**
* The fill color. All CSS3 colors are supported except for extended named
* colors.
*/
fillColor?: string | null;
/**
* The fill opacity between 0.0 and 1.0.
*/
fillOpacity?: number | null;
/**
* Map on which to display the Circle.
*/
map?: google.maps.Map | null;
/**
* The radius in meters on the Earth's surface.
*/
radius?: number | null;
/**
* The stroke color. All CSS3 colors are supported except for extended named
* colors.
*/
strokeColor?: string | null;
/**
* The stroke opacity between 0.0 and 1.0.
*/
strokeOpacity?: number | null;
/**
* The stroke position.
* @defaultValue {@link google.maps.StrokePosition.CENTER}
*/
strokePosition?: google.maps.StrokePosition | null;
/**
* The stroke width in pixels.
*/
strokeWeight?: number | null;
/**
* Whether this circle is visible on the map.
* @defaultValue <code>true</code>
*/
visible?: boolean | null;
/**
* The zIndex compared to other polys.
*/
zIndex?: number | null;
}
/**
* Access by calling `const {CollisionBehavior} = await
* google.maps.importLibrary("marker")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
*/
export enum CollisionBehavior {
/**
* Display the marker only if it does not overlap with other markers. If two
* markers of this type would overlap, the one with the higher zIndex is
* shown. If they have the same zIndex, the one with the lower vertical
* screen position is shown.
*/
OPTIONAL_AND_HIDES_LOWER_PRIORITY = 'OPTIONAL_AND_HIDES_LOWER_PRIORITY',
/**
* Always display the marker regardless of collision. This is the default
* behavior.
*/
REQUIRED = 'REQUIRED',
/**
* Always display the marker regardless of collision, and hide any
* OPTIONAL_AND_HIDES_LOWER_PRIORITY markers or labels that would overlap
* with the marker.
*/
REQUIRED_AND_HIDES_OPTIONAL = 'REQUIRED_AND_HIDES_OPTIONAL',
}
/**
* Identifiers for map color schemes. Specify these by value, or by using the
* constant's name. For example, <code>'FOLLOW_SYSTEM'</code> or
* <code>google.maps.ColorScheme.FOLLOW_SYSTEM</code>.
*
* Access by calling `const {ColorScheme} = await
* google.maps.importLibrary("core")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
*/
export enum ColorScheme {
/**
* The dark color scheme for a map.
*/
DARK = 'DARK',
/**
* The color scheme is selected based on system preferences.
*/
FOLLOW_SYSTEM = 'FOLLOW_SYSTEM',
/**
* The light color scheme for a map. Default value for legacy Maps JS.
*/
LIGHT = 'LIGHT',
}
/**
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
*
* An enum representing the spatial relationship between the area and the
* target location.
*
* Access by calling `const {Containment} = await
* google.maps.importLibrary("geocoding")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
*/
export enum Containment {
/**
* The target location is outside the area region, but close by.
*/
NEAR = 'NEAR',
/**
* The target location is within the area region, close to the edge.
*/
OUTSKIRTS = 'OUTSKIRTS',
/**
* The target location is within the area region, close to the center.
*/
WITHIN = 'WITHIN',
}
/**
* Identifiers used to specify the placement of controls on the map. Controls
* are positioned relative to other controls in the same layout position.
* Controls that are added first are positioned closer to the edge of the map.
* Usage of "logical values" (see <a
* href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values">https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values</a>)
* is recommended in order to be able to automatically support both
* left-to-right (LTR) and right-to-left (RTL) layout contexts.<br>
* <br>Logical values in LTR: <br> <pre>+----------------+
* <br>| BSIS BSIC BSIE |
* <br>| ISBS IEBS |
* <br>| |
* <br>| ISBC IEBC |
* <br>| |
* <br>| ISBE IEBE |
* <br>| BEIS BEIC BEIE | <br>+----------------+</pre><br>
* Logical values in RTL:<br> <pre>+----------------+
* <br>| BSIE BSIC BSIS |
* <br>| IEBS ISBS |
* <br>| |
* <br>| IEBC ISBC |
* <br>| |
* <br>| IEBE ISBE |
* <br>| BEIE BEIC BEIS | <br>+----------------+</pre><br>
* Legacy values:<br> <pre>+----------------+
* <br>| TL TC TR |
* <br>| LT RT
* |
* <br>| |
* <br>| LC RC
* |
* <br>| |
* <br>| LB RB
* | <br>| BL BC BR |
* <br>+----------------+</pre><br> Elements in the top or bottom row flow
* towards the middle of the row. Elements in the left or right column flow
* towards the middle of the column.
*
* Access by calling `const {ControlPosition} = await
* google.maps.importLibrary("core")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
*/
export enum ControlPosition {
/**
* Equivalent to BOTTOM_CENTER in both LTR and RTL.
*/
BLOCK_END_INLINE_CENTER = 0.0,
/**
* Equivalent to BOTTOM_RIGHT in LTR, or BOTTOM_LEFT in RTL.
*/
BLOCK_END_INLINE_END = 1.0,
/**
* Equivalent to BOTTOM_LEFT in LTR, or BOTTOM_RIGHT in RTL.
*/
BLOCK_END_INLINE_START = 2.0,
/**
* Equivalent to TOP_CENTER in both LTR and RTL.
*/
BLOCK_START_INLINE_CENTER = 3.0,
/**
* Equivalent to TOP_RIGHT in LTR, or TOP_LEFT in RTL.
*/
BLOCK_START_INLINE_END = 4.0,
/**
* Equivalent to TOP_LEFT in LTR, or TOP_RIGHT in RTL.
*/
BLOCK_START_INLINE_START = 5.0,
/**
* Elements are positioned in the center of the bottom row. Consider using
* BLOCK_END_INLINE_CENTER instead.
*/
BOTTOM_CENTER = 6.0,
/**
* Elements are positioned in the bottom left and flow towards the middle.
* Elements are positioned to the right of the Google logo. Consider using
* BLOCK_END_INLINE_START instead.
*/
BOTTOM_LEFT = 7.0,
/**
* Elements are positioned in the bottom right and flow towards the middle.
* Elements are positioned to the left of the copyrights. Consider using
* BLOCK_END_INLINE_END instead.
*/
BOTTOM_RIGHT = 8.0,
/**
* Equivalent to RIGHT_CENTER in LTR, or LEFT_CENTER in RTL.
*/
INLINE_END_BLOCK_CENTER = 9.0,
/**
* Equivalent to RIGHT_BOTTOM in LTR, or LEFT_BOTTOM in RTL.
*/
INLINE_END_BLOCK_END = 10.0,
/**
* Equivalent to RIGHT_TOP in LTR, or LEFT_TOP in RTL.
*/
INLINE_END_BLOCK_START = 11.0,
/**
* Equivalent to LEFT_CENTER in LTR, or RIGHT_CENTER in RTL.
*/
INLINE_START_BLOCK_CENTER = 12.0,
/**
* Equivalent to LEFT_BOTTOM in LTR, or RIGHT_BOTTOM in RTL.
*/
INLINE_START_BLOCK_END = 13.0,
/**
* Equivalent to LEFT_TOP in LTR, or RIGHT_TOP in RTL.
*/
INLINE_START_BLOCK_START = 14.0,
/**
* Elements are positioned on the left, above bottom-left elements, and flow
* upwards. Consider using INLINE_START_BLOCK_END instead.
*/
LEFT_BOTTOM = 15.0,
/**
* Elements are positioned in the center of the left side. Consider using
* INLINE_START_BLOCK_CENTER instead.
*/
LEFT_CENTER = 16.0,
/**
* Elements are positioned on the left, below top-left elements, and flow
* downwards. Consider using INLINE_START_BLOCK_START instead.
*/
LEFT_TOP = 17.0,
/**
* Elements are positioned on the right, above bottom-right elements, and
* flow upwards. Consider using INLINE_END_BLOCK_END instead.
*/
RIGHT_BOTTOM = 18.0,
/**
* Elements are positioned in the center of the right side. Consider using
* INLINE_END_BLOCK_CENTER instead.
*/
RIGHT_CENTER = 19.0,
/**
* Elements are positioned on the right, below top-right elements, and flow
* downwards. Consider using INLINE_END_BLOCK_START instead.
*/
RIGHT_TOP = 20.0,
/**
* Elements are positioned in the center of the top row. Consider using
* BLOCK_START_INLINE_CENTER instead.
*/
TOP_CENTER = 21.0,
/**
* Elements are positioned in the top left and flow towards the middle.
* Consider using BLOCK_START_INLINE_START instead.
*/
TOP_LEFT = 22.0,
/**
* Elements are positioned in the top right and flow towards the middle.
* Consider using BLOCK_START_INLINE_END instead.
*/
TOP_RIGHT = 23.0,
}
/**
* This interface provides convenience methods for generating matrices to use
* for rendering WebGL scenes on top of the Google base map. <br><br>Note: A
* reference to this object should <b>not</b> be held outside of the scope of
* the encapsulating {@link google.maps.WebGLOverlayView.onDraw} call.
*/
export interface CoordinateTransformer {
/**
* @param latLngAltitude Latitude, longitude, and altitude.
* @param rotations An array that contains an Euler rotation angle in
* degrees, in the XYZ convention.
* @param scale Array that contains an XYZ scalar array to apply to the
* cardinal axis.
*/
fromLatLngAltitude(
latLngAltitude:
| google.maps.LatLngAltitude
| google.maps.LatLngAltitudeLiteral,
rotations?: Float32Array,
scale?: Float32Array,
): Float64Array;
getCameraParams(): google.maps.CameraParams;
}
export interface CoreLibrary {
ColorScheme: typeof google.maps.ColorScheme;
ControlPosition: typeof google.maps.ControlPosition;
event: typeof google.maps.event;
LatLng: typeof google.maps.LatLng;
LatLngAltitude: typeof google.maps.LatLngAltitude;
LatLngBounds: typeof google.maps.LatLngBounds;
MapsNetworkError: typeof google.maps.MapsNetworkError;
MapsNetworkErrorEndpoint: typeof google.maps.MapsNetworkErrorEndpoint;
MapsRequestError: typeof google.maps.MapsRequestError;
MapsServerError: typeof google.maps.MapsServerError;
MVCArray: typeof google.maps.MVCArray;
MVCObject: typeof google.maps.MVCObject;
Point: typeof google.maps.Point;
Settings: typeof google.maps.Settings;
Size: typeof google.maps.Size;
SymbolPath: typeof google.maps.SymbolPath;
UnitSystem: typeof google.maps.UnitSystem;
}
/**
* A layer for displaying geospatial data. Points, line-strings and polygons
* can be displayed. <p> Every <code>Map</code> has a <code>Data</code> object
* by default, so most of the time there is no need to construct one. For
* example: <pre> var myMap = new google.maps.Map(...);<br>
* myMap.data.addGeoJson(...);<br> myMap.data.setStyle(...); </pre> The
* <code>Data</code> object is a collection of <a
* href="#Data.Feature"><code>Features</code></a>.
*
* Access by calling `const {Data} = await google.maps.importLibrary("maps")`.
* See https://developers.google.com/maps/documentation/javascript/libraries.
*/
export class Data extends google.maps.MVCObject {
/**
* A layer for displaying geospatial data. Points, line-strings and polygons
* can be displayed. <p> Every <code>Map</code> has a <code>Data</code>
* object by default, so most of the time there is no need to construct one.
* For example: <pre> var myMap = new google.maps.Map(...);<br>
* myMap.data.addGeoJson(...);<br> myMap.data.setStyle(...); </pre> The
* <code>Data</code> object is a collection of <a
* href="#Data.Feature"><code>Features</code></a>.
*
* Access by calling `const {Data} = await
* google.maps.importLibrary("maps")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
*/
constructor(options?: google.maps.Data.DataOptions | null);
/**
* Adds a feature to the collection, and returns the added feature. <p> If
* the feature has an ID, it will replace any existing feature in the
* collection with the same ID. If no feature is given, a new feature will
* be created with null geometry and no properties. If
* <code>FeatureOptions</code> are given, a new feature will be created with
* the specified properties. <p> Note that the IDs <code>1234</code> and
* <code>'1234'</code> are equivalent. Adding a feature with ID
* <code>1234</code> will replace a feature with ID <code>'1234'</code>, and
* vice versa.
*/
add(
feature?:
| google.maps.Data.Feature
| null
| google.maps.Data.FeatureOptions,
): google.maps.Data.Feature;
/**
* Adds GeoJSON features to the collection. Give this method a parsed JSON.
* The imported features are returned. Throws an exception if the GeoJSON
* could not be imported.
*/
addGeoJson(
geoJson: object,
options?: google.maps.Data.GeoJsonOptions | null,
): google.maps.Data.Feature[];
/**
* Checks whether the given feature is in the collection.
*/
contains(feature: google.maps.Data.Feature): boolean;
/**
* Repeatedly invokes the given function, passing a feature in the
* collection to the function on each invocation. The order of iteration
* through the features is undefined.
*/
forEach(callback: (a: google.maps.Data.Feature) => void): void;
/**
* Returns the position of the drawing controls on the map.
*/
getControlPosition(): google.maps.ControlPosition;
/**
* Returns which drawing modes are available for the user to select, in the
* order they are displayed. This does not include the <code>null</code>
* drawing mode, which is added by default. Possible drawing modes are
* <code>"Point"</code>, <code>"LineString"</code> or
* <code>"Polygon"</code>.
*/
getControls(): string[] | null;
/**
* Returns the current drawing mode of the given Data layer. A drawing mode
* of <code>null</code> means that the user can interact with the map as
* normal, and clicks do not draw anything. Possible drawing modes are
* <code>null</code>, <code>"Point"</code>, <code>"LineString"</code> or
* <code>"Polygon"</code>.
*/
getDrawingMode(): string | null;
/**
* Returns the feature with the given ID, if it exists in the collection.
* Otherwise returns <code>undefined</code>. <p> Note that the IDs
* <code>1234</code> and <code>'1234'</code> are equivalent. Either can be
* used to look up the same feature.
*/
getFeatureById(id: number | string): google.maps.Data.Feature | undefined;
/**
* Returns the map on which the features are displayed.
*/
getMap(): google.maps.Map | null;
/**
* Gets the style for all features in the collection.
*/
getStyle():
| google.maps.Data.StylingFunction
| google.maps.Data.StyleOptions
| null;
/**
* Loads GeoJSON from a URL, and adds the features to the collection. <p>
* NOTE: The GeoJSON is fetched using XHR, and may not work cross-domain. If
* you have issues, we recommend you fetch the GeoJSON using your choice of
* AJAX library, and then call <code>addGeoJson()</code>.
*/
loadGeoJson(
url: string,
options?: google.maps.Data.GeoJsonOptions | null,
callback?: (a: google.maps.Data.Feature[]) => void,
): void;
/**
* Changes the style of a feature. These changes are applied on top of the
* style specified by <code>setStyle()</code>. Style properties set to
* <code>null</code> revert to the value specified via
* <code>setStyle()</code>.
*/
overrideStyle(
feature: google.maps.Data.Feature,
style: google.maps.Data.StyleOptions,
): void;
/**
* Removes a feature from the collection.
*/
remove(feature: google.maps.Data.Feature): void;
/**
* Removes the effect of previous <code>overrideStyle()</code> calls. The
* style of the given feature reverts to the style specified by
* <code>setStyle()</code>. <p>If no feature is given, all features have
* their style reverted.</p>
*/
revertStyle(feature?: google.maps.Data.Feature | null): void;
/**
* Sets the position of the drawing controls on the map.
*/
setControlPosition(controlPosition: google.maps.ControlPosition): void;
/**
* Sets which drawing modes are available for the user to select, in the
* order they are displayed. This should not include the <code>null</code>
* drawing mode, which is added by default. If <code>null</code>, drawing
* controls are disabled and not displayed. Possible drawing modes are
* <code>"Point"</code>, <code>"LineString"</code> or
* <code>"Polygon"</code>.
*/
setControls(controls: string[] | null): void;
/**
* Sets the current drawing mode of the given Data layer. A drawing mode of
* <code>null</code> means that the user can interact with the map as
* normal, and clicks do not draw anything. Possible drawing modes are
* <code>null</code>, <code>"Point"</code>, <code>"LineString"</code> or
* <code>"Polygon"</code>.
*/
setDrawingMode(drawingMode: string | null): void;
/**
* Renders the features on the specified map. If map is set to
* <code>null</code>, the features will be removed from the map.
*/
setMap(map: google.maps.Map | null): void;
/**
* Sets the style for all features in the collection. Styles specified on a
* per-feature basis via <code>overrideStyle()</code> continue to apply.
* <p>Pass either an object with the desired style options, or a function
* that computes the style for each feature. The function will be called
* every time a feature's properties are updated.
*/
setStyle(
style:
| google.maps.Data.StylingFunction
| google.maps.Data.StyleOptions
| null,
): void;
/**
* Exports the features in the collection to a GeoJSON object.
*/
toGeoJson(callback: (a: object) => void): void;
}
/**
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
*
* An interface representing a feature from a Dataset. The
* <code>featureType</code> of a <code>DatasetFeature</code> will always be
* <code>FeatureType.DATASET</code>.
*/
export interface DatasetFeature extends google.maps.Feature {
/**
* Key-value mapping of the feature's attributes.
*/
datasetAttributes: {[key: string]: string};
/**
* Dataset id of the dataset that this feature belongs to.
*/
datasetId: string;
}
/**
* A single geocoded waypoint.
*/
export interface DirectionsGeocodedWaypoint {
/**
* Whether the geocoder did not return an exact match for the original
* waypoint, though it was able to match part of the requested address.
*/
partial_match?: boolean;
/**
* The place ID associated with the waypoint. Place IDs uniquely identify a
* place in the Google Places database and on Google Maps. Learn more about
* <a
* href="https://developers.google.com/maps/documentation/places/web-service/place-id">Place
* IDs</a> in the Places API developer guide.
*/
place_id?: string;
/**
* An array of strings denoting the type of the returned geocoded element.
* For a list of possible strings, refer to the <a href=
* "https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingAddressTypes">
* Address Component Types</a> section of the Developer's Guide.
*/
types?: string[];
}
/**
* A single leg consisting of a set of steps in a <code><a
* href="#DirectionsResult">DirectionsResult</a></code>. Some fields in the
* leg may not be returned for all requests. Note that though this result is
* "JSON-like," it is not strictly JSON, as it directly and
* indirectly includes <code>LatLng</code> objects.
*/
export interface DirectionsLeg {
/**
* An estimated arrival time for this leg. Only applicable for TRANSIT
* requests.
*/
arrival_time?: google.maps.Time;
/**
* An estimated departure time for this leg. Only applicable for TRANSIT
* requests.
*/
departure_time?: google.maps.Time;
/**
* The total distance covered by this leg. This property may be undefined as
* the distance may be unknown.
*/
distance?: google.maps.Distance;
/**
* The total duration of this leg. This property may be
* <code>undefined</code> as the duration may be unknown.
*/
duration?: google.maps.Duration;
/**
* The total duration of this leg, taking into account the traffic
* conditions indicated by the <code>trafficModel</code> property. This
* property may be <code>undefined</code> as the duration may be unknown.
*/
duration_in_traffic?: google.maps.Duration;
/**
* The address of the destination of this leg. This content is meant to be
* read as-is. Do not programmatically parse the formatted address.
*/
end_address: string;
/**
* The <code>DirectionsService</code> calculates directions between
* locations by using the nearest transportation option (usually a road) at
* the start and end locations. <code>end_location</code> indicates the
* actual geocoded destination, which may be different than the
* <code>end_location</code> of the last step if, for example, the road is
* not near the destination of this leg.
*/
end_location: google.maps.LatLng;
/**
* The address of the origin of this leg. This content is meant to be read
* as-is. Do not programmatically parse the formatted address.
*/
start_address: string;
/**
* The <code>DirectionsService</code> calculates directions between
* locations by using the nearest transportation option (usually a road) at
* the start and end locations. <code>start_location</code> indicates the
* actual geocoded origin, which may be different than the
* <code>start_location</code> of the first step if, for example, the road
* is not near the origin of this leg.
*/
start_location: google.maps.LatLng;
/**
* An array of <code>DirectionsStep</code>s, each of which contains
* information about the individual steps in this leg.
*/
steps: google.maps.DirectionsStep[];
/**
* Information about traffic speed along the leg.
* @deprecated This array will always be empty.
*/
traffic_speed_entry: any[];
/**
* An array of non-stopover waypoints along this leg, which were specified
* in the original request. <p> <strong>Deprecated in alternative
* routes</strong>. Version 3.27 will be the last version of the API that
* adds extra <code>via_waypoints</code> in alternative routes. <p> When
* using the Directions Service to implement draggable directions, it is
* recommended to disable dragging of alternative routes. Only the main
* route should be draggable. Users can drag the main route until it matches
* an alternative route.
*/
via_waypoints: google.maps.LatLng[];
}
/**
* An object containing a <code>points</code> property to describe the
* polyline of a {@link google.maps.DirectionsStep}.
*/
export interface DirectionsPolyline {
/**
* An <a
* href="https://developers.google.com/maps/documentation/utilities/polylinealgorithm">encoded
* polyline</a>.
*/
points: string;
}
/**
* Renders directions obtained from the <code><a
* href="#DirectionsService">DirectionsService</a></code>.
*
* Access by calling `const {DirectionsRenderer} = await
* google.maps.importLibrary("routes")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
*/
export class DirectionsRenderer extends google.maps.MVCObject {
/**
* Renders directions obtained from the <code><a
* href="#DirectionsService">DirectionsService</a></code>.
*
* Access by calling `const {DirectionsRenderer} = await
* google.maps.importLibrary("routes")`. See
* https://developers.google.com/maps/documentation/javascript/libraries.
*/
constructor(opts?: google.maps.DirectionsRendererOptions | null);
/**
* Returns the renderer's current set of directions.
*/
getDirections(): google.maps.DirectionsResult | null;
/**
* Returns the map on which the <code>DirectionsResult</code> is rendered.
*/
getMap(): google.maps.Map | null;
/**
* Returns the panel <code><div></code> in which the
* <code>DirectionsResult</code> is rendered.
*/
getPanel(): HTMLElement | null;
/**
* Returns the current (zero-based) route index in use by this
* <code>DirectionsRenderer</code> object.
*/
getRouteIndex(): number;
/**
* Set the renderer to use the result from the
* <code>DirectionsService</code>. Setting a valid set of directions in this
* manner will display the directions on the renderer's designated map
* and panel.
*/
setDirections(directions: google.maps.DirectionsResult | null): void;
/**
* This method specifies the map on which directions will be rendered. Pass
* <code>null</code> to remove the directions from the map.
*/
setMap(map: google.maps.Map | null): void;
/**
* Change the options settings of this <code>DirectionsRenderer</code> after
* initialization.
*/
setOptions(options: google.maps.DirectionsRendererOptions | null): void;
/**
* This method renders the directions in a <code><div></code>. Pass
* <code>null</code> to remove the content from the panel.
*/
setPanel(panel: HTMLElement | null): void;
/**
* Set the (zero-based) index of the route in the
* <code>DirectionsResult</code> object to render. By default, the first
* route in the array will be rendered.
*/
setRouteIndex(routeIndex: number): void;
}
/**
* This object defines the properties that can be set on a
* <code>DirectionsRenderer</code> object.
*/
export interface DirectionsRendererOptions {
/**
* The directions to display on the map and/or in a <code><div></code>
* panel, retrieved as a <code>DirectionsResult</code> object from
* <code>DirectionsService</code>.
*/
directions?: google.maps.DirectionsResult | null;
/**
* If <code>true</code>, allows the user to drag and modify the paths of
* routes rendered by this <code>DirectionsRenderer</code>.
*/
draggable?: boolean | null;
/**
* This property indicates whether the renderer should provide a
* user-selectable list of routes shown in the directions panel.
* @defaultValue <code>false</code>
*/
hideRouteList?: boolean | null;
/**
* The <code>InfoWindow</code> in which to render text information when a
* marker is clicked. Existing info window content will be overwritten and
* its position moved. If no info window is specified, the
* <code>DirectionsRenderer</code> will create and use its own info window.
* This property will be ignored if <code>suppressInfoWindows</code> is set
* to <code>true</code>.
*/
infoWindow?: google.maps.InfoWindow | null;
/**
* Map on which to display the directions.
*/
map?: google.maps.Map | null;
/**
* Options for the markers. All markers rendered by the
* <code>DirectionsRenderer</code> will use these options.
*/
markerOptions?: google.maps.MarkerOptions | null;
/**
* The <code><div></code> in which to display the directions steps.
*/
panel?: HTMLElement | null;
/**
* Options for the polylines. All polylines rendered by the
* <code>DirectionsRenderer</code> will use these options.
*/
polylineOptions?: google.maps.PolylineOptions | null;
/**
* If this option is set to <code>true</code> or the map's center and