@angular/google-maps 16.0.0-next.4 → 16.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/esm2022/google-map/google-map.mjs +451 -0
  2. package/{esm2020 → esm2022}/google-maps-module.mjs +35 -35
  3. package/{esm2020 → esm2022}/map-base-layer.mjs +4 -4
  4. package/{esm2020 → esm2022}/map-bicycling-layer/map-bicycling-layer.mjs +4 -4
  5. package/esm2022/map-circle/map-circle.mjs +269 -0
  6. package/esm2022/map-directions-renderer/map-directions-renderer.mjs +139 -0
  7. package/{esm2020 → esm2022}/map-directions-renderer/map-directions-service.mjs +4 -4
  8. package/{esm2020 → esm2022}/map-geocoder/map-geocoder.mjs +4 -4
  9. package/esm2022/map-ground-overlay/map-ground-overlay.mjs +178 -0
  10. package/{esm2020 → esm2022}/map-heatmap-layer/map-heatmap-layer.mjs +4 -4
  11. package/esm2022/map-info-window/map-info-window.mjs +209 -0
  12. package/esm2022/map-kml-layer/map-kml-layer.mjs +171 -0
  13. package/esm2022/map-marker/map-marker.mjs +428 -0
  14. package/esm2022/map-marker-clusterer/map-marker-clusterer.mjs +406 -0
  15. package/esm2022/map-polygon/map-polygon.mjs +217 -0
  16. package/esm2022/map-polyline/map-polyline.mjs +208 -0
  17. package/esm2022/map-rectangle/map-rectangle.mjs +230 -0
  18. package/{esm2020 → esm2022}/map-traffic-layer/map-traffic-layer.mjs +4 -4
  19. package/{esm2020 → esm2022}/map-transit-layer/map-transit-layer.mjs +4 -4
  20. package/{fesm2020 → fesm2022}/google-maps.mjs +100 -130
  21. package/fesm2022/google-maps.mjs.map +1 -0
  22. package/index.d.ts +13 -13
  23. package/package.json +5 -11
  24. package/esm2020/google-map/google-map.mjs +0 -451
  25. package/esm2020/map-circle/map-circle.mjs +0 -269
  26. package/esm2020/map-directions-renderer/map-directions-renderer.mjs +0 -139
  27. package/esm2020/map-ground-overlay/map-ground-overlay.mjs +0 -178
  28. package/esm2020/map-info-window/map-info-window.mjs +0 -209
  29. package/esm2020/map-kml-layer/map-kml-layer.mjs +0 -171
  30. package/esm2020/map-marker/map-marker.mjs +0 -428
  31. package/esm2020/map-marker-clusterer/map-marker-clusterer.mjs +0 -406
  32. package/esm2020/map-polygon/map-polygon.mjs +0 -217
  33. package/esm2020/map-polyline/map-polyline.mjs +0 -208
  34. package/esm2020/map-rectangle/map-rectangle.mjs +0 -230
  35. package/fesm2015/google-maps.mjs +0 -3219
  36. package/fesm2015/google-maps.mjs.map +0 -1
  37. package/fesm2020/google-maps.mjs.map +0 -1
  38. /package/{esm2020 → esm2022}/google-maps_public_index.mjs +0 -0
  39. /package/{esm2020 → esm2022}/index.mjs +0 -0
  40. /package/{esm2020 → esm2022}/map-anchor-point.mjs +0 -0
  41. /package/{esm2020 → esm2022}/map-event-manager.mjs +0 -0
  42. /package/{esm2020 → esm2022}/map-marker-clusterer/marker-clusterer-types.mjs +0 -0
  43. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
