@@ -16,6 +16,7 @@ interface GoogleMapsWindow extends Window {
16
16
google ?: typeof google ;
17
17
}
18
18
19
+ // TODO(mbehrlich): Update this to use original map after updating DefinitelyTyped
19
20
/**
20
21
* Extends the Google Map interface due to the Definitely Typed implementation
21
22
* missing "getClickableIcons".
@@ -63,23 +64,112 @@ export class GoogleMap implements OnChanges, OnInit, OnDestroy {
63
64
this . _options . next ( options || DEFAULT_OPTIONS ) ;
64
65
}
65
66
67
+ /**
68
+ * See
69
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.bounds_changed
70
+ */
66
71
@Output ( ) boundsChanged = new EventEmitter < void > ( ) ;
72
+
73
+ /**
74
+ * See
75
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.center_changed
76
+ */
67
77
@Output ( ) centerChanged = new EventEmitter < void > ( ) ;
78
+
79
+ /**
80
+ * See
81
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.click
82
+ */
68
83
@Output ( ) mapClick = new EventEmitter < google . maps . MouseEvent | google . maps . IconMouseEvent > ( ) ;
84
+
85
+ /**
86
+ * See
87
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.dblclick
88
+ */
69
89
@Output ( ) mapDblclick = new EventEmitter < google . maps . MouseEvent > ( ) ;
90
+
91
+ /**
92
+ * See
93
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.drag
94
+ */
70
95
@Output ( ) mapDrag = new EventEmitter < void > ( ) ;
96
+
97
+ /**
98
+ * See
99
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.dragend
100
+ */
71
101
@Output ( ) mapDragend = new EventEmitter < void > ( ) ;
102
+
103
+ /**
104
+ * See
105
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.dragstart
106
+ */
72
107
@Output ( ) mapDragstart = new EventEmitter < void > ( ) ;
108
+
109
+ /**
110
+ * See
111
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.heading_changed
112
+ */
73
113
@Output ( ) headingChanged = new EventEmitter < void > ( ) ;
114
+
115
+ /**
116
+ * See
117
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.idle
118
+ */
74
119
@Output ( ) idle = new EventEmitter < void > ( ) ;
120
+
121
+ /**
122
+ * See
123
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.maptypeid_changed
124
+ */
75
125
@Output ( ) maptypeidChanged = new EventEmitter < void > ( ) ;
126
+
127
+ /**
128
+ * See
129
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.mousemove
130
+ */
76
131
@Output ( ) mapMousemove = new EventEmitter < google . maps . MouseEvent > ( ) ;
132
+
133
+ /**
134
+ * See
135
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.mouseout
136
+ */
77
137
@Output ( ) mapMouseout = new EventEmitter < google . maps . MouseEvent > ( ) ;
138
+
139
+ /**
140
+ * See
141
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.mouseover
142
+ */
78
143
@Output ( ) mapMouseover = new EventEmitter < google . maps . MouseEvent > ( ) ;
144
+
145
+ /**
146
+ * See
147
+ * developers.google.com/maps/documentation/javascript/reference/map#Map.projection_changed
148
+ */
79
149
@Output ( ) projectionChanged = new EventEmitter < void > ( ) ;
150
+
151
+ /**
152
+ * See
153
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.rightclick
154
+ */
80
155
@Output ( ) mapRightclick = new EventEmitter < google . maps . MouseEvent > ( ) ;
156
+
157
+ /**
158
+ * See
159
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.tilesloaded
160
+ */
81
161
@Output ( ) tilesloaded = new EventEmitter < void > ( ) ;
162
+
163
+ /**
164
+ * See
165
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.tilt_changed
166
+ */
82
167
@Output ( ) tiltChanged = new EventEmitter < void > ( ) ;
168
+
169
+ /**
170
+ * See
171
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.zoom_changed
172
+ */
83
173
@Output ( ) zoomChanged = new EventEmitter < void > ( ) ;
84
174
85
175
private _mapEl : HTMLElement ;
@@ -131,74 +221,142 @@ export class GoogleMap implements OnChanges, OnInit, OnDestroy {
131
221
}
132
222
}
133
223
224
+ /**
225
+ * See
226
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.fitBounds
227
+ */
134
228
fitBounds (
135
229
bounds : google . maps . LatLngBounds | google . maps . LatLngBoundsLiteral ,
136
230
padding ?: number | google . maps . Padding ) {
137
231
this . _googleMap . fitBounds ( bounds , padding ) ;
138
232
}
139
233
234
+ /**
235
+ * See
236
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.panBy
237
+ */
140
238
panBy ( x : number , y : number ) {
141
239
this . _googleMap . panBy ( x , y ) ;
142
240
}
143
241
242
+ /**
243
+ * See
244
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.panTo
245
+ */
144
246
panTo ( latLng : google . maps . LatLng | google . maps . LatLngLiteral ) {
145
247
this . _googleMap . panTo ( latLng ) ;
146
248
}
147
249
250
+ /**
251
+ * See
252
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.panToBounds
253
+ */
148
254
panToBounds (
149
255
latLngBounds : google . maps . LatLngBounds | google . maps . LatLngBoundsLiteral ,
150
256
padding ?: number | google . maps . Padding ) {
151
257
this . _googleMap . panToBounds ( latLngBounds , padding ) ;
152
258
}
153
259
260
+ /**
261
+ * See
262
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getBounds
263
+ */
154
264
getBounds ( ) : google . maps . LatLngBounds | null {
155
265
return this . _googleMap . getBounds ( ) || null ;
156
266
}
157
267
268
+ /**
269
+ * See
270
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getCenter
271
+ */
158
272
getCenter ( ) : google . maps . LatLng {
159
273
return this . _googleMap . getCenter ( ) ;
160
274
}
161
275
276
+ /**
277
+ * See
278
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getClickableIcons
279
+ */
162
280
getClickableIcons ( ) : boolean {
163
281
return this . _googleMap . getClickableIcons ( ) ;
164
282
}
165
283
284
+ /**
285
+ * See
286
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getHeading
287
+ */
166
288
getHeading ( ) : number {
167
289
return this . _googleMap . getHeading ( ) ;
168
290
}
169
291
292
+ /**
293
+ * See
294
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getMapTypeId
295
+ */
170
296
getMapTypeId ( ) : google . maps . MapTypeId | string {
171
297
return this . _googleMap . getMapTypeId ( ) ;
172
298
}
173
299
300
+ /**
301
+ * See
302
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getProjection
303
+ */
174
304
getProjection ( ) : google . maps . Projection | null {
175
305
return this . _googleMap . getProjection ( ) ;
176
306
}
177
307
308
+ /**
309
+ * See
310
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getStreetView
311
+ */
178
312
getStreetView ( ) : google . maps . StreetViewPanorama {
179
313
return this . _googleMap . getStreetView ( ) ;
180
314
}
181
315
316
+ /**
317
+ * See
318
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getTilt
319
+ */
182
320
getTilt ( ) : number {
183
321
return this . _googleMap . getTilt ( ) ;
184
322
}
185
323
324
+ /**
325
+ * See
326
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getZoom
327
+ */
186
328
getZoom ( ) : number {
187
329
return this . _googleMap . getZoom ( ) ;
188
330
}
189
331
332
+ /**
333
+ * See
334
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.controls
335
+ */
190
336
get controls ( ) : Array < google . maps . MVCArray < Node > > {
191
337
return this . _googleMap . controls ;
192
338
}
193
339
340
+ /**
341
+ * See
342
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.data
343
+ */
194
344
get data ( ) : google . maps . Data {
195
345
return this . _googleMap . data ;
196
346
}
197
347
348
+ /**
349
+ * See
350
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.mapTypes
351
+ */
198
352
get mapTypes ( ) : google . maps . MapTypeRegistry {
199
353
return this . _googleMap . mapTypes ;
200
354
}
201
355
356
+ /**
357
+ * See
358
+ * https://developers.google.com/maps/documentation/javascript/reference/map#Map.overlayMapTypes
359
+ */
202
360
get overlayMapTypes ( ) : google . maps . MVCArray < google . maps . MapType > {
203
361
return this . _googleMap . overlayMapTypes ;
204
362
}
0 commit comments