UNPKG

4.91 kBTypeScriptView Raw
1declare namespace google.maps {
2 /** Options for the rendering of the fullscreen control. */
3 interface FullscreenControlOptions {
4 /**
5 * Position id. Used to specify the position of the control on the map.
6 * The default position is RIGHT_TOP.
7 */
8 position?: ControlPosition;
9 }
10
11 /** Options for the rendering of the map type control. */
12 interface MapTypeControlOptions {
13 /** IDs of map types to show in the control. */
14 mapTypeIds?: Array<MapTypeId | string>;
15
16 /**
17 * Position id. Used to specify the position of the control on the map.
18 * The default position is TOP_RIGHT.
19 */
20 position?: ControlPosition;
21
22 /** Style id. Used to select what style of map type control to display. */
23 style?: MapTypeControlStyle;
24 }
25
26 enum MapTypeControlStyle {
27 DEFAULT = 0,
28 HORIZONTAL_BAR = 1,
29 DROPDOWN_MENU = 2,
30 INSET = 3,
31 INSET_LARGE = 4,
32 }
33
34 interface MotionTrackingControlOptions {
35 position?: ControlPosition;
36 }
37
38 /** Options for the rendering of the pan control. */
39 interface PanControlOptions {
40 /**
41 * Position id. Used to specify the position of the control on the map.
42 * The default position is TOP_LEFT.
43 */
44 position?: ControlPosition;
45 }
46
47 /** Options for the rendering of the rotate control. */
48 interface RotateControlOptions {
49 /**
50 * Position id. Used to specify the position of the control on the map.
51 * The default position is TOP_LEFT.
52 */
53 position?: ControlPosition;
54 }
55
56 /** Options for the rendering of the scale control. */
57 interface ScaleControlOptions {
58 /** Style id. Used to select what style of scale control to display. */
59 style?: ScaleControlStyle;
60 }
61
62 enum ScaleControlStyle {
63 DEFAULT = 0,
64 }
65
66 /** Options for the rendering of the Street View pegman control on the map. */
67 interface StreetViewControlOptions {
68 /**
69 * Position id. Used to specify the position of the control on the map. The
70 * default position is embedded within the navigation (zoom and pan)
71 * controls. If this position is empty or the same as that specified in the
72 * zoomControlOptions or panControlOptions, the Street View control will be
73 * displayed as part of the navigation controls. Otherwise, it will be
74 * displayed separately.
75 */
76 position?: ControlPosition;
77 }
78
79 // TODO find source documentation
80 enum ZoomControlStyle {
81 DEFAULT = 0,
82 SMALL = 1,
83 LARGE = 2,
84 }
85
86 /** Options for the rendering of the zoom control. */
87 interface ZoomControlOptions {
88 /**
89 * Position id. Used to specify the position of the control on the map.
90 * The default position is TOP_LEFT.
91 */
92 position?: ControlPosition;
93
94 style?: ZoomControlStyle;
95 }
96
97 /**
98 * Identifiers used to specify the placement of controls on the map. Controls
99 * are positioned relative to other controls in the same layout position.
100 * Controls that are added first are positioned closer to the edge of the map.
101 */
102 enum ControlPosition {
103 /** Elements are positioned in the center of the bottom row. */
104 BOTTOM_CENTER = 11,
105 /**
106 * Elements are positioned in the bottom left and flow towards the middle.
107 * Elements are positioned to the right of the Google logo.
108 */
109 BOTTOM_LEFT = 10,
110 /**
111 * Elements are positioned in the bottom right and flow towards the middle.
112 * Elements are positioned to the left of the copyrights.
113 */
114 BOTTOM_RIGHT = 12,
115 /**
116 * Elements are positioned on the left, above bottom-left elements, and flow
117 * upwards.
118 */
119 LEFT_BOTTOM = 6,
120 /** Elements are positioned in the center of the left side. */
121 LEFT_CENTER = 4,
122 /**
123 * Elements are positioned on the left, below top-left elements, and flow
124 * downwards.
125 */
126 LEFT_TOP = 5,
127 /**
128 * Elements are positioned on the right, above bottom-right elements, and
129 * flow upwards.
130 */
131 RIGHT_BOTTOM = 9,
132 /** Elements are positioned in the center of the right side. */
133 RIGHT_CENTER = 8,
134 /** Elements are positioned on the right, below top-right elements, and flow downwards. */
135 RIGHT_TOP = 7,
136 /** Elements are positioned in the center of the top row. */
137 TOP_CENTER = 2,
138 /** Elements are positioned in the top right and flow towards the middle. */
139 TOP_LEFT = 1,
140 /** Elements are positioned in the top right and flow towards the middle. */
141 TOP_RIGHT = 3,
142 }
143}