@@ -1,3219 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, PLATFORM_ID, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, Input, Output, Directive, ContentChildren, NgModule, Injectable } from '@angular/core';
3
- import { isPlatformBrowser } from '@angular/common';
4
- import { BehaviorSubject, Observable, Subject, combineLatest } from 'rxjs';
5
- import { switchMap, take, map, takeUntil } from 'rxjs/operators';
6
-
7
- /**
8
- * @license
9
- * Copyright Google LLC All Rights Reserved.
10
- *
11
- * Use of this source code is governed by an MIT-style license that can be
12
- * found in the LICENSE file at https://angular.io/license
13
- */
14
- /** Manages event on a Google Maps object, ensuring that events are added only when necessary. */
15
- class MapEventManager {
16
- /** Clears all currently-registered event listeners. */
17
- _clearListeners() {
18
- for (const listener of this._listeners) {
19
- listener.remove();
20
- }
21
- this._listeners = [];
22
- }
23
- constructor(_ngZone) {
24
- this._ngZone = _ngZone;
25
- /** Pending listeners that were added before the target was set. */
26
- this._pending = [];
27
- this._listeners = [];
28
- this._targetStream = new BehaviorSubject(undefined);
29
- }
30
- /** Gets an observable that adds an event listener to the map when a consumer subscribes to it. */
31
- getLazyEmitter(name) {
32
- return this._targetStream.pipe(switchMap(target => {
33
- const observable = new Observable(observer => {
34
- // If the target hasn't been initialized yet, cache the observer so it can be added later.
35
- if (!target) {
36
- this._pending.push({ observable, observer });
37
- return undefined;
38
- }
39
- const listener = target.addListener(name, (event) => {
40
- this._ngZone.run(() => observer.next(event));
41
- });
42
- // If there's an error when initializing the Maps API (e.g. a wrong API key), it will
43
- // return a dummy object that returns `undefined` from `addListener` (see #26514).
44
- if (!listener) {
45
- observer.complete();
46
- return undefined;
47
- }
48
- this._listeners.push(listener);
49
- return () => listener.remove();
50
- });
51
- return observable;
52
- }));
53
- }
54
- /** Sets the current target that the manager should bind events to. */
55
- setTarget(target) {
56
- const currentTarget = this._targetStream.value;
57
- if (target === currentTarget) {
58
- return;
59
- }
60
- // Clear the listeners from the pre-existing target.
61
- if (currentTarget) {
62
- this._clearListeners();
63
- this._pending = [];
64
- }
65
- this._targetStream.next(target);
66
- // Add the listeners that were bound before the map was initialized.
67
- this._pending.forEach(subscriber => subscriber.observable.subscribe(subscriber.observer));
68
- this._pending = [];
69
- }
70
- /** Destroys the manager and clears the event listeners. */
71
- destroy() {
72
- this._clearListeners();
73
- this._pending = [];
74
- this._targetStream.complete();
75
- }
76
- }
77
-
78
- /// <reference types="google.maps" />
79
- /** default options set to the Googleplex */
80
- const DEFAULT_OPTIONS = {
81
- center: { lat: 37.421995, lng: -122.084092 },
82
- zoom: 17,
83
- // Note: the type conversion here isn't necessary for our CI, but it resolves a g3 failure.
84
- mapTypeId: 'roadmap',
85
- };
86
- /** Arbitrary default height for the map element */
87
- const DEFAULT_HEIGHT = '500px';
88
- /** Arbitrary default width for the map element */
89
- const DEFAULT_WIDTH = '500px';
90
- /**
91
- * Angular component that renders a Google Map via the Google Maps JavaScript
92
- * API.
93
- * @see https://developers.google.com/maps/documentation/javascript/reference/
94
- */
95
- class GoogleMap {
96
- set center(center) {
97
- this._center = center;
98
- }
99
- set zoom(zoom) {
100
- this._zoom = zoom;
101
- }
102
- set options(options) {
103
- this._options = options || DEFAULT_OPTIONS;
104
- }
105
- constructor(_elementRef, _ngZone, platformId) {
106
- this._elementRef = _elementRef;
107
- this._ngZone = _ngZone;
108
- this._eventManager = new MapEventManager(this._ngZone);
109
- /** Height of the map. Set this to `null` if you'd like to control the height through CSS. */
110
- this.height = DEFAULT_HEIGHT;
111
- /** Width of the map. Set this to `null` if you'd like to control the width through CSS. */
112
- this.width = DEFAULT_WIDTH;
113
- this._options = DEFAULT_OPTIONS;
114
- /** Event emitted when the map is initialized. */
115
- this.mapInitialized = new EventEmitter();
116
- /**
117
- * See
118
- * https://developers.google.com/maps/documentation/javascript/events#auth-errors
119
- */
120
- this.authFailure = new EventEmitter();
121
- /**
122
- * See
123
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.bounds_changed
124
- */
125
- this.boundsChanged = this._eventManager.getLazyEmitter('bounds_changed');
126
- /**
127
- * See
128
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.center_changed
129
- */
130
- this.centerChanged = this._eventManager.getLazyEmitter('center_changed');
131
- /**
132
- * See
133
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.click
134
- */
135
- this.mapClick = this._eventManager.getLazyEmitter('click');
136
- /**
137
- * See
138
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.dblclick
139
- */
140
- this.mapDblclick = this._eventManager.getLazyEmitter('dblclick');
141
- /**
142
- * See
143
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.drag
144
- */
145
- this.mapDrag = this._eventManager.getLazyEmitter('drag');
146
- /**
147
- * See
148
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.dragend
149
- */
150
- this.mapDragend = this._eventManager.getLazyEmitter('dragend');
151
- /**
152
- * See
153
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.dragstart
154
- */
155
- this.mapDragstart = this._eventManager.getLazyEmitter('dragstart');
156
- /**
157
- * See
158
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.heading_changed
159
- */
160
- this.headingChanged = this._eventManager.getLazyEmitter('heading_changed');
161
- /**
162
- * See
163
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.idle
164
- */
165
- this.idle = this._eventManager.getLazyEmitter('idle');
166
- /**
167
- * See
168
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.maptypeid_changed
169
- */
170
- this.maptypeidChanged = this._eventManager.getLazyEmitter('maptypeid_changed');
171
- /**
172
- * See
173
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.mousemove
174
- */
175
- this.mapMousemove = this._eventManager.getLazyEmitter('mousemove');
176
- /**
177
- * See
178
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.mouseout
179
- */
180
- this.mapMouseout = this._eventManager.getLazyEmitter('mouseout');
181
- /**
182
- * See
183
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.mouseover
184
- */
185
- this.mapMouseover = this._eventManager.getLazyEmitter('mouseover');
186
- /**
187
- * See
188
- * developers.google.com/maps/documentation/javascript/reference/map#Map.projection_changed
189
- */
190
- this.projectionChanged = this._eventManager.getLazyEmitter('projection_changed');
191
- /**
192
- * See
193
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.rightclick
194
- */
195
- this.mapRightclick = this._eventManager.getLazyEmitter('rightclick');
196
- /**
197
- * See
198
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.tilesloaded
199
- */
200
- this.tilesloaded = this._eventManager.getLazyEmitter('tilesloaded');
201
- /**
202
- * See
203
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.tilt_changed
204
- */
205
- this.tiltChanged = this._eventManager.getLazyEmitter('tilt_changed');
206
- /**
207
- * See
208
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.zoom_changed
209
- */
210
- this.zoomChanged = this._eventManager.getLazyEmitter('zoom_changed');
211
- this._isBrowser = isPlatformBrowser(platformId);
212
- if (this._isBrowser) {
213
- const googleMapsWindow = window;
214
- if (!googleMapsWindow.google && (typeof ngDevMode === 'undefined' || ngDevMode)) {
215
- throw Error('Namespace google not found, cannot construct embedded google ' +
216
- 'map. Please install the Google Maps JavaScript API: ' +
217
- 'https://developers.google.com/maps/documentation/javascript/' +
218
- 'tutorial#Loading_the_Maps_API');
219
- }
220
- this._existingAuthFailureCallback = googleMapsWindow.gm_authFailure;
221
- googleMapsWindow.gm_authFailure = () => {
222
- if (this._existingAuthFailureCallback) {
223
- this._existingAuthFailureCallback();
224
- }
225
- this.authFailure.emit();
226
- };
227
- }
228
- }
229
- ngOnChanges(changes) {
230
- if (changes['height'] || changes['width']) {
231
- this._setSize();
232
- }
233
- const googleMap = this.googleMap;
234
- if (googleMap) {
235
- if (changes['options']) {
236
- googleMap.setOptions(this._combineOptions());
237
- }
238
- if (changes['center'] && this._center) {
239
- googleMap.setCenter(this._center);
240
- }
241
- // Note that the zoom can be zero.
242
- if (changes['zoom'] && this._zoom != null) {
243
- googleMap.setZoom(this._zoom);
244
- }
245
- if (changes['mapTypeId'] && this.mapTypeId) {
246
- googleMap.setMapTypeId(this.mapTypeId);
247
- }
248
- }
249
- }
250
- ngOnInit() {
251
- // It should be a noop during server-side rendering.
252
- if (this._isBrowser) {
253
- this._mapEl = this._elementRef.nativeElement.querySelector('.map-container');
254
- this._setSize();
255
- // Create the object outside the zone so its events don't trigger change detection.
256
- // We'll bring it back in inside the `MapEventManager` only for the events that the
257
- // user has subscribed to.
258
- this._ngZone.runOutsideAngular(() => {
259
- this.googleMap = new google.maps.Map(this._mapEl, this._combineOptions());
260
- });
261
- this._eventManager.setTarget(this.googleMap);
262
- this.mapInitialized.emit(this.googleMap);
263
- }
264
- }
265
- ngOnDestroy() {
266
- this._eventManager.destroy();
267
- if (this._isBrowser) {
268
- const googleMapsWindow = window;
269
- googleMapsWindow.gm_authFailure = this._existingAuthFailureCallback;
270
- }
271
- }
272
- /**
273
- * See
274
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.fitBounds
275
- */
276
- fitBounds(bounds, padding) {
277
- this._assertInitialized();
278
- this.googleMap.fitBounds(bounds, padding);
279
- }
280
- /**
281
- * See
282
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.panBy
283
- */
284
- panBy(x, y) {
285
- this._assertInitialized();
286
- this.googleMap.panBy(x, y);
287
- }
288
- /**
289
- * See
290
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.panTo
291
- */
292
- panTo(latLng) {
293
- this._assertInitialized();
294
- this.googleMap.panTo(latLng);
295
- }
296
- /**
297
- * See
298
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.panToBounds
299
- */
300
- panToBounds(latLngBounds, padding) {
301
- this._assertInitialized();
302
- this.googleMap.panToBounds(latLngBounds, padding);
303
- }
304
- /**
305
- * See
306
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getBounds
307
- */
308
- getBounds() {
309
- this._assertInitialized();
310
- return this.googleMap.getBounds() || null;
311
- }
312
- /**
313
- * See
314
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getCenter
315
- */
316
- getCenter() {
317
- this._assertInitialized();
318
- return this.googleMap.getCenter();
319
- }
320
- /**
321
- * See
322
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getClickableIcons
323
- */
324
- getClickableIcons() {
325
- this._assertInitialized();
326
- return this.googleMap.getClickableIcons();
327
- }
328
- /**
329
- * See
330
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getHeading
331
- */
332
- getHeading() {
333
- this._assertInitialized();
334
- return this.googleMap.getHeading();
335
- }
336
- /**
337
- * See
338
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getMapTypeId
339
- */
340
- getMapTypeId() {
341
- this._assertInitialized();
342
- return this.googleMap.getMapTypeId();
343
- }
344
- /**
345
- * See
346
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getProjection
347
- */
348
- getProjection() {
349
- this._assertInitialized();
350
- return this.googleMap.getProjection() || null;
351
- }
352
- /**
353
- * See
354
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getStreetView
355
- */
356
- getStreetView() {
357
- this._assertInitialized();
358
- return this.googleMap.getStreetView();
359
- }
360
- /**
361
- * See
362
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getTilt
363
- */
364
- getTilt() {
365
- this._assertInitialized();
366
- return this.googleMap.getTilt();
367
- }
368
- /**
369
- * See
370
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.getZoom
371
- */
372
- getZoom() {
373
- this._assertInitialized();
374
- return this.googleMap.getZoom();
375
- }
376
- /**
377
- * See
378
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.controls
379
- */
380
- get controls() {
381
- this._assertInitialized();
382
- return this.googleMap.controls;
383
- }
384
- /**
385
- * See
386
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.data
387
- */
388
- get data() {
389
- this._assertInitialized();
390
- return this.googleMap.data;
391
- }
392
- /**
393
- * See
394
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.mapTypes
395
- */
396
- get mapTypes() {
397
- this._assertInitialized();
398
- return this.googleMap.mapTypes;
399
- }
400
- /**
401
- * See
402
- * https://developers.google.com/maps/documentation/javascript/reference/map#Map.overlayMapTypes
403
- */
404
- get overlayMapTypes() {
405
- this._assertInitialized();
406
- return this.googleMap.overlayMapTypes;
407
- }
408
- _setSize() {
409
- if (this._mapEl) {
410
- const styles = this._mapEl.style;
411
- styles.height =
412
- this.height === null ? '' : coerceCssPixelValue(this.height) || DEFAULT_HEIGHT;
413
- styles.width = this.width === null ? '' : coerceCssPixelValue(this.width) || DEFAULT_WIDTH;
414
- }
415
- }
416
- /** Combines the center and zoom and the other map options into a single object */
417
- _combineOptions() {
418
- var _a, _b;
419
- const options = this._options || {};
420
- return Object.assign(Object.assign({}, options), {
421
- // It's important that we set **some** kind of `center` and `zoom`, otherwise
422
- // Google Maps will render a blank rectangle which looks broken.
423
- center: this._center || options.center || DEFAULT_OPTIONS.center, zoom: (_b = (_a = this._zoom) !== null && _a !== void 0 ? _a : options.zoom) !== null && _b !== void 0 ? _b : DEFAULT_OPTIONS.zoom,
424
- // Passing in an undefined `mapTypeId` seems to break tile loading
425
- // so make sure that we have some kind of default (see #22082).
426
- mapTypeId: this.mapTypeId || options.mapTypeId || DEFAULT_OPTIONS.mapTypeId });
427
- }
428
- /** Asserts that the map has been initialized. */
429
- _assertInitialized() {
430
- if (!this.googleMap && (typeof ngDevMode === 'undefined' || ngDevMode)) {
431
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
432
- 'Please wait for the API to load before trying to interact with it.');
433
- }
434
- }
435
- }
436
- GoogleMap.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: GoogleMap, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
437
- GoogleMap.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0-next.2", type: GoogleMap, selector: "google-map", inputs: { height: "height", width: "width", mapTypeId: "mapTypeId", center: "center", zoom: "zoom", options: "options" }, outputs: { mapInitialized: "mapInitialized", authFailure: "authFailure", boundsChanged: "boundsChanged", centerChanged: "centerChanged", mapClick: "mapClick", mapDblclick: "mapDblclick", mapDrag: "mapDrag", mapDragend: "mapDragend", mapDragstart: "mapDragstart", headingChanged: "headingChanged", idle: "idle", maptypeidChanged: "maptypeidChanged", mapMousemove: "mapMousemove", mapMouseout: "mapMouseout", mapMouseover: "mapMouseover", projectionChanged: "projectionChanged", mapRightclick: "mapRightclick", tilesloaded: "tilesloaded", tiltChanged: "tiltChanged", zoomChanged: "zoomChanged" }, exportAs: ["googleMap"], usesOnChanges: true, ngImport: i0, template: '<div class="map-container"></div><ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
438
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: GoogleMap, decorators: [{
439
- type: Component,
440
- args: [{
441
- selector: 'google-map',
442
- exportAs: 'googleMap',
443
- changeDetection: ChangeDetectionStrategy.OnPush,
444
- template: '<div class="map-container"></div><ng-content></ng-content>',
445
- encapsulation: ViewEncapsulation.None,
446
- }]
447
- }], ctorParameters: function () {
448
- return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: Object, decorators: [{
449
- type: Inject,
450
- args: [PLATFORM_ID]
451
- }] }];
452
- }, propDecorators: { height: [{
453
- type: Input
454
- }], width: [{
455
- type: Input
456
- }], mapTypeId: [{
457
- type: Input
458
- }], center: [{
459
- type: Input
460
- }], zoom: [{
461
- type: Input
462
- }], options: [{
463
- type: Input
464
- }], mapInitialized: [{
465
- type: Output
466
- }], authFailure: [{
467
- type: Output
468
- }], boundsChanged: [{
469
- type: Output
470
- }], centerChanged: [{
471
- type: Output
472
- }], mapClick: [{
473
- type: Output
474
- }], mapDblclick: [{
475
- type: Output
476
- }], mapDrag: [{
477
- type: Output
478
- }], mapDragend: [{
479
- type: Output
480
- }], mapDragstart: [{
481
- type: Output
482
- }], headingChanged: [{
483
- type: Output
484
- }], idle: [{
485
- type: Output
486
- }], maptypeidChanged: [{
487
- type: Output
488
- }], mapMousemove: [{
489
- type: Output
490
- }], mapMouseout: [{
491
- type: Output
492
- }], mapMouseover: [{
493
- type: Output
494
- }], projectionChanged: [{
495
- type: Output
496
- }], mapRightclick: [{
497
- type: Output
498
- }], tilesloaded: [{
499
- type: Output
500
- }], tiltChanged: [{
501
- type: Output
502
- }], zoomChanged: [{
503
- type: Output
504
- }] } });
505
- const cssUnitsPattern = /([A-Za-z%]+)$/;
506
- /** Coerces a value to a CSS pixel value. */
507
- function coerceCssPixelValue(value) {
508
- if (value == null) {
509
- return '';
510
- }
511
- return cssUnitsPattern.test(value) ? value : `${value}px`;
512
- }
513
-
514
- /// <reference types="google.maps" />
515
- class MapBaseLayer {
516
- constructor(_map, _ngZone) {
517
- this._map = _map;
518
- this._ngZone = _ngZone;
519
- }
520
- ngOnInit() {
521
- if (this._map._isBrowser) {
522
- this._ngZone.runOutsideAngular(() => {
523
- this._initializeObject();
524
- });
525
- this._assertInitialized();
526
- this._setMap();
527
- }
528
- }
529
- ngOnDestroy() {
530
- this._unsetMap();
531
- }
532
- _assertInitialized() {
533
- if (!this._map.googleMap) {
534
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
535
- 'Please wait for the API to load before trying to interact with it.');
536
- }
537
- }
538
- _initializeObject() { }
539
- _setMap() { }
540
- _unsetMap() { }
541
- }
542
- MapBaseLayer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapBaseLayer, deps: [{ token: GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
543
- MapBaseLayer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapBaseLayer, selector: "map-base-layer", exportAs: ["mapBaseLayer"], ngImport: i0 });
544
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapBaseLayer, decorators: [{
545
- type: Directive,
546
- args: [{
547
- selector: 'map-base-layer',
548
- exportAs: 'mapBaseLayer',
549
- }]
550
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.NgZone }]; } });
551
-
552
- /// <reference types="google.maps" />
553
- /**
554
- * Angular component that renders a Google Maps Bicycling Layer via the Google Maps JavaScript API.
555
- *
556
- * See developers.google.com/maps/documentation/javascript/reference/map#BicyclingLayer
557
- */
558
- class MapBicyclingLayer extends MapBaseLayer {
559
- _initializeObject() {
560
- this.bicyclingLayer = new google.maps.BicyclingLayer();
561
- }
562
- _setMap() {
563
- this._assertLayerInitialized();
564
- this.bicyclingLayer.setMap(this._map.googleMap);
565
- }
566
- _unsetMap() {
567
- if (this.bicyclingLayer) {
568
- this.bicyclingLayer.setMap(null);
569
- }
570
- }
571
- _assertLayerInitialized() {
572
- if (!this.bicyclingLayer) {
573
- throw Error('Cannot interact with a Google Map Bicycling Layer before it has been initialized. ' +
574
- 'Please wait for the Transit Layer to load before trying to interact with it.');
575
- }
576
- }
577
- }
578
- MapBicyclingLayer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapBicyclingLayer, deps: null, target: i0.ɵɵFactoryTarget.Directive });
579
- MapBicyclingLayer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapBicyclingLayer, selector: "map-bicycling-layer", exportAs: ["mapBicyclingLayer"], usesInheritance: true, ngImport: i0 });
580
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapBicyclingLayer, decorators: [{
581
- type: Directive,
582
- args: [{
583
- selector: 'map-bicycling-layer',
584
- exportAs: 'mapBicyclingLayer',
585
- }]
586
- }] });
587
-
588
- /// <reference types="google.maps" />
589
- /**
590
- * Angular component that renders a Google Maps Circle via the Google Maps JavaScript API.
591
- * @see developers.google.com/maps/documentation/javascript/reference/polygon#Circle
592
- */
593
- class MapCircle {
594
- set options(options) {
595
- this._options.next(options || {});
596
- }
597
- set center(center) {
598
- this._center.next(center);
599
- }
600
- set radius(radius) {
601
- this._radius.next(radius);
602
- }
603
- constructor(_map, _ngZone) {
604
- this._map = _map;
605
- this._ngZone = _ngZone;
606
- this._eventManager = new MapEventManager(this._ngZone);
607
- this._options = new BehaviorSubject({});
608
- this._center = new BehaviorSubject(undefined);
609
- this._radius = new BehaviorSubject(undefined);
610
- this._destroyed = new Subject();
611
- /**
612
- * @see
613
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.center_changed
614
- */
615
- this.centerChanged = this._eventManager.getLazyEmitter('center_changed');
616
- /**
617
- * @see
618
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.click
619
- */
620
- this.circleClick = this._eventManager.getLazyEmitter('click');
621
- /**
622
- * @see
623
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.dblclick
624
- */
625
- this.circleDblclick = this._eventManager.getLazyEmitter('dblclick');
626
- /**
627
- * @see
628
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.drag
629
- */
630
- this.circleDrag = this._eventManager.getLazyEmitter('drag');
631
- /**
632
- * @see
633
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.dragend
634
- */
635
- this.circleDragend = this._eventManager.getLazyEmitter('dragend');
636
- /**
637
- * @see
638
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.dragstart
639
- */
640
- this.circleDragstart = this._eventManager.getLazyEmitter('dragstart');
641
- /**
642
- * @see
643
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.mousedown
644
- */
645
- this.circleMousedown = this._eventManager.getLazyEmitter('mousedown');
646
- /**
647
- * @see
648
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.mousemove
649
- */
650
- this.circleMousemove = this._eventManager.getLazyEmitter('mousemove');
651
- /**
652
- * @see
653
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.mouseout
654
- */
655
- this.circleMouseout = this._eventManager.getLazyEmitter('mouseout');
656
- /**
657
- * @see
658
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.mouseover
659
- */
660
- this.circleMouseover = this._eventManager.getLazyEmitter('mouseover');
661
- /**
662
- * @see
663
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.mouseup
664
- */
665
- this.circleMouseup = this._eventManager.getLazyEmitter('mouseup');
666
- /**
667
- * @see
668
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.radius_changed
669
- */
670
- this.radiusChanged = this._eventManager.getLazyEmitter('radius_changed');
671
- /**
672
- * @see
673
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.rightclick
674
- */
675
- this.circleRightclick = this._eventManager.getLazyEmitter('rightclick');
676
- }
677
- ngOnInit() {
678
- if (this._map._isBrowser) {
679
- this._combineOptions()
680
- .pipe(take(1))
681
- .subscribe(options => {
682
- // Create the object outside the zone so its events don't trigger change detection.
683
- // We'll bring it back in inside the `MapEventManager` only for the events that the
684
- // user has subscribed to.
685
- this._ngZone.runOutsideAngular(() => {
686
- this.circle = new google.maps.Circle(options);
687
- });
688
- this._assertInitialized();
689
- this.circle.setMap(this._map.googleMap);
690
- this._eventManager.setTarget(this.circle);
691
- });
692
- this._watchForOptionsChanges();
693
- this._watchForCenterChanges();
694
- this._watchForRadiusChanges();
695
- }
696
- }
697
- ngOnDestroy() {
698
- this._eventManager.destroy();
699
- this._destroyed.next();
700
- this._destroyed.complete();
701
- if (this.circle) {
702
- this.circle.setMap(null);
703
- }
704
- }
705
- /**
706
- * @see
707
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.getBounds
708
- */
709
- getBounds() {
710
- this._assertInitialized();
711
- return this.circle.getBounds();
712
- }
713
- /**
714
- * @see
715
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.getCenter
716
- */
717
- getCenter() {
718
- this._assertInitialized();
719
- return this.circle.getCenter();
720
- }
721
- /**
722
- * @see
723
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.getDraggable
724
- */
725
- getDraggable() {
726
- this._assertInitialized();
727
- return this.circle.getDraggable();
728
- }
729
- /**
730
- * @see
731
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.getEditable
732
- */
733
- getEditable() {
734
- this._assertInitialized();
735
- return this.circle.getEditable();
736
- }
737
- /**
738
- * @see
739
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.getRadius
740
- */
741
- getRadius() {
742
- this._assertInitialized();
743
- return this.circle.getRadius();
744
- }
745
- /**
746
- * @see
747
- * developers.google.com/maps/documentation/javascript/reference/polygon#Circle.getVisible
748
- */
749
- getVisible() {
750
- this._assertInitialized();
751
- return this.circle.getVisible();
752
- }
753
- _combineOptions() {
754
- return combineLatest([this._options, this._center, this._radius]).pipe(map(([options, center, radius]) => {
755
- const combinedOptions = Object.assign(Object.assign({}, options), { center: center || options.center, radius: radius !== undefined ? radius : options.radius });
756
- return combinedOptions;
757
- }));
758
- }
759
- _watchForOptionsChanges() {
760
- this._options.pipe(takeUntil(this._destroyed)).subscribe(options => {
761
- this._assertInitialized();
762
- this.circle.setOptions(options);
763
- });
764
- }
765
- _watchForCenterChanges() {
766
- this._center.pipe(takeUntil(this._destroyed)).subscribe(center => {
767
- if (center) {
768
- this._assertInitialized();
769
- this.circle.setCenter(center);
770
- }
771
- });
772
- }
773
- _watchForRadiusChanges() {
774
- this._radius.pipe(takeUntil(this._destroyed)).subscribe(radius => {
775
- if (radius !== undefined) {
776
- this._assertInitialized();
777
- this.circle.setRadius(radius);
778
- }
779
- });
780
- }
781
- _assertInitialized() {
782
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
783
- if (!this._map.googleMap) {
784
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
785
- 'Please wait for the API to load before trying to interact with it.');
786
- }
787
- if (!this.circle) {
788
- throw Error('Cannot interact with a Google Map Circle before it has been ' +
789
- 'initialized. Please wait for the Circle to load before trying to interact with it.');
790
- }
791
- }
792
- }
793
- }
794
- MapCircle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapCircle, deps: [{ token: GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
795
- MapCircle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapCircle, selector: "map-circle", inputs: { options: "options", center: "center", radius: "radius" }, outputs: { centerChanged: "centerChanged", circleClick: "circleClick", circleDblclick: "circleDblclick", circleDrag: "circleDrag", circleDragend: "circleDragend", circleDragstart: "circleDragstart", circleMousedown: "circleMousedown", circleMousemove: "circleMousemove", circleMouseout: "circleMouseout", circleMouseover: "circleMouseover", circleMouseup: "circleMouseup", radiusChanged: "radiusChanged", circleRightclick: "circleRightclick" }, exportAs: ["mapCircle"], ngImport: i0 });
796
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapCircle, decorators: [{
797
- type: Directive,
798
- args: [{
799
- selector: 'map-circle',
800
- exportAs: 'mapCircle',
801
- }]
802
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.NgZone }]; }, propDecorators: { options: [{
803
- type: Input
804
- }], center: [{
805
- type: Input
806
- }], radius: [{
807
- type: Input
808
- }], centerChanged: [{
809
- type: Output
810
- }], circleClick: [{
811
- type: Output
812
- }], circleDblclick: [{
813
- type: Output
814
- }], circleDrag: [{
815
- type: Output
816
- }], circleDragend: [{
817
- type: Output
818
- }], circleDragstart: [{
819
- type: Output
820
- }], circleMousedown: [{
821
- type: Output
822
- }], circleMousemove: [{
823
- type: Output
824
- }], circleMouseout: [{
825
- type: Output
826
- }], circleMouseover: [{
827
- type: Output
828
- }], circleMouseup: [{
829
- type: Output
830
- }], radiusChanged: [{
831
- type: Output
832
- }], circleRightclick: [{
833
- type: Output
834
- }] } });
835
-
836
- /// <reference types="google.maps" />
837
- /**
838
- * Angular component that renders a Google Maps Directions Renderer via the Google Maps
839
- * JavaScript API.
840
- *
841
- * See developers.google.com/maps/documentation/javascript/reference/directions#DirectionsRenderer
842
- */
843
- class MapDirectionsRenderer {
844
- /**
845
- * See developers.google.com/maps/documentation/javascript/reference/directions
846
- * #DirectionsRendererOptions.directions
847
- */
848
- set directions(directions) {
849
- this._directions = directions;
850
- }
851
- /**
852
- * See developers.google.com/maps/documentation/javascript/reference/directions
853
- * #DirectionsRendererOptions
854
- */
855
- set options(options) {
856
- this._options = options;
857
- }
858
- constructor(_googleMap, _ngZone) {
859
- this._googleMap = _googleMap;
860
- this._ngZone = _ngZone;
861
- this._eventManager = new MapEventManager(this._ngZone);
862
- /**
863
- * See developers.google.com/maps/documentation/javascript/reference/directions
864
- * #DirectionsRenderer.directions_changed
865
- */
866
- this.directionsChanged = this._eventManager.getLazyEmitter('directions_changed');
867
- }
868
- ngOnInit() {
869
- if (this._googleMap._isBrowser) {
870
- // Create the object outside the zone so its events don't trigger change detection.
871
- // We'll bring it back in inside the `MapEventManager` only for the events that the
872
- // user has subscribed to.
873
- this._ngZone.runOutsideAngular(() => {
874
- this.directionsRenderer = new google.maps.DirectionsRenderer(this._combineOptions());
875
- });
876
- this._assertInitialized();
877
- this.directionsRenderer.setMap(this._googleMap.googleMap);
878
- this._eventManager.setTarget(this.directionsRenderer);
879
- }
880
- }
881
- ngOnChanges(changes) {
882
- if (this.directionsRenderer) {
883
- if (changes['options']) {
884
- this.directionsRenderer.setOptions(this._combineOptions());
885
- }
886
- if (changes['directions'] && this._directions !== undefined) {
887
- this.directionsRenderer.setDirections(this._directions);
888
- }
889
- }
890
- }
891
- ngOnDestroy() {
892
- this._eventManager.destroy();
893
- if (this.directionsRenderer) {
894
- this.directionsRenderer.setMap(null);
895
- }
896
- }
897
- /**
898
- * See developers.google.com/maps/documentation/javascript/reference/directions
899
- * #DirectionsRenderer.getDirections
900
- */
901
- getDirections() {
902
- this._assertInitialized();
903
- return this.directionsRenderer.getDirections();
904
- }
905
- /**
906
- * See developers.google.com/maps/documentation/javascript/reference/directions
907
- * #DirectionsRenderer.getPanel
908
- */
909
- getPanel() {
910
- this._assertInitialized();
911
- return this.directionsRenderer.getPanel();
912
- }
913
- /**
914
- * See developers.google.com/maps/documentation/javascript/reference/directions
915
- * #DirectionsRenderer.getRouteIndex
916
- */
917
- getRouteIndex() {
918
- this._assertInitialized();
919
- return this.directionsRenderer.getRouteIndex();
920
- }
921
- _combineOptions() {
922
- const options = this._options || {};
923
- return Object.assign(Object.assign({}, options), { directions: this._directions || options.directions, map: this._googleMap.googleMap });
924
- }
925
- _assertInitialized() {
926
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
927
- if (!this._googleMap.googleMap) {
928
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
929
- 'Please wait for the API to load before trying to interact with it.');
930
- }
931
- if (!this.directionsRenderer) {
932
- throw Error('Cannot interact with a Google Map Directions Renderer before it has been ' +
933
- 'initialized. Please wait for the Directions Renderer to load before trying ' +
934
- 'to interact with it.');
935
- }
936
- }
937
- }
938
- }
939
- MapDirectionsRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapDirectionsRenderer, deps: [{ token: GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
940
- MapDirectionsRenderer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapDirectionsRenderer, selector: "map-directions-renderer", inputs: { directions: "directions", options: "options" }, outputs: { directionsChanged: "directionsChanged" }, exportAs: ["mapDirectionsRenderer"], usesOnChanges: true, ngImport: i0 });
941
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapDirectionsRenderer, decorators: [{
942
- type: Directive,
943
- args: [{
944
- selector: 'map-directions-renderer',
945
- exportAs: 'mapDirectionsRenderer',
946
- }]
947
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.NgZone }]; }, propDecorators: { directions: [{
948
- type: Input
949
- }], options: [{
950
- type: Input
951
- }], directionsChanged: [{
952
- type: Output
953
- }] } });
954
-
955
- /// <reference types="google.maps" />
956
- /**
957
- * Angular component that renders a Google Maps Ground Overlay via the Google Maps JavaScript API.
958
- *
959
- * See developers.google.com/maps/documentation/javascript/reference/image-overlay#GroundOverlay
960
- */
961
- class MapGroundOverlay {
962
- /** URL of the image that will be shown in the overlay. */
963
- set url(url) {
964
- this._url.next(url);
965
- }
966
- /** Bounds for the overlay. */
967
- get bounds() {
968
- return this._bounds.value;
969
- }
970
- set bounds(bounds) {
971
- this._bounds.next(bounds);
972
- }
973
- /** Opacity of the overlay. */
974
- set opacity(opacity) {
975
- this._opacity.next(opacity);
976
- }
977
- constructor(_map, _ngZone) {
978
- this._map = _map;
979
- this._ngZone = _ngZone;
980
- this._eventManager = new MapEventManager(this._ngZone);
981
- this._opacity = new BehaviorSubject(1);
982
- this._url = new BehaviorSubject('');
983
- this._bounds = new BehaviorSubject(undefined);
984
- this._destroyed = new Subject();
985
- /** Whether the overlay is clickable */
986
- this.clickable = false;
987
- /**
988
- * See
989
- * developers.google.com/maps/documentation/javascript/reference/image-overlay#GroundOverlay.click
990
- */
991
- this.mapClick = this._eventManager.getLazyEmitter('click');
992
- /**
993
- * See
994
- * developers.google.com/maps/documentation/javascript/reference/image-overlay
995
- * #GroundOverlay.dblclick
996
- */
997
- this.mapDblclick = this._eventManager.getLazyEmitter('dblclick');
998
- }
999
- ngOnInit() {
1000
- if (this._map._isBrowser) {
1001
- // The ground overlay setup is slightly different from the other Google Maps objects in that
1002
- // we have to recreate the `GroundOverlay` object whenever the bounds change, because
1003
- // Google Maps doesn't provide an API to update the bounds of an existing overlay.
1004
- this._bounds.pipe(takeUntil(this._destroyed)).subscribe(bounds => {
1005
- if (this.groundOverlay) {
1006
- this.groundOverlay.setMap(null);
1007
- this.groundOverlay = undefined;
1008
- }
1009
- // Create the object outside the zone so its events don't trigger change detection.
1010
- // We'll bring it back in inside the `MapEventManager` only for the events that the
1011
- // user has subscribed to.
1012
- if (bounds) {
1013
- this._ngZone.runOutsideAngular(() => {
1014
- this.groundOverlay = new google.maps.GroundOverlay(this._url.getValue(), bounds, {
1015
- clickable: this.clickable,
1016
- opacity: this._opacity.value,
1017
- });
1018
- });
1019
- this._assertInitialized();
1020
- this.groundOverlay.setMap(this._map.googleMap);
1021
- this._eventManager.setTarget(this.groundOverlay);
1022
- }
1023
- });
1024
- this._watchForOpacityChanges();
1025
- this._watchForUrlChanges();
1026
- }
1027
- }
1028
- ngOnDestroy() {
1029
- this._eventManager.destroy();
1030
- this._destroyed.next();
1031
- this._destroyed.complete();
1032
- if (this.groundOverlay) {
1033
- this.groundOverlay.setMap(null);
1034
- }
1035
- }
1036
- /**
1037
- * See
1038
- * developers.google.com/maps/documentation/javascript/reference/image-overlay
1039
- * #GroundOverlay.getBounds
1040
- */
1041
- getBounds() {
1042
- this._assertInitialized();
1043
- return this.groundOverlay.getBounds();
1044
- }
1045
- /**
1046
- * See
1047
- * developers.google.com/maps/documentation/javascript/reference/image-overlay
1048
- * #GroundOverlay.getOpacity
1049
- */
1050
- getOpacity() {
1051
- this._assertInitialized();
1052
- return this.groundOverlay.getOpacity();
1053
- }
1054
- /**
1055
- * See
1056
- * developers.google.com/maps/documentation/javascript/reference/image-overlay
1057
- * #GroundOverlay.getUrl
1058
- */
1059
- getUrl() {
1060
- this._assertInitialized();
1061
- return this.groundOverlay.getUrl();
1062
- }
1063
- _watchForOpacityChanges() {
1064
- this._opacity.pipe(takeUntil(this._destroyed)).subscribe(opacity => {
1065
- if (opacity != null) {
1066
- this._assertInitialized();
1067
- this.groundOverlay.setOpacity(opacity);
1068
- }
1069
- });
1070
- }
1071
- _watchForUrlChanges() {
1072
- this._url.pipe(takeUntil(this._destroyed)).subscribe(url => {
1073
- this._assertInitialized();
1074
- const overlay = this.groundOverlay;
1075
- overlay.set('url', url);
1076
- // Google Maps only redraws the overlay if we re-set the map.
1077
- overlay.setMap(null);
1078
- overlay.setMap(this._map.googleMap);
1079
- });
1080
- }
1081
- _assertInitialized() {
1082
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
1083
- if (!this._map.googleMap) {
1084
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
1085
- 'Please wait for the API to load before trying to interact with it.');
1086
- }
1087
- if (!this.groundOverlay) {
1088
- throw Error('Cannot interact with a Google Map GroundOverlay before it has been initialized. ' +
1089
- 'Please wait for the GroundOverlay to load before trying to interact with it.');
1090
- }
1091
- }
1092
- }
1093
- }
1094
- MapGroundOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapGroundOverlay, deps: [{ token: GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
1095
- MapGroundOverlay.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapGroundOverlay, selector: "map-ground-overlay", inputs: { url: "url", bounds: "bounds", clickable: "clickable", opacity: "opacity" }, outputs: { mapClick: "mapClick", mapDblclick: "mapDblclick" }, exportAs: ["mapGroundOverlay"], ngImport: i0 });
1096
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapGroundOverlay, decorators: [{
1097
- type: Directive,
1098
- args: [{
1099
- selector: 'map-ground-overlay',
1100
- exportAs: 'mapGroundOverlay',
1101
- }]
1102
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.NgZone }]; }, propDecorators: { url: [{
1103
- type: Input
1104
- }], bounds: [{
1105
- type: Input
1106
- }], clickable: [{
1107
- type: Input
1108
- }], opacity: [{
1109
- type: Input
1110
- }], mapClick: [{
1111
- type: Output
1112
- }], mapDblclick: [{
1113
- type: Output
1114
- }] } });
1115
-
1116
- /// <reference types="google.maps" />
1117
- /**
1118
- * Angular component that renders a Google Maps info window via the Google Maps JavaScript API.
1119
- *
1120
- * See developers.google.com/maps/documentation/javascript/reference/info-window
1121
- */
1122
- class MapInfoWindow {
1123
- set options(options) {
1124
- this._options.next(options || {});
1125
- }
1126
- set position(position) {
1127
- this._position.next(position);
1128
- }
1129
- constructor(_googleMap, _elementRef, _ngZone) {
1130
- this._googleMap = _googleMap;
1131
- this._elementRef = _elementRef;
1132
- this._ngZone = _ngZone;
1133
- this._eventManager = new MapEventManager(this._ngZone);
1134
- this._options = new BehaviorSubject({});
1135
- this._position = new BehaviorSubject(undefined);
1136
- this._destroy = new Subject();
1137
- /**
1138
- * See
1139
- * developers.google.com/maps/documentation/javascript/reference/info-window#InfoWindow.closeclick
1140
- */
1141
- this.closeclick = this._eventManager.getLazyEmitter('closeclick');
1142
- /**
1143
- * See
1144
- * developers.google.com/maps/documentation/javascript/reference/info-window
1145
- * #InfoWindow.content_changed
1146
- */
1147
- this.contentChanged = this._eventManager.getLazyEmitter('content_changed');
1148
- /**
1149
- * See
1150
- * developers.google.com/maps/documentation/javascript/reference/info-window#InfoWindow.domready
1151
- */
1152
- this.domready = this._eventManager.getLazyEmitter('domready');
1153
- /**
1154
- * See
1155
- * developers.google.com/maps/documentation/javascript/reference/info-window
1156
- * #InfoWindow.position_changed
1157
- */
1158
- this.positionChanged = this._eventManager.getLazyEmitter('position_changed');
1159
- /**
1160
- * See
1161
- * developers.google.com/maps/documentation/javascript/reference/info-window
1162
- * #InfoWindow.zindex_changed
1163
- */
1164
- this.zindexChanged = this._eventManager.getLazyEmitter('zindex_changed');
1165
- }
1166
- ngOnInit() {
1167
- if (this._googleMap._isBrowser) {
1168
- const combinedOptionsChanges = this._combineOptions();
1169
- combinedOptionsChanges.pipe(take(1)).subscribe(options => {
1170
- // Create the object outside the zone so its events don't trigger change detection.
1171
- // We'll bring it back in inside the `MapEventManager` only for the events that the
1172
- // user has subscribed to.
1173
- this._ngZone.runOutsideAngular(() => {
1174
- this.infoWindow = new google.maps.InfoWindow(options);
1175
- });
1176
- this._eventManager.setTarget(this.infoWindow);
1177
- });
1178
- this._watchForOptionsChanges();
1179
- this._watchForPositionChanges();
1180
- }
1181
- }
1182
- ngOnDestroy() {
1183
- this._eventManager.destroy();
1184
- this._destroy.next();
1185
- this._destroy.complete();
1186
- // If no info window has been created on the server, we do not try closing it.
1187
- // On the server, an info window cannot be created and this would cause errors.
1188
- if (this.infoWindow) {
1189
- this.close();
1190
- }
1191
- }
1192
- /**
1193
- * See developers.google.com/maps/documentation/javascript/reference/info-window#InfoWindow.close
1194
- */
1195
- close() {
1196
- this._assertInitialized();
1197
- this.infoWindow.close();
1198
- }
1199
- /**
1200
- * See
1201
- * developers.google.com/maps/documentation/javascript/reference/info-window#InfoWindow.getContent
1202
- */
1203
- getContent() {
1204
- this._assertInitialized();
1205
- return this.infoWindow.getContent() || null;
1206
- }
1207
- /**
1208
- * See
1209
- * developers.google.com/maps/documentation/javascript/reference/info-window
1210
- * #InfoWindow.getPosition
1211
- */
1212
- getPosition() {
1213
- this._assertInitialized();
1214
- return this.infoWindow.getPosition() || null;
1215
- }
1216
- /**
1217
- * See
1218
- * developers.google.com/maps/documentation/javascript/reference/info-window#InfoWindow.getZIndex
1219
- */
1220
- getZIndex() {
1221
- this._assertInitialized();
1222
- return this.infoWindow.getZIndex();
1223
- }
1224
- /**
1225
- * Opens the MapInfoWindow using the provided anchor. If the anchor is not set,
1226
- * then the position property of the options input is used instead.
1227
- */
1228
- open(anchor, shouldFocus) {
1229
- this._assertInitialized();
1230
- const anchorObject = anchor ? anchor.getAnchor() : undefined;
1231
- // Prevent the info window from initializing when trying to reopen on the same anchor.
1232
- // Note that when the window is opened for the first time, the anchor will always be
1233
- // undefined. If that's the case, we have to allow it to open in order to handle the
1234
- // case where the window doesn't have an anchor, but is placed at a particular position.
1235
- if (this.infoWindow.get('anchor') !== anchorObject || !anchorObject) {
1236
- this._elementRef.nativeElement.style.display = '';
1237
- // The config is cast to `any`, because the internal typings are out of date.
1238
- this.infoWindow.open({
1239
- map: this._googleMap.googleMap,
1240
- anchor: anchorObject,
1241
- shouldFocus,
1242
- });
1243
- }
1244
- }
1245
- _combineOptions() {
1246
- return combineLatest([this._options, this._position]).pipe(map(([options, position]) => {
1247
- const combinedOptions = Object.assign(Object.assign({}, options), { position: position || options.position, content: this._elementRef.nativeElement });
1248
- return combinedOptions;
1249
- }));
1250
- }
1251
- _watchForOptionsChanges() {
1252
- this._options.pipe(takeUntil(this._destroy)).subscribe(options => {
1253
- this._assertInitialized();
1254
- this.infoWindow.setOptions(options);
1255
- });
1256
- }
1257
- _watchForPositionChanges() {
1258
- this._position.pipe(takeUntil(this._destroy)).subscribe(position => {
1259
- if (position) {
1260
- this._assertInitialized();
1261
- this.infoWindow.setPosition(position);
1262
- }
1263
- });
1264
- }
1265
- _assertInitialized() {
1266
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
1267
- if (!this._googleMap.googleMap) {
1268
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
1269
- 'Please wait for the API to load before trying to interact with it.');
1270
- }
1271
- if (!this.infoWindow) {
1272
- throw Error('Cannot interact with a Google Map Info Window before it has been ' +
1273
- 'initialized. Please wait for the Info Window to load before trying to interact with ' +
1274
- 'it.');
1275
- }
1276
- }
1277
- }
1278
- }
1279
- MapInfoWindow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapInfoWindow, deps: [{ token: GoogleMap }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
1280
- MapInfoWindow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapInfoWindow, selector: "map-info-window", inputs: { options: "options", position: "position" }, outputs: { closeclick: "closeclick", contentChanged: "contentChanged", domready: "domready", positionChanged: "positionChanged", zindexChanged: "zindexChanged" }, host: { styleAttribute: "display: none" }, exportAs: ["mapInfoWindow"], ngImport: i0 });
1281
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapInfoWindow, decorators: [{
1282
- type: Directive,
1283
- args: [{
1284
- selector: 'map-info-window',
1285
- exportAs: 'mapInfoWindow',
1286
- host: { 'style': 'display: none' },
1287
- }]
1288
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { options: [{
1289
- type: Input
1290
- }], position: [{
1291
- type: Input
1292
- }], closeclick: [{
1293
- type: Output
1294
- }], contentChanged: [{
1295
- type: Output
1296
- }], domready: [{
1297
- type: Output
1298
- }], positionChanged: [{
1299
- type: Output
1300
- }], zindexChanged: [{
1301
- type: Output
1302
- }] } });
1303
-
1304
- /// <reference types="google.maps" />
1305
- /**
1306
- * Angular component that renders a Google Maps KML Layer via the Google Maps JavaScript API.
1307
- *
1308
- * See developers.google.com/maps/documentation/javascript/reference/kml#KmlLayer
1309
- */
1310
- class MapKmlLayer {
1311
- set options(options) {
1312
- this._options.next(options || {});
1313
- }
1314
- set url(url) {
1315
- this._url.next(url);
1316
- }
1317
- constructor(_map, _ngZone) {
1318
- this._map = _map;
1319
- this._ngZone = _ngZone;
1320
- this._eventManager = new MapEventManager(this._ngZone);
1321
- this._options = new BehaviorSubject({});
1322
- this._url = new BehaviorSubject('');
1323
- this._destroyed = new Subject();
1324
- /**
1325
- * See developers.google.com/maps/documentation/javascript/reference/kml#KmlLayer.click
1326
- */
1327
- this.kmlClick = this._eventManager.getLazyEmitter('click');
1328
- /**
1329
- * See
1330
- * developers.google.com/maps/documentation/javascript/reference/kml
1331
- * #KmlLayer.defaultviewport_changed
1332
- */
1333
- this.defaultviewportChanged = this._eventManager.getLazyEmitter('defaultviewport_changed');
1334
- /**
1335
- * See developers.google.com/maps/documentation/javascript/reference/kml#KmlLayer.status_changed
1336
- */
1337
- this.statusChanged = this._eventManager.getLazyEmitter('status_changed');
1338
- }
1339
- ngOnInit() {
1340
- if (this._map._isBrowser) {
1341
- this._combineOptions()
1342
- .pipe(take(1))
1343
- .subscribe(options => {
1344
- // Create the object outside the zone so its events don't trigger change detection.
1345
- // We'll bring it back in inside the `MapEventManager` only for the events that the
1346
- // user has subscribed to.
1347
- this._ngZone.runOutsideAngular(() => (this.kmlLayer = new google.maps.KmlLayer(options)));
1348
- this._assertInitialized();
1349
- this.kmlLayer.setMap(this._map.googleMap);
1350
- this._eventManager.setTarget(this.kmlLayer);
1351
- });
1352
- this._watchForOptionsChanges();
1353
- this._watchForUrlChanges();
1354
- }
1355
- }
1356
- ngOnDestroy() {
1357
- this._eventManager.destroy();
1358
- this._destroyed.next();
1359
- this._destroyed.complete();
1360
- if (this.kmlLayer) {
1361
- this.kmlLayer.setMap(null);
1362
- }
1363
- }
1364
- /**
1365
- * See
1366
- * developers.google.com/maps/documentation/javascript/reference/kml#KmlLayer.getDefaultViewport
1367
- */
1368
- getDefaultViewport() {
1369
- this._assertInitialized();
1370
- return this.kmlLayer.getDefaultViewport();
1371
- }
1372
- /**
1373
- * See developers.google.com/maps/documentation/javascript/reference/kml#KmlLayer.getMetadata
1374
- */
1375
- getMetadata() {
1376
- this._assertInitialized();
1377
- return this.kmlLayer.getMetadata();
1378
- }
1379
- /**
1380
- * See developers.google.com/maps/documentation/javascript/reference/kml#KmlLayer.getStatus
1381
- */
1382
- getStatus() {
1383
- this._assertInitialized();
1384
- return this.kmlLayer.getStatus();
1385
- }
1386
- /**
1387
- * See developers.google.com/maps/documentation/javascript/reference/kml#KmlLayer.getUrl
1388
- */
1389
- getUrl() {
1390
- this._assertInitialized();
1391
- return this.kmlLayer.getUrl();
1392
- }
1393
- /**
1394
- * See developers.google.com/maps/documentation/javascript/reference/kml#KmlLayer.getZIndex
1395
- */
1396
- getZIndex() {
1397
- this._assertInitialized();
1398
- return this.kmlLayer.getZIndex();
1399
- }
1400
- _combineOptions() {
1401
- return combineLatest([this._options, this._url]).pipe(map(([options, url]) => {
1402
- const combinedOptions = Object.assign(Object.assign({}, options), { url: url || options.url });
1403
- return combinedOptions;
1404
- }));
1405
- }
1406
- _watchForOptionsChanges() {
1407
- this._options.pipe(takeUntil(this._destroyed)).subscribe(options => {
1408
- if (this.kmlLayer) {
1409
- this._assertInitialized();
1410
- this.kmlLayer.setOptions(options);
1411
- }
1412
- });
1413
- }
1414
- _watchForUrlChanges() {
1415
- this._url.pipe(takeUntil(this._destroyed)).subscribe(url => {
1416
- if (url && this.kmlLayer) {
1417
- this._assertInitialized();
1418
- this.kmlLayer.setUrl(url);
1419
- }
1420
- });
1421
- }
1422
- _assertInitialized() {
1423
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
1424
- if (!this._map.googleMap) {
1425
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
1426
- 'Please wait for the API to load before trying to interact with it.');
1427
- }
1428
- if (!this.kmlLayer) {
1429
- throw Error('Cannot interact with a Google Map KmlLayer before it has been ' +
1430
- 'initialized. Please wait for the KmlLayer to load before trying to interact with it.');
1431
- }
1432
- }
1433
- }
1434
- }
1435
- MapKmlLayer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapKmlLayer, deps: [{ token: GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
1436
- MapKmlLayer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapKmlLayer, selector: "map-kml-layer", inputs: { options: "options", url: "url" }, outputs: { kmlClick: "kmlClick", defaultviewportChanged: "defaultviewportChanged", statusChanged: "statusChanged" }, exportAs: ["mapKmlLayer"], ngImport: i0 });
1437
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapKmlLayer, decorators: [{
1438
- type: Directive,
1439
- args: [{
1440
- selector: 'map-kml-layer',
1441
- exportAs: 'mapKmlLayer',
1442
- }]
1443
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.NgZone }]; }, propDecorators: { options: [{
1444
- type: Input
1445
- }], url: [{
1446
- type: Input
1447
- }], kmlClick: [{
1448
- type: Output
1449
- }], defaultviewportChanged: [{
1450
- type: Output
1451
- }], statusChanged: [{
1452
- type: Output
1453
- }] } });
1454
-
1455
- /// <reference types="google.maps" />
1456
- /**
1457
- * Default options for the Google Maps marker component. Displays a marker
1458
- * at the Googleplex.
1459
- */
1460
- const DEFAULT_MARKER_OPTIONS = {
1461
- position: { lat: 37.421995, lng: -122.084092 },
1462
- };
1463
- /**
1464
- * Angular component that renders a Google Maps marker via the Google Maps JavaScript API.
1465
- *
1466
- * See developers.google.com/maps/documentation/javascript/reference/marker
1467
- */
1468
- class MapMarker {
1469
- /**
1470
- * Title of the marker.
1471
- * See: developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.title
1472
- */
1473
- set title(title) {
1474
- this._title = title;
1475
- }
1476
- /**
1477
- * Position of the marker. See:
1478
- * developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.position
1479
- */
1480
- set position(position) {
1481
- this._position = position;
1482
- }
1483
- /**
1484
- * Label for the marker.
1485
- * See: developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.label
1486
- */
1487
- set label(label) {
1488
- this._label = label;
1489
- }
1490
- /**
1491
- * Whether the marker is clickable. See:
1492
- * developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.clickable
1493
- */
1494
- set clickable(clickable) {
1495
- this._clickable = clickable;
1496
- }
1497
- /**
1498
- * Options used to configure the marker.
1499
- * See: developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions
1500
- */
1501
- set options(options) {
1502
- this._options = options;
1503
- }
1504
- /**
1505
- * Icon to be used for the marker.
1506
- * See: https://developers.google.com/maps/documentation/javascript/reference/marker#Icon
1507
- */
1508
- set icon(icon) {
1509
- this._icon = icon;
1510
- }
1511
- /**
1512
- * Whether the marker is visible.
1513
- * See: developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.visible
1514
- */
1515
- set visible(value) {
1516
- this._visible = value;
1517
- }
1518
- constructor(_googleMap, _ngZone) {
1519
- this._googleMap = _googleMap;
1520
- this._ngZone = _ngZone;
1521
- this._eventManager = new MapEventManager(this._ngZone);
1522
- /**
1523
- * See
1524
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.animation_changed
1525
- */
1526
- this.animationChanged = this._eventManager.getLazyEmitter('animation_changed');
1527
- /**
1528
- * See
1529
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.click
1530
- */
1531
- this.mapClick = this._eventManager.getLazyEmitter('click');
1532
- /**
1533
- * See
1534
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.clickable_changed
1535
- */
1536
- this.clickableChanged = this._eventManager.getLazyEmitter('clickable_changed');
1537
- /**
1538
- * See
1539
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.cursor_changed
1540
- */
1541
- this.cursorChanged = this._eventManager.getLazyEmitter('cursor_changed');
1542
- /**
1543
- * See
1544
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.dblclick
1545
- */
1546
- this.mapDblclick = this._eventManager.getLazyEmitter('dblclick');
1547
- /**
1548
- * See
1549
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.drag
1550
- */
1551
- this.mapDrag = this._eventManager.getLazyEmitter('drag');
1552
- /**
1553
- * See
1554
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.dragend
1555
- */
1556
- this.mapDragend = this._eventManager.getLazyEmitter('dragend');
1557
- /**
1558
- * See
1559
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.draggable_changed
1560
- */
1561
- this.draggableChanged = this._eventManager.getLazyEmitter('draggable_changed');
1562
- /**
1563
- * See
1564
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.dragstart
1565
- */
1566
- this.mapDragstart = this._eventManager.getLazyEmitter('dragstart');
1567
- /**
1568
- * See
1569
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.flat_changed
1570
- */
1571
- this.flatChanged = this._eventManager.getLazyEmitter('flat_changed');
1572
- /**
1573
- * See
1574
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.icon_changed
1575
- */
1576
- this.iconChanged = this._eventManager.getLazyEmitter('icon_changed');
1577
- /**
1578
- * See
1579
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.mousedown
1580
- */
1581
- this.mapMousedown = this._eventManager.getLazyEmitter('mousedown');
1582
- /**
1583
- * See
1584
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.mouseout
1585
- */
1586
- this.mapMouseout = this._eventManager.getLazyEmitter('mouseout');
1587
- /**
1588
- * See
1589
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.mouseover
1590
- */
1591
- this.mapMouseover = this._eventManager.getLazyEmitter('mouseover');
1592
- /**
1593
- * See
1594
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.mouseup
1595
- */
1596
- this.mapMouseup = this._eventManager.getLazyEmitter('mouseup');
1597
- /**
1598
- * See
1599
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.position_changed
1600
- */
1601
- this.positionChanged = this._eventManager.getLazyEmitter('position_changed');
1602
- /**
1603
- * See
1604
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.rightclick
1605
- */
1606
- this.mapRightclick = this._eventManager.getLazyEmitter('rightclick');
1607
- /**
1608
- * See
1609
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.shape_changed
1610
- */
1611
- this.shapeChanged = this._eventManager.getLazyEmitter('shape_changed');
1612
- /**
1613
- * See
1614
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.title_changed
1615
- */
1616
- this.titleChanged = this._eventManager.getLazyEmitter('title_changed');
1617
- /**
1618
- * See
1619
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.visible_changed
1620
- */
1621
- this.visibleChanged = this._eventManager.getLazyEmitter('visible_changed');
1622
- /**
1623
- * See
1624
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.zindex_changed
1625
- */
1626
- this.zindexChanged = this._eventManager.getLazyEmitter('zindex_changed');
1627
- }
1628
- ngOnInit() {
1629
- if (this._googleMap._isBrowser) {
1630
- // Create the object outside the zone so its events don't trigger change detection.
1631
- // We'll bring it back in inside the `MapEventManager` only for the events that the
1632
- // user has subscribed to.
1633
- this._ngZone.runOutsideAngular(() => {
1634
- this.marker = new google.maps.Marker(this._combineOptions());
1635
- });
1636
- this._assertInitialized();
1637
- this.marker.setMap(this._googleMap.googleMap);
1638
- this._eventManager.setTarget(this.marker);
1639
- }
1640
- }
1641
- ngOnChanges(changes) {
1642
- const { marker, _title, _position, _label, _clickable, _icon, _visible } = this;
1643
- if (marker) {
1644
- if (changes['options']) {
1645
- marker.setOptions(this._combineOptions());
1646
- }
1647
- if (changes['title'] && _title !== undefined) {
1648
- marker.setTitle(_title);
1649
- }
1650
- if (changes['position'] && _position) {
1651
- marker.setPosition(_position);
1652
- }
1653
- if (changes['label'] && _label !== undefined) {
1654
- marker.setLabel(_label);
1655
- }
1656
- if (changes['clickable'] && _clickable !== undefined) {
1657
- marker.setClickable(_clickable);
1658
- }
1659
- if (changes['icon'] && _icon) {
1660
- marker.setIcon(_icon);
1661
- }
1662
- if (changes['visible'] && _visible !== undefined) {
1663
- marker.setVisible(_visible);
1664
- }
1665
- }
1666
- }
1667
- ngOnDestroy() {
1668
- this._eventManager.destroy();
1669
- if (this.marker) {
1670
- this.marker.setMap(null);
1671
- }
1672
- }
1673
- /**
1674
- * See
1675
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.getAnimation
1676
- */
1677
- getAnimation() {
1678
- this._assertInitialized();
1679
- return this.marker.getAnimation() || null;
1680
- }
1681
- /**
1682
- * See
1683
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.getClickable
1684
- */
1685
- getClickable() {
1686
- this._assertInitialized();
1687
- return this.marker.getClickable();
1688
- }
1689
- /**
1690
- * See
1691
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.getCursor
1692
- */
1693
- getCursor() {
1694
- this._assertInitialized();
1695
- return this.marker.getCursor() || null;
1696
- }
1697
- /**
1698
- * See
1699
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.getDraggable
1700
- */
1701
- getDraggable() {
1702
- this._assertInitialized();
1703
- return !!this.marker.getDraggable();
1704
- }
1705
- /**
1706
- * See
1707
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.getIcon
1708
- */
1709
- getIcon() {
1710
- this._assertInitialized();
1711
- return this.marker.getIcon() || null;
1712
- }
1713
- /**
1714
- * See
1715
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.getLabel
1716
- */
1717
- getLabel() {
1718
- this._assertInitialized();
1719
- return this.marker.getLabel() || null;
1720
- }
1721
- /**
1722
- * See
1723
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.getOpacity
1724
- */
1725
- getOpacity() {
1726
- this._assertInitialized();
1727
- return this.marker.getOpacity() || null;
1728
- }
1729
- /**
1730
- * See
1731
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.getPosition
1732
- */
1733
- getPosition() {
1734
- this._assertInitialized();
1735
- return this.marker.getPosition() || null;
1736
- }
1737
- /**
1738
- * See
1739
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.getShape
1740
- */
1741
- getShape() {
1742
- this._assertInitialized();
1743
- return this.marker.getShape() || null;
1744
- }
1745
- /**
1746
- * See
1747
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.getTitle
1748
- */
1749
- getTitle() {
1750
- this._assertInitialized();
1751
- return this.marker.getTitle() || null;
1752
- }
1753
- /**
1754
- * See
1755
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.getVisible
1756
- */
1757
- getVisible() {
1758
- this._assertInitialized();
1759
- return this.marker.getVisible();
1760
- }
1761
- /**
1762
- * See
1763
- * developers.google.com/maps/documentation/javascript/reference/marker#Marker.getZIndex
1764
- */
1765
- getZIndex() {
1766
- this._assertInitialized();
1767
- return this.marker.getZIndex() || null;
1768
- }
1769
- /** Gets the anchor point that can be used to attach other Google Maps objects. */
1770
- getAnchor() {
1771
- this._assertInitialized();
1772
- return this.marker;
1773
- }
1774
- /** Creates a combined options object using the passed-in options and the individual inputs. */
1775
- _combineOptions() {
1776
- var _a, _b;
1777
- const options = this._options || DEFAULT_MARKER_OPTIONS;
1778
- return Object.assign(Object.assign({}, options), { title: this._title || options.title, position: this._position || options.position, label: this._label || options.label, clickable: (_a = this._clickable) !== null && _a !== void 0 ? _a : options.clickable, map: this._googleMap.googleMap, icon: this._icon || options.icon, visible: (_b = this._visible) !== null && _b !== void 0 ? _b : options.visible });
1779
- }
1780
- _assertInitialized() {
1781
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
1782
- if (!this._googleMap.googleMap) {
1783
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
1784
- 'Please wait for the API to load before trying to interact with it.');
1785
- }
1786
- if (!this.marker) {
1787
- throw Error('Cannot interact with a Google Map Marker before it has been ' +
1788
- 'initialized. Please wait for the Marker to load before trying to interact with it.');
1789
- }
1790
- }
1791
- }
1792
- }
1793
- MapMarker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapMarker, deps: [{ token: GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
1794
- MapMarker.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapMarker, selector: "map-marker", inputs: { title: "title", position: "position", label: "label", clickable: "clickable", options: "options", icon: "icon", visible: "visible" }, outputs: { animationChanged: "animationChanged", mapClick: "mapClick", clickableChanged: "clickableChanged", cursorChanged: "cursorChanged", mapDblclick: "mapDblclick", mapDrag: "mapDrag", mapDragend: "mapDragend", draggableChanged: "draggableChanged", mapDragstart: "mapDragstart", flatChanged: "flatChanged", iconChanged: "iconChanged", mapMousedown: "mapMousedown", mapMouseout: "mapMouseout", mapMouseover: "mapMouseover", mapMouseup: "mapMouseup", positionChanged: "positionChanged", mapRightclick: "mapRightclick", shapeChanged: "shapeChanged", titleChanged: "titleChanged", visibleChanged: "visibleChanged", zindexChanged: "zindexChanged" }, exportAs: ["mapMarker"], usesOnChanges: true, ngImport: i0 });
1795
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapMarker, decorators: [{
1796
- type: Directive,
1797
- args: [{
1798
- selector: 'map-marker',
1799
- exportAs: 'mapMarker',
1800
- }]
1801
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.NgZone }]; }, propDecorators: { title: [{
1802
- type: Input
1803
- }], position: [{
1804
- type: Input
1805
- }], label: [{
1806
- type: Input
1807
- }], clickable: [{
1808
- type: Input
1809
- }], options: [{
1810
- type: Input
1811
- }], icon: [{
1812
- type: Input
1813
- }], visible: [{
1814
- type: Input
1815
- }], animationChanged: [{
1816
- type: Output
1817
- }], mapClick: [{
1818
- type: Output
1819
- }], clickableChanged: [{
1820
- type: Output
1821
- }], cursorChanged: [{
1822
- type: Output
1823
- }], mapDblclick: [{
1824
- type: Output
1825
- }], mapDrag: [{
1826
- type: Output
1827
- }], mapDragend: [{
1828
- type: Output
1829
- }], draggableChanged: [{
1830
- type: Output
1831
- }], mapDragstart: [{
1832
- type: Output
1833
- }], flatChanged: [{
1834
- type: Output
1835
- }], iconChanged: [{
1836
- type: Output
1837
- }], mapMousedown: [{
1838
- type: Output
1839
- }], mapMouseout: [{
1840
- type: Output
1841
- }], mapMouseover: [{
1842
- type: Output
1843
- }], mapMouseup: [{
1844
- type: Output
1845
- }], positionChanged: [{
1846
- type: Output
1847
- }], mapRightclick: [{
1848
- type: Output
1849
- }], shapeChanged: [{
1850
- type: Output
1851
- }], titleChanged: [{
1852
- type: Output
1853
- }], visibleChanged: [{
1854
- type: Output
1855
- }], zindexChanged: [{
1856
- type: Output
1857
- }] } });
1858
-
1859
- /// <reference types="google.maps" />
1860
- /** Default options for a clusterer. */
1861
- const DEFAULT_CLUSTERER_OPTIONS = {};
1862
- /**
1863
- * Angular component for implementing a Google Maps Marker Clusterer.
1864
- *
1865
- * See https://developers.google.com/maps/documentation/javascript/marker-clustering
1866
- */
1867
- class MapMarkerClusterer {
1868
- set averageCenter(averageCenter) {
1869
- this._averageCenter = averageCenter;
1870
- }
1871
- set batchSizeIE(batchSizeIE) {
1872
- this._batchSizeIE = batchSizeIE;
1873
- }
1874
- set calculator(calculator) {
1875
- this._calculator = calculator;
1876
- }
1877
- set clusterClass(clusterClass) {
1878
- this._clusterClass = clusterClass;
1879
- }
1880
- set enableRetinaIcons(enableRetinaIcons) {
1881
- this._enableRetinaIcons = enableRetinaIcons;
1882
- }
1883
- set gridSize(gridSize) {
1884
- this._gridSize = gridSize;
1885
- }
1886
- set ignoreHidden(ignoreHidden) {
1887
- this._ignoreHidden = ignoreHidden;
1888
- }
1889
- set imageExtension(imageExtension) {
1890
- this._imageExtension = imageExtension;
1891
- }
1892
- set imagePath(imagePath) {
1893
- this._imagePath = imagePath;
1894
- }
1895
- set imageSizes(imageSizes) {
1896
- this._imageSizes = imageSizes;
1897
- }
1898
- set maxZoom(maxZoom) {
1899
- this._maxZoom = maxZoom;
1900
- }
1901
- set minimumClusterSize(minimumClusterSize) {
1902
- this._minimumClusterSize = minimumClusterSize;
1903
- }
1904
- set styles(styles) {
1905
- this._styles = styles;
1906
- }
1907
- set title(title) {
1908
- this._title = title;
1909
- }
1910
- set zIndex(zIndex) {
1911
- this._zIndex = zIndex;
1912
- }
1913
- set zoomOnClick(zoomOnClick) {
1914
- this._zoomOnClick = zoomOnClick;
1915
- }
1916
- set options(options) {
1917
- this._options = options;
1918
- }
1919
- constructor(_googleMap, _ngZone) {
1920
- this._googleMap = _googleMap;
1921
- this._ngZone = _ngZone;
1922
- this._currentMarkers = new Set();
1923
- this._eventManager = new MapEventManager(this._ngZone);
1924
- this._destroy = new Subject();
1925
- this.ariaLabelFn = () => '';
1926
- /**
1927
- * See
1928
- * googlemaps.github.io/v3-utility-library/modules/
1929
- * _google_markerclustererplus.html#clusteringbegin
1930
- */
1931
- this.clusteringbegin = this._eventManager.getLazyEmitter('clusteringbegin');
1932
- /**
1933
- * See
1934
- * googlemaps.github.io/v3-utility-library/modules/_google_markerclustererplus.html#clusteringend
1935
- */
1936
- this.clusteringend = this._eventManager.getLazyEmitter('clusteringend');
1937
- /** Emits when a cluster has been clicked. */
1938
- this.clusterClick = this._eventManager.getLazyEmitter('click');
1939
- this._canInitialize = this._googleMap._isBrowser;
1940
- }
1941
- ngOnInit() {
1942
- if (this._canInitialize) {
1943
- if (typeof MarkerClusterer !== 'function' &&
1944
- (typeof ngDevMode === 'undefined' || ngDevMode)) {
1945
- throw Error('MarkerClusterer class not found, cannot construct a marker cluster. ' +
1946
- 'Please install the MarkerClustererPlus library: ' +
1947
- 'https://github.com/googlemaps/js-markerclustererplus');
1948
- }
1949
- // Create the object outside the zone so its events don't trigger change detection.
1950
- // We'll bring it back in inside the `MapEventManager` only for the events that the
1951
- // user has subscribed to.
1952
- this._ngZone.runOutsideAngular(() => {
1953
- this.markerClusterer = new MarkerClusterer(this._googleMap.googleMap, [], this._combineOptions());
1954
- });
1955
- this._assertInitialized();
1956
- this._eventManager.setTarget(this.markerClusterer);
1957
- }
1958
- }
1959
- ngAfterContentInit() {
1960
- if (this._canInitialize) {
1961
- this._watchForMarkerChanges();
1962
- }
1963
- }
1964
- ngOnChanges(changes) {
1965
- const { markerClusterer: clusterer, ariaLabelFn, _averageCenter, _batchSizeIE, _calculator, _styles, _clusterClass, _enableRetinaIcons, _gridSize, _ignoreHidden, _imageExtension, _imagePath, _imageSizes, _maxZoom, _minimumClusterSize, _title, _zIndex, _zoomOnClick, } = this;
1966
- if (clusterer) {
1967
- if (changes['options']) {
1968
- clusterer.setOptions(this._combineOptions());
1969
- }
1970
- if (changes['ariaLabelFn']) {
1971
- clusterer.ariaLabelFn = ariaLabelFn;
1972
- }
1973
- if (changes['averageCenter'] && _averageCenter !== undefined) {
1974
- clusterer.setAverageCenter(_averageCenter);
1975
- }
1976
- if (changes['batchSizeIE'] && _batchSizeIE !== undefined) {
1977
- clusterer.setBatchSizeIE(_batchSizeIE);
1978
- }
1979
- if (changes['calculator'] && !!_calculator) {
1980
- clusterer.setCalculator(_calculator);
1981
- }
1982
- if (changes['clusterClass'] && _clusterClass !== undefined) {
1983
- clusterer.setClusterClass(_clusterClass);
1984
- }
1985
- if (changes['enableRetinaIcons'] && _enableRetinaIcons !== undefined) {
1986
- clusterer.setEnableRetinaIcons(_enableRetinaIcons);
1987
- }
1988
- if (changes['gridSize'] && _gridSize !== undefined) {
1989
- clusterer.setGridSize(_gridSize);
1990
- }
1991
- if (changes['ignoreHidden'] && _ignoreHidden !== undefined) {
1992
- clusterer.setIgnoreHidden(_ignoreHidden);
1993
- }
1994
- if (changes['imageExtension'] && _imageExtension !== undefined) {
1995
- clusterer.setImageExtension(_imageExtension);
1996
- }
1997
- if (changes['imagePath'] && _imagePath !== undefined) {
1998
- clusterer.setImagePath(_imagePath);
1999
- }
2000
- if (changes['imageSizes'] && _imageSizes) {
2001
- clusterer.setImageSizes(_imageSizes);
2002
- }
2003
- if (changes['maxZoom'] && _maxZoom !== undefined) {
2004
- clusterer.setMaxZoom(_maxZoom);
2005
- }
2006
- if (changes['minimumClusterSize'] && _minimumClusterSize !== undefined) {
2007
- clusterer.setMinimumClusterSize(_minimumClusterSize);
2008
- }
2009
- if (changes['styles'] && _styles) {
2010
- clusterer.setStyles(_styles);
2011
- }
2012
- if (changes['title'] && _title !== undefined) {
2013
- clusterer.setTitle(_title);
2014
- }
2015
- if (changes['zIndex'] && _zIndex !== undefined) {
2016
- clusterer.setZIndex(_zIndex);
2017
- }
2018
- if (changes['zoomOnClick'] && _zoomOnClick !== undefined) {
2019
- clusterer.setZoomOnClick(_zoomOnClick);
2020
- }
2021
- }
2022
- }
2023
- ngOnDestroy() {
2024
- this._destroy.next();
2025
- this._destroy.complete();
2026
- this._eventManager.destroy();
2027
- if (this.markerClusterer) {
2028
- this.markerClusterer.setMap(null);
2029
- }
2030
- }
2031
- fitMapToMarkers(padding) {
2032
- this._assertInitialized();
2033
- this.markerClusterer.fitMapToMarkers(padding);
2034
- }
2035
- getAverageCenter() {
2036
- this._assertInitialized();
2037
- return this.markerClusterer.getAverageCenter();
2038
- }
2039
- getBatchSizeIE() {
2040
- this._assertInitialized();
2041
- return this.markerClusterer.getBatchSizeIE();
2042
- }
2043
- getCalculator() {
2044
- this._assertInitialized();
2045
- return this.markerClusterer.getCalculator();
2046
- }
2047
- getClusterClass() {
2048
- this._assertInitialized();
2049
- return this.markerClusterer.getClusterClass();
2050
- }
2051
- getClusters() {
2052
- this._assertInitialized();
2053
- return this.markerClusterer.getClusters();
2054
- }
2055
- getEnableRetinaIcons() {
2056
- this._assertInitialized();
2057
- return this.markerClusterer.getEnableRetinaIcons();
2058
- }
2059
- getGridSize() {
2060
- this._assertInitialized();
2061
- return this.markerClusterer.getGridSize();
2062
- }
2063
- getIgnoreHidden() {
2064
- this._assertInitialized();
2065
- return this.markerClusterer.getIgnoreHidden();
2066
- }
2067
- getImageExtension() {
2068
- this._assertInitialized();
2069
- return this.markerClusterer.getImageExtension();
2070
- }
2071
- getImagePath() {
2072
- this._assertInitialized();
2073
- return this.markerClusterer.getImagePath();
2074
- }
2075
- getImageSizes() {
2076
- this._assertInitialized();
2077
- return this.markerClusterer.getImageSizes();
2078
- }
2079
- getMaxZoom() {
2080
- this._assertInitialized();
2081
- return this.markerClusterer.getMaxZoom();
2082
- }
2083
- getMinimumClusterSize() {
2084
- this._assertInitialized();
2085
- return this.markerClusterer.getMinimumClusterSize();
2086
- }
2087
- getStyles() {
2088
- this._assertInitialized();
2089
- return this.markerClusterer.getStyles();
2090
- }
2091
- getTitle() {
2092
- this._assertInitialized();
2093
- return this.markerClusterer.getTitle();
2094
- }
2095
- getTotalClusters() {
2096
- this._assertInitialized();
2097
- return this.markerClusterer.getTotalClusters();
2098
- }
2099
- getTotalMarkers() {
2100
- this._assertInitialized();
2101
- return this.markerClusterer.getTotalMarkers();
2102
- }
2103
- getZIndex() {
2104
- this._assertInitialized();
2105
- return this.markerClusterer.getZIndex();
2106
- }
2107
- getZoomOnClick() {
2108
- this._assertInitialized();
2109
- return this.markerClusterer.getZoomOnClick();
2110
- }
2111
- _combineOptions() {
2112
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
2113
- const options = this._options || DEFAULT_CLUSTERER_OPTIONS;
2114
- return Object.assign(Object.assign({}, options), { ariaLabelFn: (_a = this.ariaLabelFn) !== null && _a !== void 0 ? _a : options.ariaLabelFn, averageCenter: (_b = this._averageCenter) !== null && _b !== void 0 ? _b : options.averageCenter, batchSize: (_c = this.batchSize) !== null && _c !== void 0 ? _c : options.batchSize, batchSizeIE: (_d = this._batchSizeIE) !== null && _d !== void 0 ? _d : options.batchSizeIE, calculator: (_e = this._calculator) !== null && _e !== void 0 ? _e : options.calculator, clusterClass: (_f = this._clusterClass) !== null && _f !== void 0 ? _f : options.clusterClass, enableRetinaIcons: (_g = this._enableRetinaIcons) !== null && _g !== void 0 ? _g : options.enableRetinaIcons, gridSize: (_h = this._gridSize) !== null && _h !== void 0 ? _h : options.gridSize, ignoreHidden: (_j = this._ignoreHidden) !== null && _j !== void 0 ? _j : options.ignoreHidden, imageExtension: (_k = this._imageExtension) !== null && _k !== void 0 ? _k : options.imageExtension, imagePath: (_l = this._imagePath) !== null && _l !== void 0 ? _l : options.imagePath, imageSizes: (_m = this._imageSizes) !== null && _m !== void 0 ? _m : options.imageSizes, maxZoom: (_o = this._maxZoom) !== null && _o !== void 0 ? _o : options.maxZoom, minimumClusterSize: (_p = this._minimumClusterSize) !== null && _p !== void 0 ? _p : options.minimumClusterSize, styles: (_q = this._styles) !== null && _q !== void 0 ? _q : options.styles, title: (_r = this._title) !== null && _r !== void 0 ? _r : options.title, zIndex: (_s = this._zIndex) !== null && _s !== void 0 ? _s : options.zIndex, zoomOnClick: (_t = this._zoomOnClick) !== null && _t !== void 0 ? _t : options.zoomOnClick });
2115
- }
2116
- _watchForMarkerChanges() {
2117
- this._assertInitialized();
2118
- const initialMarkers = [];
2119
- for (const marker of this._getInternalMarkers(this._markers.toArray())) {
2120
- this._currentMarkers.add(marker);
2121
- initialMarkers.push(marker);
2122
- }
2123
- this.markerClusterer.addMarkers(initialMarkers);
2124
- this._markers.changes
2125
- .pipe(takeUntil(this._destroy))
2126
- .subscribe((markerComponents) => {
2127
- this._assertInitialized();
2128
- const newMarkers = new Set(this._getInternalMarkers(markerComponents));
2129
- const markersToAdd = [];
2130
- const markersToRemove = [];
2131
- for (const marker of Array.from(newMarkers)) {
2132
- if (!this._currentMarkers.has(marker)) {
2133
- this._currentMarkers.add(marker);
2134
- markersToAdd.push(marker);
2135
- }
2136
- }
2137
- for (const marker of Array.from(this._currentMarkers)) {
2138
- if (!newMarkers.has(marker)) {
2139
- markersToRemove.push(marker);
2140
- }
2141
- }
2142
- this.markerClusterer.addMarkers(markersToAdd, true);
2143
- this.markerClusterer.removeMarkers(markersToRemove, true);
2144
- this.markerClusterer.repaint();
2145
- for (const marker of markersToRemove) {
2146
- this._currentMarkers.delete(marker);
2147
- }
2148
- });
2149
- }
2150
- _getInternalMarkers(markers) {
2151
- return markers
2152
- .filter(markerComponent => !!markerComponent.marker)
2153
- .map(markerComponent => markerComponent.marker);
2154
- }
2155
- _assertInitialized() {
2156
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
2157
- if (!this._googleMap.googleMap) {
2158
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
2159
- 'Please wait for the API to load before trying to interact with it.');
2160
- }
2161
- if (!this.markerClusterer) {
2162
- throw Error('Cannot interact with a MarkerClusterer before it has been initialized. ' +
2163
- 'Please wait for the MarkerClusterer to load before trying to interact with it.');
2164
- }
2165
- }
2166
- }
2167
- }
2168
- MapMarkerClusterer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapMarkerClusterer, deps: [{ token: GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
2169
- MapMarkerClusterer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapMarkerClusterer, selector: "map-marker-clusterer", inputs: { ariaLabelFn: "ariaLabelFn", averageCenter: "averageCenter", batchSize: "batchSize", batchSizeIE: "batchSizeIE", calculator: "calculator", clusterClass: "clusterClass", enableRetinaIcons: "enableRetinaIcons", gridSize: "gridSize", ignoreHidden: "ignoreHidden", imageExtension: "imageExtension", imagePath: "imagePath", imageSizes: "imageSizes", maxZoom: "maxZoom", minimumClusterSize: "minimumClusterSize", styles: "styles", title: "title", zIndex: "zIndex", zoomOnClick: "zoomOnClick", options: "options" }, outputs: { clusteringbegin: "clusteringbegin", clusteringend: "clusteringend", clusterClick: "clusterClick" }, queries: [{ propertyName: "_markers", predicate: MapMarker, descendants: true }], exportAs: ["mapMarkerClusterer"], usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2170
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapMarkerClusterer, decorators: [{
2171
- type: Component,
2172
- args: [{
2173
- selector: 'map-marker-clusterer',
2174
- exportAs: 'mapMarkerClusterer',
2175
- changeDetection: ChangeDetectionStrategy.OnPush,
2176
- template: '<ng-content></ng-content>',
2177
- encapsulation: ViewEncapsulation.None,
2178
- }]
2179
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.NgZone }]; }, propDecorators: { ariaLabelFn: [{
2180
- type: Input
2181
- }], averageCenter: [{
2182
- type: Input
2183
- }], batchSize: [{
2184
- type: Input
2185
- }], batchSizeIE: [{
2186
- type: Input
2187
- }], calculator: [{
2188
- type: Input
2189
- }], clusterClass: [{
2190
- type: Input
2191
- }], enableRetinaIcons: [{
2192
- type: Input
2193
- }], gridSize: [{
2194
- type: Input
2195
- }], ignoreHidden: [{
2196
- type: Input
2197
- }], imageExtension: [{
2198
- type: Input
2199
- }], imagePath: [{
2200
- type: Input
2201
- }], imageSizes: [{
2202
- type: Input
2203
- }], maxZoom: [{
2204
- type: Input
2205
- }], minimumClusterSize: [{
2206
- type: Input
2207
- }], styles: [{
2208
- type: Input
2209
- }], title: [{
2210
- type: Input
2211
- }], zIndex: [{
2212
- type: Input
2213
- }], zoomOnClick: [{
2214
- type: Input
2215
- }], options: [{
2216
- type: Input
2217
- }], clusteringbegin: [{
2218
- type: Output
2219
- }], clusteringend: [{
2220
- type: Output
2221
- }], clusterClick: [{
2222
- type: Output
2223
- }], _markers: [{
2224
- type: ContentChildren,
2225
- args: [MapMarker, { descendants: true }]
2226
- }] } });
2227
-
2228
- /// <reference types="google.maps" />
2229
- /**
2230
- * Angular component that renders a Google Maps Polygon via the Google Maps JavaScript API.
2231
- *
2232
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon
2233
- */
2234
- class MapPolygon {
2235
- set options(options) {
2236
- this._options.next(options || {});
2237
- }
2238
- set paths(paths) {
2239
- this._paths.next(paths);
2240
- }
2241
- constructor(_map, _ngZone) {
2242
- this._map = _map;
2243
- this._ngZone = _ngZone;
2244
- this._eventManager = new MapEventManager(this._ngZone);
2245
- this._options = new BehaviorSubject({});
2246
- this._paths = new BehaviorSubject(undefined);
2247
- this._destroyed = new Subject();
2248
- /**
2249
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.click
2250
- */
2251
- this.polygonClick = this._eventManager.getLazyEmitter('click');
2252
- /**
2253
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.dblclick
2254
- */
2255
- this.polygonDblclick = this._eventManager.getLazyEmitter('dblclick');
2256
- /**
2257
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.drag
2258
- */
2259
- this.polygonDrag = this._eventManager.getLazyEmitter('drag');
2260
- /**
2261
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.dragend
2262
- */
2263
- this.polygonDragend = this._eventManager.getLazyEmitter('dragend');
2264
- /**
2265
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.dragstart
2266
- */
2267
- this.polygonDragstart = this._eventManager.getLazyEmitter('dragstart');
2268
- /**
2269
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.mousedown
2270
- */
2271
- this.polygonMousedown = this._eventManager.getLazyEmitter('mousedown');
2272
- /**
2273
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.mousemove
2274
- */
2275
- this.polygonMousemove = this._eventManager.getLazyEmitter('mousemove');
2276
- /**
2277
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.mouseout
2278
- */
2279
- this.polygonMouseout = this._eventManager.getLazyEmitter('mouseout');
2280
- /**
2281
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.mouseover
2282
- */
2283
- this.polygonMouseover = this._eventManager.getLazyEmitter('mouseover');
2284
- /**
2285
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.mouseup
2286
- */
2287
- this.polygonMouseup = this._eventManager.getLazyEmitter('mouseup');
2288
- /**
2289
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.rightclick
2290
- */
2291
- this.polygonRightclick = this._eventManager.getLazyEmitter('rightclick');
2292
- }
2293
- ngOnInit() {
2294
- if (this._map._isBrowser) {
2295
- this._combineOptions()
2296
- .pipe(take(1))
2297
- .subscribe(options => {
2298
- // Create the object outside the zone so its events don't trigger change detection.
2299
- // We'll bring it back in inside the `MapEventManager` only for the events that the
2300
- // user has subscribed to.
2301
- this._ngZone.runOutsideAngular(() => {
2302
- this.polygon = new google.maps.Polygon(options);
2303
- });
2304
- this._assertInitialized();
2305
- this.polygon.setMap(this._map.googleMap);
2306
- this._eventManager.setTarget(this.polygon);
2307
- });
2308
- this._watchForOptionsChanges();
2309
- this._watchForPathChanges();
2310
- }
2311
- }
2312
- ngOnDestroy() {
2313
- this._eventManager.destroy();
2314
- this._destroyed.next();
2315
- this._destroyed.complete();
2316
- if (this.polygon) {
2317
- this.polygon.setMap(null);
2318
- }
2319
- }
2320
- /**
2321
- * See
2322
- * developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.getDraggable
2323
- */
2324
- getDraggable() {
2325
- this._assertInitialized();
2326
- return this.polygon.getDraggable();
2327
- }
2328
- /**
2329
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.getEditable
2330
- */
2331
- getEditable() {
2332
- this._assertInitialized();
2333
- return this.polygon.getEditable();
2334
- }
2335
- /**
2336
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.getPath
2337
- */
2338
- getPath() {
2339
- this._assertInitialized();
2340
- return this.polygon.getPath();
2341
- }
2342
- /**
2343
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.getPaths
2344
- */
2345
- getPaths() {
2346
- this._assertInitialized();
2347
- return this.polygon.getPaths();
2348
- }
2349
- /**
2350
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polygon.getVisible
2351
- */
2352
- getVisible() {
2353
- this._assertInitialized();
2354
- return this.polygon.getVisible();
2355
- }
2356
- _combineOptions() {
2357
- return combineLatest([this._options, this._paths]).pipe(map(([options, paths]) => {
2358
- const combinedOptions = Object.assign(Object.assign({}, options), { paths: paths || options.paths });
2359
- return combinedOptions;
2360
- }));
2361
- }
2362
- _watchForOptionsChanges() {
2363
- this._options.pipe(takeUntil(this._destroyed)).subscribe(options => {
2364
- this._assertInitialized();
2365
- this.polygon.setOptions(options);
2366
- });
2367
- }
2368
- _watchForPathChanges() {
2369
- this._paths.pipe(takeUntil(this._destroyed)).subscribe(paths => {
2370
- if (paths) {
2371
- this._assertInitialized();
2372
- this.polygon.setPaths(paths);
2373
- }
2374
- });
2375
- }
2376
- _assertInitialized() {
2377
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
2378
- if (!this._map.googleMap) {
2379
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
2380
- 'Please wait for the API to load before trying to interact with it.');
2381
- }
2382
- if (!this.polygon) {
2383
- throw Error('Cannot interact with a Google Map Polygon before it has been ' +
2384
- 'initialized. Please wait for the Polygon to load before trying to interact with it.');
2385
- }
2386
- }
2387
- }
2388
- }
2389
- MapPolygon.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapPolygon, deps: [{ token: GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
2390
- MapPolygon.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapPolygon, selector: "map-polygon", inputs: { options: "options", paths: "paths" }, outputs: { polygonClick: "polygonClick", polygonDblclick: "polygonDblclick", polygonDrag: "polygonDrag", polygonDragend: "polygonDragend", polygonDragstart: "polygonDragstart", polygonMousedown: "polygonMousedown", polygonMousemove: "polygonMousemove", polygonMouseout: "polygonMouseout", polygonMouseover: "polygonMouseover", polygonMouseup: "polygonMouseup", polygonRightclick: "polygonRightclick" }, exportAs: ["mapPolygon"], ngImport: i0 });
2391
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapPolygon, decorators: [{
2392
- type: Directive,
2393
- args: [{
2394
- selector: 'map-polygon',
2395
- exportAs: 'mapPolygon',
2396
- }]
2397
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.NgZone }]; }, propDecorators: { options: [{
2398
- type: Input
2399
- }], paths: [{
2400
- type: Input
2401
- }], polygonClick: [{
2402
- type: Output
2403
- }], polygonDblclick: [{
2404
- type: Output
2405
- }], polygonDrag: [{
2406
- type: Output
2407
- }], polygonDragend: [{
2408
- type: Output
2409
- }], polygonDragstart: [{
2410
- type: Output
2411
- }], polygonMousedown: [{
2412
- type: Output
2413
- }], polygonMousemove: [{
2414
- type: Output
2415
- }], polygonMouseout: [{
2416
- type: Output
2417
- }], polygonMouseover: [{
2418
- type: Output
2419
- }], polygonMouseup: [{
2420
- type: Output
2421
- }], polygonRightclick: [{
2422
- type: Output
2423
- }] } });
2424
-
2425
- /// <reference types="google.maps" />
2426
- /**
2427
- * Angular component that renders a Google Maps Polyline via the Google Maps JavaScript API.
2428
- *
2429
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline
2430
- */
2431
- class MapPolyline {
2432
- set options(options) {
2433
- this._options.next(options || {});
2434
- }
2435
- set path(path) {
2436
- this._path.next(path);
2437
- }
2438
- constructor(_map, _ngZone) {
2439
- this._map = _map;
2440
- this._ngZone = _ngZone;
2441
- this._eventManager = new MapEventManager(this._ngZone);
2442
- this._options = new BehaviorSubject({});
2443
- this._path = new BehaviorSubject(undefined);
2444
- this._destroyed = new Subject();
2445
- /**
2446
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.click
2447
- */
2448
- this.polylineClick = this._eventManager.getLazyEmitter('click');
2449
- /**
2450
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.dblclick
2451
- */
2452
- this.polylineDblclick = this._eventManager.getLazyEmitter('dblclick');
2453
- /**
2454
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.drag
2455
- */
2456
- this.polylineDrag = this._eventManager.getLazyEmitter('drag');
2457
- /**
2458
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.dragend
2459
- */
2460
- this.polylineDragend = this._eventManager.getLazyEmitter('dragend');
2461
- /**
2462
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.dragstart
2463
- */
2464
- this.polylineDragstart = this._eventManager.getLazyEmitter('dragstart');
2465
- /**
2466
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.mousedown
2467
- */
2468
- this.polylineMousedown = this._eventManager.getLazyEmitter('mousedown');
2469
- /**
2470
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.mousemove
2471
- */
2472
- this.polylineMousemove = this._eventManager.getLazyEmitter('mousemove');
2473
- /**
2474
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.mouseout
2475
- */
2476
- this.polylineMouseout = this._eventManager.getLazyEmitter('mouseout');
2477
- /**
2478
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.mouseover
2479
- */
2480
- this.polylineMouseover = this._eventManager.getLazyEmitter('mouseover');
2481
- /**
2482
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.mouseup
2483
- */
2484
- this.polylineMouseup = this._eventManager.getLazyEmitter('mouseup');
2485
- /**
2486
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.rightclick
2487
- */
2488
- this.polylineRightclick = this._eventManager.getLazyEmitter('rightclick');
2489
- }
2490
- ngOnInit() {
2491
- if (this._map._isBrowser) {
2492
- this._combineOptions()
2493
- .pipe(take(1))
2494
- .subscribe(options => {
2495
- // Create the object outside the zone so its events don't trigger change detection.
2496
- // We'll bring it back in inside the `MapEventManager` only for the events that the
2497
- // user has subscribed to.
2498
- this._ngZone.runOutsideAngular(() => (this.polyline = new google.maps.Polyline(options)));
2499
- this._assertInitialized();
2500
- this.polyline.setMap(this._map.googleMap);
2501
- this._eventManager.setTarget(this.polyline);
2502
- });
2503
- this._watchForOptionsChanges();
2504
- this._watchForPathChanges();
2505
- }
2506
- }
2507
- ngOnDestroy() {
2508
- this._eventManager.destroy();
2509
- this._destroyed.next();
2510
- this._destroyed.complete();
2511
- if (this.polyline) {
2512
- this.polyline.setMap(null);
2513
- }
2514
- }
2515
- /**
2516
- * See
2517
- * developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.getDraggable
2518
- */
2519
- getDraggable() {
2520
- this._assertInitialized();
2521
- return this.polyline.getDraggable();
2522
- }
2523
- /**
2524
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.getEditable
2525
- */
2526
- getEditable() {
2527
- this._assertInitialized();
2528
- return this.polyline.getEditable();
2529
- }
2530
- /**
2531
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.getPath
2532
- */
2533
- getPath() {
2534
- this._assertInitialized();
2535
- return this.polyline.getPath();
2536
- }
2537
- /**
2538
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.getVisible
2539
- */
2540
- getVisible() {
2541
- this._assertInitialized();
2542
- return this.polyline.getVisible();
2543
- }
2544
- _combineOptions() {
2545
- return combineLatest([this._options, this._path]).pipe(map(([options, path]) => {
2546
- const combinedOptions = Object.assign(Object.assign({}, options), { path: path || options.path });
2547
- return combinedOptions;
2548
- }));
2549
- }
2550
- _watchForOptionsChanges() {
2551
- this._options.pipe(takeUntil(this._destroyed)).subscribe(options => {
2552
- this._assertInitialized();
2553
- this.polyline.setOptions(options);
2554
- });
2555
- }
2556
- _watchForPathChanges() {
2557
- this._path.pipe(takeUntil(this._destroyed)).subscribe(path => {
2558
- if (path) {
2559
- this._assertInitialized();
2560
- this.polyline.setPath(path);
2561
- }
2562
- });
2563
- }
2564
- _assertInitialized() {
2565
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
2566
- if (!this._map.googleMap) {
2567
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
2568
- 'Please wait for the API to load before trying to interact with it.');
2569
- }
2570
- if (!this.polyline) {
2571
- throw Error('Cannot interact with a Google Map Polyline before it has been ' +
2572
- 'initialized. Please wait for the Polyline to load before trying to interact with it.');
2573
- }
2574
- }
2575
- }
2576
- }
2577
- MapPolyline.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapPolyline, deps: [{ token: GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
2578
- MapPolyline.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapPolyline, selector: "map-polyline", inputs: { options: "options", path: "path" }, outputs: { polylineClick: "polylineClick", polylineDblclick: "polylineDblclick", polylineDrag: "polylineDrag", polylineDragend: "polylineDragend", polylineDragstart: "polylineDragstart", polylineMousedown: "polylineMousedown", polylineMousemove: "polylineMousemove", polylineMouseout: "polylineMouseout", polylineMouseover: "polylineMouseover", polylineMouseup: "polylineMouseup", polylineRightclick: "polylineRightclick" }, exportAs: ["mapPolyline"], ngImport: i0 });
2579
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapPolyline, decorators: [{
2580
- type: Directive,
2581
- args: [{
2582
- selector: 'map-polyline',
2583
- exportAs: 'mapPolyline',
2584
- }]
2585
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.NgZone }]; }, propDecorators: { options: [{
2586
- type: Input
2587
- }], path: [{
2588
- type: Input
2589
- }], polylineClick: [{
2590
- type: Output
2591
- }], polylineDblclick: [{
2592
- type: Output
2593
- }], polylineDrag: [{
2594
- type: Output
2595
- }], polylineDragend: [{
2596
- type: Output
2597
- }], polylineDragstart: [{
2598
- type: Output
2599
- }], polylineMousedown: [{
2600
- type: Output
2601
- }], polylineMousemove: [{
2602
- type: Output
2603
- }], polylineMouseout: [{
2604
- type: Output
2605
- }], polylineMouseover: [{
2606
- type: Output
2607
- }], polylineMouseup: [{
2608
- type: Output
2609
- }], polylineRightclick: [{
2610
- type: Output
2611
- }] } });
2612
-
2613
- /// <reference types="google.maps" />
2614
- /**
2615
- * Angular component that renders a Google Maps Rectangle via the Google Maps JavaScript API.
2616
- *
2617
- * See developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle
2618
- */
2619
- class MapRectangle {
2620
- set options(options) {
2621
- this._options.next(options || {});
2622
- }
2623
- set bounds(bounds) {
2624
- this._bounds.next(bounds);
2625
- }
2626
- constructor(_map, _ngZone) {
2627
- this._map = _map;
2628
- this._ngZone = _ngZone;
2629
- this._eventManager = new MapEventManager(this._ngZone);
2630
- this._options = new BehaviorSubject({});
2631
- this._bounds = new BehaviorSubject(undefined);
2632
- this._destroyed = new Subject();
2633
- /**
2634
- * See
2635
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.boundsChanged
2636
- */ this.boundsChanged = this._eventManager.getLazyEmitter('bounds_changed');
2637
- /**
2638
- * See
2639
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.click
2640
- */
2641
- this.rectangleClick = this._eventManager.getLazyEmitter('click');
2642
- /**
2643
- * See
2644
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.dblclick
2645
- */
2646
- this.rectangleDblclick = this._eventManager.getLazyEmitter('dblclick');
2647
- /**
2648
- * See
2649
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.drag
2650
- */
2651
- this.rectangleDrag = this._eventManager.getLazyEmitter('drag');
2652
- /**
2653
- * See
2654
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.dragend
2655
- */
2656
- this.rectangleDragend = this._eventManager.getLazyEmitter('dragend');
2657
- /**
2658
- * See
2659
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.dragstart
2660
- */
2661
- this.rectangleDragstart = this._eventManager.getLazyEmitter('dragstart');
2662
- /**
2663
- * See
2664
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.mousedown
2665
- */
2666
- this.rectangleMousedown = this._eventManager.getLazyEmitter('mousedown');
2667
- /**
2668
- * See
2669
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.mousemove
2670
- */
2671
- this.rectangleMousemove = this._eventManager.getLazyEmitter('mousemove');
2672
- /**
2673
- * See
2674
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.mouseout
2675
- */
2676
- this.rectangleMouseout = this._eventManager.getLazyEmitter('mouseout');
2677
- /**
2678
- * See
2679
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.mouseover
2680
- */
2681
- this.rectangleMouseover = this._eventManager.getLazyEmitter('mouseover');
2682
- /**
2683
- * See
2684
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.mouseup
2685
- */
2686
- this.rectangleMouseup = this._eventManager.getLazyEmitter('mouseup');
2687
- /**
2688
- * See
2689
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.rightclick
2690
- */
2691
- this.rectangleRightclick = this._eventManager.getLazyEmitter('rightclick');
2692
- }
2693
- ngOnInit() {
2694
- if (this._map._isBrowser) {
2695
- this._combineOptions()
2696
- .pipe(take(1))
2697
- .subscribe(options => {
2698
- // Create the object outside the zone so its events don't trigger change detection.
2699
- // We'll bring it back in inside the `MapEventManager` only for the events that the
2700
- // user has subscribed to.
2701
- this._ngZone.runOutsideAngular(() => {
2702
- this.rectangle = new google.maps.Rectangle(options);
2703
- });
2704
- this._assertInitialized();
2705
- this.rectangle.setMap(this._map.googleMap);
2706
- this._eventManager.setTarget(this.rectangle);
2707
- });
2708
- this._watchForOptionsChanges();
2709
- this._watchForBoundsChanges();
2710
- }
2711
- }
2712
- ngOnDestroy() {
2713
- this._eventManager.destroy();
2714
- this._destroyed.next();
2715
- this._destroyed.complete();
2716
- if (this.rectangle) {
2717
- this.rectangle.setMap(null);
2718
- }
2719
- }
2720
- /**
2721
- * See
2722
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.getBounds
2723
- */
2724
- getBounds() {
2725
- this._assertInitialized();
2726
- return this.rectangle.getBounds();
2727
- }
2728
- /**
2729
- * See
2730
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.getDraggable
2731
- */
2732
- getDraggable() {
2733
- this._assertInitialized();
2734
- return this.rectangle.getDraggable();
2735
- }
2736
- /**
2737
- * See
2738
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.getEditable
2739
- */
2740
- getEditable() {
2741
- this._assertInitialized();
2742
- return this.rectangle.getEditable();
2743
- }
2744
- /**
2745
- * See
2746
- * developers.google.com/maps/documentation/javascript/reference/polygon#Rectangle.getVisible
2747
- */
2748
- getVisible() {
2749
- this._assertInitialized();
2750
- return this.rectangle.getVisible();
2751
- }
2752
- _combineOptions() {
2753
- return combineLatest([this._options, this._bounds]).pipe(map(([options, bounds]) => {
2754
- const combinedOptions = Object.assign(Object.assign({}, options), { bounds: bounds || options.bounds });
2755
- return combinedOptions;
2756
- }));
2757
- }
2758
- _watchForOptionsChanges() {
2759
- this._options.pipe(takeUntil(this._destroyed)).subscribe(options => {
2760
- this._assertInitialized();
2761
- this.rectangle.setOptions(options);
2762
- });
2763
- }
2764
- _watchForBoundsChanges() {
2765
- this._bounds.pipe(takeUntil(this._destroyed)).subscribe(bounds => {
2766
- if (bounds) {
2767
- this._assertInitialized();
2768
- this.rectangle.setBounds(bounds);
2769
- }
2770
- });
2771
- }
2772
- _assertInitialized() {
2773
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
2774
- if (!this._map.googleMap) {
2775
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
2776
- 'Please wait for the API to load before trying to interact with it.');
2777
- }
2778
- if (!this.rectangle) {
2779
- throw Error('Cannot interact with a Google Map Rectangle before it has been initialized. ' +
2780
- 'Please wait for the Rectangle to load before trying to interact with it.');
2781
- }
2782
- }
2783
- }
2784
- }
2785
- MapRectangle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapRectangle, deps: [{ token: GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
2786
- MapRectangle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapRectangle, selector: "map-rectangle", inputs: { options: "options", bounds: "bounds" }, outputs: { boundsChanged: "boundsChanged", rectangleClick: "rectangleClick", rectangleDblclick: "rectangleDblclick", rectangleDrag: "rectangleDrag", rectangleDragend: "rectangleDragend", rectangleDragstart: "rectangleDragstart", rectangleMousedown: "rectangleMousedown", rectangleMousemove: "rectangleMousemove", rectangleMouseout: "rectangleMouseout", rectangleMouseover: "rectangleMouseover", rectangleMouseup: "rectangleMouseup", rectangleRightclick: "rectangleRightclick" }, exportAs: ["mapRectangle"], ngImport: i0 });
2787
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapRectangle, decorators: [{
2788
- type: Directive,
2789
- args: [{
2790
- selector: 'map-rectangle',
2791
- exportAs: 'mapRectangle',
2792
- }]
2793
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.NgZone }]; }, propDecorators: { options: [{
2794
- type: Input
2795
- }], bounds: [{
2796
- type: Input
2797
- }], boundsChanged: [{
2798
- type: Output
2799
- }], rectangleClick: [{
2800
- type: Output
2801
- }], rectangleDblclick: [{
2802
- type: Output
2803
- }], rectangleDrag: [{
2804
- type: Output
2805
- }], rectangleDragend: [{
2806
- type: Output
2807
- }], rectangleDragstart: [{
2808
- type: Output
2809
- }], rectangleMousedown: [{
2810
- type: Output
2811
- }], rectangleMousemove: [{
2812
- type: Output
2813
- }], rectangleMouseout: [{
2814
- type: Output
2815
- }], rectangleMouseover: [{
2816
- type: Output
2817
- }], rectangleMouseup: [{
2818
- type: Output
2819
- }], rectangleRightclick: [{
2820
- type: Output
2821
- }] } });
2822
-
2823
- /// <reference types="google.maps" />
2824
- /**
2825
- * Angular component that renders a Google Maps Traffic Layer via the Google Maps JavaScript API.
2826
- *
2827
- * See developers.google.com/maps/documentation/javascript/reference/map#TrafficLayer
2828
- */
2829
- class MapTrafficLayer {
2830
- /**
2831
- * Whether the traffic layer refreshes with updated information automatically.
2832
- */
2833
- set autoRefresh(autoRefresh) {
2834
- this._autoRefresh.next(autoRefresh);
2835
- }
2836
- constructor(_map, _ngZone) {
2837
- this._map = _map;
2838
- this._ngZone = _ngZone;
2839
- this._autoRefresh = new BehaviorSubject(true);
2840
- this._destroyed = new Subject();
2841
- }
2842
- ngOnInit() {
2843
- if (this._map._isBrowser) {
2844
- this._combineOptions()
2845
- .pipe(take(1))
2846
- .subscribe(options => {
2847
- // Create the object outside the zone so its events don't trigger change detection.
2848
- this._ngZone.runOutsideAngular(() => {
2849
- this.trafficLayer = new google.maps.TrafficLayer(options);
2850
- });
2851
- this._assertInitialized();
2852
- this.trafficLayer.setMap(this._map.googleMap);
2853
- });
2854
- this._watchForAutoRefreshChanges();
2855
- }
2856
- }
2857
- ngOnDestroy() {
2858
- this._destroyed.next();
2859
- this._destroyed.complete();
2860
- if (this.trafficLayer) {
2861
- this.trafficLayer.setMap(null);
2862
- }
2863
- }
2864
- _combineOptions() {
2865
- return this._autoRefresh.pipe(map(autoRefresh => {
2866
- const combinedOptions = { autoRefresh };
2867
- return combinedOptions;
2868
- }));
2869
- }
2870
- _watchForAutoRefreshChanges() {
2871
- this._combineOptions()
2872
- .pipe(takeUntil(this._destroyed))
2873
- .subscribe(options => {
2874
- this._assertInitialized();
2875
- this.trafficLayer.setOptions(options);
2876
- });
2877
- }
2878
- _assertInitialized() {
2879
- if (!this._map.googleMap) {
2880
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
2881
- 'Please wait for the API to load before trying to interact with it.');
2882
- }
2883
- if (!this.trafficLayer) {
2884
- throw Error('Cannot interact with a Google Map Traffic Layer before it has been initialized. ' +
2885
- 'Please wait for the Traffic Layer to load before trying to interact with it.');
2886
- }
2887
- }
2888
- }
2889
- MapTrafficLayer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapTrafficLayer, deps: [{ token: GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
2890
- MapTrafficLayer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapTrafficLayer, selector: "map-traffic-layer", inputs: { autoRefresh: "autoRefresh" }, exportAs: ["mapTrafficLayer"], ngImport: i0 });
2891
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapTrafficLayer, decorators: [{
2892
- type: Directive,
2893
- args: [{
2894
- selector: 'map-traffic-layer',
2895
- exportAs: 'mapTrafficLayer',
2896
- }]
2897
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.NgZone }]; }, propDecorators: { autoRefresh: [{
2898
- type: Input
2899
- }] } });
2900
-
2901
- /// <reference types="google.maps" />
2902
- /**
2903
- * Angular component that renders a Google Maps Transit Layer via the Google Maps JavaScript API.
2904
- *
2905
- * See developers.google.com/maps/documentation/javascript/reference/map#TransitLayer
2906
- */
2907
- class MapTransitLayer extends MapBaseLayer {
2908
- _initializeObject() {
2909
- this.transitLayer = new google.maps.TransitLayer();
2910
- }
2911
- _setMap() {
2912
- this._assertLayerInitialized();
2913
- this.transitLayer.setMap(this._map.googleMap);
2914
- }
2915
- _unsetMap() {
2916
- if (this.transitLayer) {
2917
- this.transitLayer.setMap(null);
2918
- }
2919
- }
2920
- _assertLayerInitialized() {
2921
- if (!this.transitLayer) {
2922
- throw Error('Cannot interact with a Google Map Transit Layer before it has been initialized. ' +
2923
- 'Please wait for the Transit Layer to load before trying to interact with it.');
2924
- }
2925
- }
2926
- }
2927
- MapTransitLayer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapTransitLayer, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2928
- MapTransitLayer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapTransitLayer, selector: "map-transit-layer", exportAs: ["mapTransitLayer"], usesInheritance: true, ngImport: i0 });
2929
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapTransitLayer, decorators: [{
2930
- type: Directive,
2931
- args: [{
2932
- selector: 'map-transit-layer',
2933
- exportAs: 'mapTransitLayer',
2934
- }]
2935
- }] });
2936
-
2937
- /// <reference types="google.maps" />
2938
- /**
2939
- * Angular directive that renders a Google Maps heatmap via the Google Maps JavaScript API.
2940
- *
2941
- * See: https://developers.google.com/maps/documentation/javascript/reference/visualization
2942
- */
2943
- class MapHeatmapLayer {
2944
- /**
2945
- * Data shown on the heatmap.
2946
- * See: https://developers.google.com/maps/documentation/javascript/reference/visualization
2947
- */
2948
- set data(data) {
2949
- this._data = data;
2950
- }
2951
- /**
2952
- * Options used to configure the heatmap. See:
2953
- * developers.google.com/maps/documentation/javascript/reference/visualization#HeatmapLayerOptions
2954
- */
2955
- set options(options) {
2956
- this._options = options;
2957
- }
2958
- constructor(_googleMap, _ngZone) {
2959
- this._googleMap = _googleMap;
2960
- this._ngZone = _ngZone;
2961
- }
2962
- ngOnInit() {
2963
- var _a, _b;
2964
- if (this._googleMap._isBrowser) {
2965
- if (!((_b = (_a = window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.visualization) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2966
- throw Error('Namespace `google.maps.visualization` not found, cannot construct heatmap. ' +
2967
- 'Please install the Google Maps JavaScript API with the "visualization" library: ' +
2968
- 'https://developers.google.com/maps/documentation/javascript/visualization');
2969
- }
2970
- // Create the object outside the zone so its events don't trigger change detection.
2971
- // We'll bring it back in inside the `MapEventManager` only for the events that the
2972
- // user has subscribed to.
2973
- this._ngZone.runOutsideAngular(() => {
2974
- this.heatmap = new google.maps.visualization.HeatmapLayer(this._combineOptions());
2975
- });
2976
- this._assertInitialized();
2977
- this.heatmap.setMap(this._googleMap.googleMap);
2978
- }
2979
- }
2980
- ngOnChanges(changes) {
2981
- const { _data, heatmap } = this;
2982
- if (heatmap) {
2983
- if (changes['options']) {
2984
- heatmap.setOptions(this._combineOptions());
2985
- }
2986
- if (changes['data'] && _data !== undefined) {
2987
- heatmap.setData(this._normalizeData(_data));
2988
- }
2989
- }
2990
- }
2991
- ngOnDestroy() {
2992
- if (this.heatmap) {
2993
- this.heatmap.setMap(null);
2994
- }
2995
- }
2996
- /**
2997
- * Gets the data that is currently shown on the heatmap.
2998
- * See: developers.google.com/maps/documentation/javascript/reference/visualization#HeatmapLayer
2999
- */
3000
- getData() {
3001
- this._assertInitialized();
3002
- return this.heatmap.getData();
3003
- }
3004
- /** Creates a combined options object using the passed-in options and the individual inputs. */
3005
- _combineOptions() {
3006
- const options = this._options || {};
3007
- return Object.assign(Object.assign({}, options), { data: this._normalizeData(this._data || options.data || []), map: this._googleMap.googleMap });
3008
- }
3009
- /**
3010
- * Most Google Maps APIs support both `LatLng` objects and `LatLngLiteral`. The latter is more
3011
- * convenient to write out, because the Google Maps API doesn't have to have been loaded in order
3012
- * to construct them. The `HeatmapLayer` appears to be an exception that only allows a `LatLng`
3013
- * object, or it throws a runtime error. Since it's more convenient and we expect that Angular
3014
- * users will load the API asynchronously, we allow them to pass in a `LatLngLiteral` and we
3015
- * convert it to a `LatLng` object before passing it off to Google Maps.
3016
- */
3017
- _normalizeData(data) {
3018
- const result = [];
3019
- data.forEach(item => {
3020
- result.push(isLatLngLiteral(item) ? new google.maps.LatLng(item.lat, item.lng) : item);
3021
- });
3022
- return result;
3023
- }
3024
- /** Asserts that the heatmap object has been initialized. */
3025
- _assertInitialized() {
3026
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
3027
- if (!this._googleMap.googleMap) {
3028
- throw Error('Cannot access Google Map information before the API has been initialized. ' +
3029
- 'Please wait for the API to load before trying to interact with it.');
3030
- }
3031
- if (!this.heatmap) {
3032
- throw Error('Cannot interact with a Google Map HeatmapLayer before it has been ' +
3033
- 'initialized. Please wait for the heatmap to load before trying to interact with it.');
3034
- }
3035
- }
3036
- }
3037
- }
3038
- MapHeatmapLayer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapHeatmapLayer, deps: [{ token: GoogleMap }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
3039
- MapHeatmapLayer.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.2", type: MapHeatmapLayer, selector: "map-heatmap-layer", inputs: { data: "data", options: "options" }, exportAs: ["mapHeatmapLayer"], usesOnChanges: true, ngImport: i0 });
3040
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapHeatmapLayer, decorators: [{
3041
- type: Directive,
3042
- args: [{
3043
- selector: 'map-heatmap-layer',
3044
- exportAs: 'mapHeatmapLayer',
3045
- }]
3046
- }], ctorParameters: function () { return [{ type: GoogleMap }, { type: i0.NgZone }]; }, propDecorators: { data: [{
3047
- type: Input
3048
- }], options: [{
3049
- type: Input
3050
- }] } });
3051
- /** Asserts that an object is a `LatLngLiteral`. */
3052
- function isLatLngLiteral(value) {
3053
- return value && typeof value.lat === 'number' && typeof value.lng === 'number';
3054
- }
3055
-
3056
- /**
3057
- * @license
3058
- * Copyright Google LLC All Rights Reserved.
3059
- *
3060
- * Use of this source code is governed by an MIT-style license that can be
3061
- * found in the LICENSE file at https://angular.io/license
3062
- */
3063
- const COMPONENTS = [
3064
- GoogleMap,
3065
- MapBaseLayer,
3066
- MapBicyclingLayer,
3067
- MapCircle,
3068
- MapDirectionsRenderer,
3069
- MapGroundOverlay,
3070
- MapInfoWindow,
3071
- MapKmlLayer,
3072
- MapMarker,
3073
- MapMarkerClusterer,
3074
- MapPolygon,
3075
- MapPolyline,
3076
- MapRectangle,
3077
- MapTrafficLayer,
3078
- MapTransitLayer,
3079
- MapHeatmapLayer,
3080
- ];
3081
- class GoogleMapsModule {
3082
- }
3083
- GoogleMapsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: GoogleMapsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3084
- GoogleMapsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: GoogleMapsModule, declarations: [GoogleMap,
3085
- MapBaseLayer,
3086
- MapBicyclingLayer,
3087
- MapCircle,
3088
- MapDirectionsRenderer,
3089
- MapGroundOverlay,
3090
- MapInfoWindow,
3091
- MapKmlLayer,
3092
- MapMarker,
3093
- MapMarkerClusterer,
3094
- MapPolygon,
3095
- MapPolyline,
3096
- MapRectangle,
3097
- MapTrafficLayer,
3098
- MapTransitLayer,
3099
- MapHeatmapLayer], exports: [GoogleMap,
3100
- MapBaseLayer,
3101
- MapBicyclingLayer,
3102
- MapCircle,
3103
- MapDirectionsRenderer,
3104
- MapGroundOverlay,
3105
- MapInfoWindow,
3106
- MapKmlLayer,
3107
- MapMarker,
3108
- MapMarkerClusterer,
3109
- MapPolygon,
3110
- MapPolyline,
3111
- MapRectangle,
3112
- MapTrafficLayer,
3113
- MapTransitLayer,
3114
- MapHeatmapLayer] });
3115
- GoogleMapsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: GoogleMapsModule });
3116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: GoogleMapsModule, decorators: [{
3117
- type: NgModule,
3118
- args: [{
3119
- declarations: COMPONENTS,
3120
- exports: COMPONENTS,
3121
- }]
3122
- }] });
3123
-
3124
- /// <reference types="google.maps" />
3125
- /**
3126
- * Angular service that wraps the Google Maps DirectionsService from the Google Maps JavaScript
3127
- * API.
3128
- *
3129
- * See developers.google.com/maps/documentation/javascript/reference/directions#DirectionsService
3130
- */
3131
- class MapDirectionsService {
3132
- constructor(_ngZone) {
3133
- this._ngZone = _ngZone;
3134
- }
3135
- /**
3136
- * See
3137
- * developers.google.com/maps/documentation/javascript/reference/directions
3138
- * #DirectionsService.route
3139
- */
3140
- route(request) {
3141
- return new Observable(observer => {
3142
- // Initialize the `DirectionsService` lazily since the Google Maps API may
3143
- // not have been loaded when the provider is instantiated.
3144
- if (!this._directionsService) {
3145
- this._directionsService = new google.maps.DirectionsService();
3146
- }
3147
- this._directionsService.route(request, (result, status) => {
3148
- this._ngZone.run(() => {
3149
- observer.next({ result: result || undefined, status });
3150
- observer.complete();
3151
- });
3152
- });
3153
- });
3154
- }
3155
- }
3156
- MapDirectionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapDirectionsService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
3157
- MapDirectionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapDirectionsService, providedIn: 'root' });
3158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapDirectionsService, decorators: [{
3159
- type: Injectable,
3160
- args: [{ providedIn: 'root' }]
3161
- }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
3162
-
3163
- /// <reference types="google.maps" />
3164
- /**
3165
- * Angular service that wraps the Google Maps Geocoder from the Google Maps JavaScript API.
3166
- * See developers.google.com/maps/documentation/javascript/reference/geocoder#Geocoder
3167
- */
3168
- class MapGeocoder {
3169
- constructor(_ngZone) {
3170
- this._ngZone = _ngZone;
3171
- }
3172
- /**
3173
- * See developers.google.com/maps/documentation/javascript/reference/geocoder#Geocoder.geocode
3174
- */
3175
- geocode(request) {
3176
- return new Observable(observer => {
3177
- // Initialize the `Geocoder` lazily since the Google Maps API may
3178
- // not have been loaded when the provider is instantiated.
3179
- if (!this._geocoder) {
3180
- this._geocoder = new google.maps.Geocoder();
3181
- }
3182
- this._geocoder.geocode(request, (results, status) => {
3183
- this._ngZone.run(() => {
3184
- observer.next({ results: results || [], status });
3185
- observer.complete();
3186
- });
3187
- });
3188
- });
3189
- }
3190
- }
3191
- MapGeocoder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapGeocoder, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
3192
- MapGeocoder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapGeocoder, providedIn: 'root' });
3193
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: MapGeocoder, decorators: [{
3194
- type: Injectable,
3195
- args: [{ providedIn: 'root' }]
3196
- }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
3197
-
3198
- /**
3199
- * @license
3200
- * Copyright Google LLC All Rights Reserved.
3201
- *
3202
- * Use of this source code is governed by an MIT-style license that can be
3203
- * found in the LICENSE file at https://angular.io/license
3204
- */
3205
-
3206
- /**
3207
- * @license
3208
- * Copyright Google LLC All Rights Reserved.
3209
- *
3210
- * Use of this source code is governed by an MIT-style license that can be
3211
- * found in the LICENSE file at https://angular.io/license
3212
- */
3213
-
3214
- /**
3215
- * Generated bundle index. Do not edit.
3216
- */
3217
-
3218
- export { GoogleMap, GoogleMapsModule, MapBaseLayer, MapBicyclingLayer, MapCircle, MapDirectionsRenderer, MapDirectionsService, MapEventManager, MapGeocoder, MapGroundOverlay, MapHeatmapLayer, MapInfoWindow, MapKmlLayer, MapMarker, MapMarkerClusterer, MapPolygon, MapPolyline, MapRectangle, MapTrafficLayer, MapTransitLayer };
3219
- //# sourceMappingURL=google-maps.mjs.map