/
google_maps_api_v3.js
10722 lines (9409 loc) · 340 KB
/
google_maps_api_v3.js
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
/*
* Copyright 2010 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs for the Google Maps v3 API.
* @see https://developers.google.com/maps/documentation/javascript/reference
* @externs
*/
/**
* @const
* @suppress {const,duplicate,strictMissingProperties}
*/
var google = {};
/**
* @const
* @suppress {const,duplicate,strictMissingProperties}
*/
google.maps = {};
/**
* Google Maps JavaScript API version loaded by the browser.
* @see https://developers.google.com/maps/documentation/javascript/versions
*
* @type {string}
* @const
*/
google.maps.version;
/**
* 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.
* @enum {number}
*/
google.maps.Animation = {
/**
* Marker bounces until animation is stopped by calling {@link
* google.maps.Marker.setAnimation} with <code>null</code>.
*/
BOUNCE: 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,
};
/**
* A layer showing bike lanes and paths.
* @extends {google.maps.MVCObject}
* @constructor
*/
google.maps.BicyclingLayer = function() {};
/**
* Returns the map on which this layer is displayed.
* @return {google.maps.Map}
*/
google.maps.BicyclingLayer.prototype.getMap = function() {};
/**
* Renders the layer on the specified map. If map is set to <code>null</code>,
* the layer will be removed.
* @param {google.maps.Map} map
* @return {undefined}
*/
google.maps.BicyclingLayer.prototype.setMap = function(map) {};
/**
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
* Used for setting the map's camera options.
* @record
*/
google.maps.CameraOptions = function() {};
/**
* @type {!google.maps.LatLngLiteral|!google.maps.LatLng|undefined}
*/
google.maps.CameraOptions.prototype.center;
/**
* @type {number|undefined}
*/
google.maps.CameraOptions.prototype.heading;
/**
* @type {number|undefined}
*/
google.maps.CameraOptions.prototype.tilt;
/**
* @type {number|undefined}
*/
google.maps.CameraOptions.prototype.zoom;
/**
* A circle on the Earth's surface; also known as a "spherical
* cap".
* @param {google.maps.CircleOptions=} opts
* @extends {google.maps.MVCObject}
* @constructor
*/
google.maps.Circle = function(opts) {};
/**
* Gets the <code>LatLngBounds</code> of this Circle.
* @return {google.maps.LatLngBounds}
*/
google.maps.Circle.prototype.getBounds = function() {};
/**
* Returns the center of this circle.
* @return {google.maps.LatLng}
*/
google.maps.Circle.prototype.getCenter = function() {};
/**
* Returns whether this circle can be dragged by the user.
* @return {boolean}
*/
google.maps.Circle.prototype.getDraggable = function() {};
/**
* Returns whether this circle can be edited by the user.
* @return {boolean}
*/
google.maps.Circle.prototype.getEditable = function() {};
/**
* Returns the map on which this circle is displayed.
* @return {google.maps.Map}
*/
google.maps.Circle.prototype.getMap = function() {};
/**
* Returns the radius of this circle (in meters).
* @return {number}
*/
google.maps.Circle.prototype.getRadius = function() {};
/**
* Returns whether this circle is visible on the map.
* @return {boolean}
*/
google.maps.Circle.prototype.getVisible = function() {};
/**
* Sets the center of this circle.
* @param {google.maps.LatLng|google.maps.LatLngLiteral} center
* @return {undefined}
*/
google.maps.Circle.prototype.setCenter = function(center) {};
/**
* If set to <code>true</code>, the user can drag this circle over the map.
* @param {boolean} draggable
* @return {undefined}
*/
google.maps.Circle.prototype.setDraggable = function(draggable) {};
/**
* 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.
* @param {boolean} editable
* @return {undefined}
*/
google.maps.Circle.prototype.setEditable = function(editable) {};
/**
* Renders the circle on the specified map. If map is set to <code>null</code>,
* the circle will be removed.
* @param {google.maps.Map} map
* @return {undefined}
*/
google.maps.Circle.prototype.setMap = function(map) {};
/**
* @param {google.maps.CircleOptions} options
* @return {undefined}
*/
google.maps.Circle.prototype.setOptions = function(options) {};
/**
* Sets the radius of this circle (in meters).
* @param {number} radius
* @return {undefined}
*/
google.maps.Circle.prototype.setRadius = function(radius) {};
/**
* Hides this circle if set to <code>false</code>.
* @param {boolean} visible
* @return {undefined}
*/
google.maps.Circle.prototype.setVisible = function(visible) {};
/**
* Object literal which represents a circle.
* @extends {google.maps.CircleOptions}
* @record
*/
google.maps.CircleLiteral = function() {};
/**
* The center of the Circle.
* @type {!google.maps.LatLng|!google.maps.LatLngLiteral}
*/
google.maps.CircleLiteral.prototype.center;
/**
* The radius in meters on the Earth's surface.
* @type {number}
*/
google.maps.CircleLiteral.prototype.radius;
/**
* CircleOptions object used to define the properties that can be set on a
* Circle.
* @record
*/
google.maps.CircleOptions = function() {};
/**
* The center of the Circle.
* @type {?google.maps.LatLng|?google.maps.LatLngLiteral|undefined}
*/
google.maps.CircleOptions.prototype.center;
/**
* Indicates whether this <code>Circle</code> handles mouse events. Defaults to
* <code>true</code>.
* @type {?boolean|undefined}
*/
google.maps.CircleOptions.prototype.clickable;
/**
* If set to <code>true</code>, the user can drag this circle over the map.
* Defaults to <code>false</code>.
* @type {?boolean|undefined}
*/
google.maps.CircleOptions.prototype.draggable;
/**
* 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. Defaults to <code>false</code>.
* @type {?boolean|undefined}
*/
google.maps.CircleOptions.prototype.editable;
/**
* The fill color. All CSS3 colors are supported except for extended named
* colors.
* @type {?string|undefined}
*/
google.maps.CircleOptions.prototype.fillColor;
/**
* The fill opacity between 0.0 and 1.0.
* @type {?number|undefined}
*/
google.maps.CircleOptions.prototype.fillOpacity;
/**
* Map on which to display the Circle.
* @type {?google.maps.Map|undefined}
*/
google.maps.CircleOptions.prototype.map;
/**
* The radius in meters on the Earth's surface.
* @type {?number|undefined}
*/
google.maps.CircleOptions.prototype.radius;
/**
* The stroke color. All CSS3 colors are supported except for extended named
* colors.
* @type {?string|undefined}
*/
google.maps.CircleOptions.prototype.strokeColor;
/**
* The stroke opacity between 0.0 and 1.0.
* @type {?number|undefined}
*/
google.maps.CircleOptions.prototype.strokeOpacity;
/**
* The stroke position. Defaults to CENTER. This property is not supported on
* Internet Explorer 8 and earlier.
* @type {?google.maps.StrokePosition|undefined}
*/
google.maps.CircleOptions.prototype.strokePosition;
/**
* The stroke width in pixels.
* @type {?number|undefined}
*/
google.maps.CircleOptions.prototype.strokeWeight;
/**
* Whether this circle is visible on the map. Defaults to <code>true</code>.
* @type {?boolean|undefined}
*/
google.maps.CircleOptions.prototype.visible;
/**
* The zIndex compared to other polys.
* @type {?number|undefined}
*/
google.maps.CircleOptions.prototype.zIndex;
/**
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
* @enum {string}
*/
google.maps.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 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.
* <code> <br> +----------------+
* <br> + TL TC TR
* +
* <br> + LT RT
* +
* <br> + +
* <br> + LC RC
* +
* <br> + +
* <br> + LB RB
* +
* <br> + BL BC BR
* + <br> +----------------+ <br></code> 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.
* @enum {number}
*/
google.maps.ControlPosition = {
/**
* Elements are positioned in the center of the bottom row.
*/
BOTTOM_CENTER: 0,
/**
* Elements are positioned in the bottom left and flow towards the middle.
* Elements are positioned to the right of the Google logo.
*/
BOTTOM_LEFT: 1,
/**
* Elements are positioned in the bottom right and flow towards the middle.
* Elements are positioned to the left of the copyrights.
*/
BOTTOM_RIGHT: 2,
/**
* Elements are positioned on the left, above bottom-left elements, and flow
* upwards.
*/
LEFT_BOTTOM: 3,
/**
* Elements are positioned in the center of the left side.
*/
LEFT_CENTER: 4,
/**
* Elements are positioned on the left, below top-left elements, and flow
* downwards.
*/
LEFT_TOP: 5,
/**
* Elements are positioned on the right, above bottom-right elements, and flow
* upwards.
*/
RIGHT_BOTTOM: 6,
/**
* Elements are positioned in the center of the right side.
*/
RIGHT_CENTER: 7,
/**
* Elements are positioned on the right, below top-right elements, and flow
* downwards.
*/
RIGHT_TOP: 8,
/**
* Elements are positioned in the center of the top row.
*/
TOP_CENTER: 9,
/**
* Elements are positioned in the top left and flow towards the middle.
*/
TOP_LEFT: 10,
/**
* Elements are positioned in the top right and flow towards the middle.
*/
TOP_RIGHT: 11,
};
/**
* Available only in the v=beta channel: https://goo.gle/3oAthT3.
* This class 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.
* @record
*/
google.maps.CoordinateTransformer = function() {};
/**
* @param {!google.maps.LatLng|!google.maps.LatLngLiteral} latLng
* @param {number} altitude in meters
* @param {!Float32Array=} rotations Array that contains euler rotation angles
* specified in degrees.
* @param {!Float32Array=} scale Array of scalars to apply to the cardinal axis.
* @return {!Float64Array} MVP matrix to use with WebGL.
*/
google.maps.CoordinateTransformer.prototype.fromLatLngAltitude = function(
latLng, altitude, rotations, scale) {};
/**
* @return {!google.maps.WebglCameraParams} camera parameters
*/
google.maps.CoordinateTransformer.prototype.getCameraParams = function() {};
/**
* 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>.
* @param {google.maps.Data.DataOptions=} options
* @extends {google.maps.MVCObject}
* @constructor
*/
google.maps.Data = function(options) {};
/**
* 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.
* @param {(google.maps.Data.Feature|google.maps.Data.FeatureOptions)=} feature
* @return {!google.maps.Data.Feature}
*/
google.maps.Data.prototype.add = function(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.
* @param {!Object} geoJson
* @param {google.maps.Data.GeoJsonOptions=} options
* @return {!Array<!google.maps.Data.Feature>}
*/
google.maps.Data.prototype.addGeoJson = function(geoJson, options) {};
/**
* Checks whether the given feature is in the collection.
* @param {!google.maps.Data.Feature} feature
* @return {boolean}
*/
google.maps.Data.prototype.contains = function(feature) {};
/**
* 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.
* @param {function(!google.maps.Data.Feature): void} callback
* @return {undefined}
*/
google.maps.Data.prototype.forEach = function(callback) {};
/**
* Returns the position of the drawing controls on the map.
* @return {google.maps.ControlPosition}
*/
google.maps.Data.prototype.getControlPosition = function() {};
/**
* 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>.
* @return {Array<string>}
*/
google.maps.Data.prototype.getControls = function() {};
/**
* 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>.
* @return {?string}
*/
google.maps.Data.prototype.getDrawingMode = function() {};
/**
* 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.
* @param {number|string} id
* @return {!google.maps.Data.Feature|undefined}
*/
google.maps.Data.prototype.getFeatureById = function(id) {};
/**
* Returns the map on which the features are displayed.
* @return {google.maps.Map}
*/
google.maps.Data.prototype.getMap = function() {};
/**
* Gets the style for all features in the collection.
* @return {google.maps.Data.StylingFunction|google.maps.Data.StyleOptions}
*/
google.maps.Data.prototype.getStyle = function() {};
/**
* 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>.
* @param {string} url
* @param {google.maps.Data.GeoJsonOptions=} options
* @param {(function(!Array<!google.maps.Data.Feature>): void)=} callback
* @return {undefined}
*/
google.maps.Data.prototype.loadGeoJson = function(url, options, callback) {};
/**
* 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>.
* @param {!google.maps.Data.Feature} feature
* @param {!google.maps.Data.StyleOptions} style
* @return {undefined}
*/
google.maps.Data.prototype.overrideStyle = function(feature, style) {};
/**
* Removes a feature from the collection.
* @param {!google.maps.Data.Feature} feature
* @return {undefined}
*/
google.maps.Data.prototype.remove = function(feature) {};
/**
* 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>
* @param {google.maps.Data.Feature=} feature
* @return {undefined}
*/
google.maps.Data.prototype.revertStyle = function(feature) {};
/**
* Sets the position of the drawing controls on the map.
* @param {google.maps.ControlPosition} controlPosition
* @return {undefined}
*/
google.maps.Data.prototype.setControlPosition = function(controlPosition) {};
/**
* 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>.
* @param {Array<string>} controls
* @return {undefined}
*/
google.maps.Data.prototype.setControls = function(controls) {};
/**
* 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>.
* @param {?string} drawingMode
* @return {undefined}
*/
google.maps.Data.prototype.setDrawingMode = function(drawingMode) {};
/**
* Renders the features on the specified map. If map is set to
* <code>null</code>, the features will be removed from the map.
* @param {google.maps.Map} map
* @return {undefined}
*/
google.maps.Data.prototype.setMap = function(map) {};
/**
* 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.
* @param {google.maps.Data.StylingFunction|google.maps.Data.StyleOptions} style
* @return {undefined}
*/
google.maps.Data.prototype.setStyle = function(style) {};
/**
* Exports the features in the collection to a GeoJSON object.
* @param {function(!Object): void} callback
* @return {undefined}
*/
google.maps.Data.prototype.toGeoJson = function(callback) {};
/**
* The properties of a <code>addfeature</code> event.
* @record
*/
google.maps.Data.AddFeatureEvent = function() {};
/**
* The feature that was added to the <code>FeatureCollection</code>.
* @type {!google.maps.Data.Feature}
*/
google.maps.Data.AddFeatureEvent.prototype.feature;
/**
* DataOptions object used to define the properties that a developer can set on
* a <code>Data</code> object.
* @record
*/
google.maps.Data.DataOptions = function() {};
/**
* The position of the drawing controls on the map. The default position is
* TOP_LEFT.
* @type {!google.maps.ControlPosition|undefined}
*/
google.maps.Data.DataOptions.prototype.controlPosition;
/**
* Describes 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. Defaults to <code>null</code>.
* Possible drawing modes are <code>"Point"</code>, <code>"LineString"</code> or
* <code>"Polygon"</code>.
* @type {?Array<string>|undefined}
*/
google.maps.Data.DataOptions.prototype.controls;
/**
* 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. Defaults to <code>null</code>. Possible
* drawing modes are <code>null</code>, <code>"Point"</code>,
* <code>"LineString"</code> or <code>"Polygon"</code>.
* @type {?string|undefined}
*/
google.maps.Data.DataOptions.prototype.drawingMode;
/**
* When drawing is enabled and a user draws a Geometry (a Point, Line String or
* Polygon), this function is called with that Geometry and should return a
* Feature that is to be added to the Data layer. If a featureFactory is not
* supplied, a Feature with no id and no properties will be created from that
* Geometry instead. Defaults to <code>null</code>.
* @type {?(function(!google.maps.Data.Geometry):
* !google.maps.Data.Feature)|undefined}
*/
google.maps.Data.DataOptions.prototype.featureFactory;
/**
* Map on which to display the features in the collection.
* @type {!google.maps.Map}
*/
google.maps.Data.DataOptions.prototype.map;
/**
* Style for all features in the collection. For more details, see the <code><a
* href='#Data'>setStyle()</a></code> method above.
* @type {!google.maps.Data.StylingFunction|!google.maps.Data.StyleOptions|undefined}
*/
google.maps.Data.DataOptions.prototype.style;
/**
* A feature has a geometry, an id, and a set of properties.
* @param {google.maps.Data.FeatureOptions=} options
* @constructor
*/
google.maps.Data.Feature = function(options) {};
/**
* Repeatedly invokes the given function, passing a property value and name on
* each invocation. The order of iteration through the properties is undefined.
* @param {function(*, string): void} callback
* @return {undefined}
*/
google.maps.Data.Feature.prototype.forEachProperty = function(callback) {};
/**
* Returns the feature's geometry.
* @return {google.maps.Data.Geometry}
*/
google.maps.Data.Feature.prototype.getGeometry = function() {};
/**
* Returns the feature ID.
* @return {number|string|undefined}
*/
google.maps.Data.Feature.prototype.getId = function() {};
/**
* Returns the value of the requested property, or <code>undefined</code> if the
* property does not exist.
* @param {string} name
* @return {*}
*/
google.maps.Data.Feature.prototype.getProperty = function(name) {};
/**
* Removes the property with the given name.
* @param {string} name
* @return {undefined}
*/
google.maps.Data.Feature.prototype.removeProperty = function(name) {};
/**
* Sets the feature's geometry.
* @param {google.maps.Data.Geometry|google.maps.LatLng|google.maps.LatLngLiteral}
* newGeometry
* @return {undefined}
*/
google.maps.Data.Feature.prototype.setGeometry = function(newGeometry) {};
/**
* Sets the value of the specified property. If <code>newValue</code> is
* <code>undefined</code> this is equivalent to calling
* <code>removeProperty</code>.
* @param {string} name
* @param {*} newValue
* @return {undefined}
*/
google.maps.Data.Feature.prototype.setProperty = function(name, newValue) {};
/**
* Exports the feature to a GeoJSON object.
* @param {function(!Object): void} callback
* @return {undefined}
*/
google.maps.Data.Feature.prototype.toGeoJson = function(callback) {};
/**
* Optional parameters for creating <code>Data.Feature</code> objects.
* @record
*/
google.maps.Data.FeatureOptions = function() {};
/**
* The feature geometry. If none is specified when a feature is constructed, the
* feature's geometry will be <code>null</code>. If a <code>LatLng</code>
* object or <code>LatLngLiteral</code> is given, this will be converted to a
* <code>Data.Point</code> geometry.
* @type {?google.maps.Data.Geometry|?google.maps.LatLng|?google.maps.LatLngLiteral|undefined}
*/
google.maps.Data.FeatureOptions.prototype.geometry;
/**
* Feature ID is optional. If provided, it can be used to look up the feature in
* a <code>Data</code> object using the <code>getFeatureById()</code> method.
* Note that a feature's ID cannot be subsequently changed.
* @type {number|string|undefined}
*/
google.maps.Data.FeatureOptions.prototype.id;
/**
* The feature properties. This is an arbitrary mapping of property names to
* values.
* @type {?Object|undefined}
*/
google.maps.Data.FeatureOptions.prototype.properties;
/**
* Optional parameters for importing GeoJSON.
* @record
*/
google.maps.Data.GeoJsonOptions = function() {};
/**
* The name of the Feature property to use as the feature ID. If not specified,
* the GeoJSON Feature id will be used.
* @type {?string|undefined}
*/
google.maps.Data.GeoJsonOptions.prototype.idPropertyName;
/**
* A superclass for the various geometry objects.
* @record
*/
google.maps.Data.Geometry = function() {};
/**
* Repeatedly invokes the given function, passing a point from the geometry to
* the function on each invocation.
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
*/
google.maps.Data.Geometry.prototype.forEachLatLng = function(callback) {};
/**
* Returns the type of the geometry object. Possibilities are
* <code>"Point"</code>, <code>"MultiPoint"</code>, <code>"LineString"</code>,
* <code>"MultiLineString"</code>, <code>"LinearRing"</code>,
* <code>"Polygon"</code>, <code>"MultiPolygon"</code>, or
* <code>"GeometryCollection"</code>.
* @return {string}
*/
google.maps.Data.Geometry.prototype.getType = function() {};
/**
* A GeometryCollection contains a number of geometry objects. Any
* <code>LatLng</code> or <code>LatLngLiteral</code> objects are automatically
* converted to <code>Data.Point</code> geometry objects.
* @param {!Array<!google.maps.Data.Geometry|!google.maps.LatLng|!google.maps.LatLngLiteral>}
* elements
* @implements {google.maps.Data.Geometry}
* @constructor
*/
google.maps.Data.GeometryCollection = function(elements) {};
/**
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
* @override
*/
google.maps.Data.GeometryCollection.prototype.forEachLatLng = function(
callback) {};
/**
* Returns an array of the contained geometry objects. A new array is returned
* each time <code>getArray()</code> is called.
* @return {!Array<!google.maps.Data.Geometry>}
*/
google.maps.Data.GeometryCollection.prototype.getArray = function() {};
/**
* Returns the <code>n</code>-th contained geometry object.
* @param {number} n
* @return {!google.maps.Data.Geometry}
*/
google.maps.Data.GeometryCollection.prototype.getAt = function(n) {};
/**
* Returns the number of contained geometry objects.
* @return {number}
*/
google.maps.Data.GeometryCollection.prototype.getLength = function() {};
/**
* Returns the string <code>"GeometryCollection"</code>.
* @return {string}
* @override
*/
google.maps.Data.GeometryCollection.prototype.getType = function() {};
/**
* A LineString geometry contains a number of <code>LatLng</code>s.
* @param {!Array<!google.maps.LatLng|!google.maps.LatLngLiteral>} elements
* @implements {google.maps.Data.Geometry}
* @constructor
*/
google.maps.Data.LineString = function(elements) {};
/**
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
* @override
*/
google.maps.Data.LineString.prototype.forEachLatLng = function(callback) {};
/**
* Returns an array of the contained <code>LatLngs</code>. A new array is
* returned each time <code>getArray()</code> is called.
* @return {!Array<!google.maps.LatLng>}
*/
google.maps.Data.LineString.prototype.getArray = function() {};
/**
* Returns the <code>n</code>-th contained <code>LatLng</code>.
* @param {number} n
* @return {!google.maps.LatLng}
*/
google.maps.Data.LineString.prototype.getAt = function(n) {};
/**
* Returns the number of contained <code>LatLng</code>s.
* @return {number}
*/
google.maps.Data.LineString.prototype.getLength = function() {};
/**
* Returns the string <code>"LineString"</code>.
* @return {string}
* @override
*/
google.maps.Data.LineString.prototype.getType = function() {};
/**
* A LinearRing geometry contains a number of <code>LatLng</code>s, representing
* a closed LineString. There is no need to make the first <code>LatLng</code>
* equal to the last <code>LatLng</code>. The LinearRing is closed implicitly.
* @param {!Array<!google.maps.LatLng|!google.maps.LatLngLiteral>} elements
* @implements {google.maps.Data.Geometry}
* @constructor
*/
google.maps.Data.LinearRing = function(elements) {};
/**
* @param {function(!google.maps.LatLng): void} callback
* @return {undefined}
* @override
*/
google.maps.Data.LinearRing.prototype.forEachLatLng = function(callback) {};
/**
* Returns an array of the contained <code>LatLng</code>s. A new array is
* returned each time <code>getArray()</code> is called.
* @return {!Array<!google.maps.LatLng>}
*/
google.maps.Data.LinearRing.prototype.getArray = function() {};
/**
* Returns the <code>n</code>-th contained <code>LatLng</code>.
* @param {number} n
* @return {!google.maps.LatLng}
*/
google.maps.Data.LinearRing.prototype.getAt = function(n) {};
/**
* Returns the number of contained <code>LatLng</code>s.
* @return {number}
*/
google.maps.Data.LinearRing.prototype.getLength = function() {};
/**
* Returns the string <code>"LinearRing"</code>.
* @return {string}
* @override
*/
google.maps.Data.LinearRing.prototype.getType = function() {};
/**
* This object is passed to mouse event handlers on a <code>Data</code> object.
* @extends {google.maps.MapMouseEvent}
* @record
*/
google.maps.Data.MouseEvent = function() {};
/**