@angular/google-maps 19.0.0-next.0 → 19.0.0-next.10

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 (36) hide show
  1. package/fesm2022/google-maps.mjs +369 -164
  2. package/fesm2022/google-maps.mjs.map +1 -1
  3. package/index.d.ts +344 -109
  4. package/package.json +7 -4
  5. package/schematics/migration.json +9 -0
  6. package/schematics/ng-add/index.d.ts +1 -1
  7. package/schematics/ng-add/index.js +2 -2
  8. package/schematics/ng-add/index.mjs +2 -2
  9. package/schematics/ng-update/index_bundled.js +115 -0
  10. package/schematics/ng-update/index_bundled.js.map +7 -0
  11. package/esm2022/google-map/google-map.mjs +0 -473
  12. package/esm2022/google-maps-module.mjs +0 -90
  13. package/esm2022/google-maps_public_index.mjs +0 -5
  14. package/esm2022/index.mjs +0 -9
  15. package/esm2022/map-advanced-marker/map-advanced-marker.mjs +0 -217
  16. package/esm2022/map-anchor-point.mjs +0 -10
  17. package/esm2022/map-base-layer.mjs +0 -51
  18. package/esm2022/map-bicycling-layer/map-bicycling-layer.mjs +0 -69
  19. package/esm2022/map-circle/map-circle.mjs +0 -280
  20. package/esm2022/map-directions-renderer/map-directions-renderer.mjs +0 -149
  21. package/esm2022/map-directions-renderer/map-directions-service.mjs +0 -61
  22. package/esm2022/map-event-manager.mjs +0 -73
  23. package/esm2022/map-geocoder/map-geocoder.mjs +0 -57
  24. package/esm2022/map-ground-overlay/map-ground-overlay.mjs +0 -193
  25. package/esm2022/map-heatmap-layer/map-heatmap-layer.mjs +0 -151
  26. package/esm2022/map-info-window/map-info-window.mjs +0 -238
  27. package/esm2022/map-kml-layer/map-kml-layer.mjs +0 -183
  28. package/esm2022/map-marker/map-marker.mjs +0 -447
  29. package/esm2022/map-marker-clusterer/map-marker-clusterer.mjs +0 -421
  30. package/esm2022/map-marker-clusterer/marker-clusterer-types.mjs +0 -10
  31. package/esm2022/map-polygon/map-polygon.mjs +0 -227
  32. package/esm2022/map-polyline/map-polyline.mjs +0 -220
  33. package/esm2022/map-rectangle/map-rectangle.mjs +0 -240
  34. package/esm2022/map-traffic-layer/map-traffic-layer.mjs +0 -103
  35. package/esm2022/map-transit-layer/map-transit-layer.mjs +0 -69
  36. package/esm2022/public-api.mjs +0 -29
package/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  /// <reference types="google.maps" />
2
2
 
3
3
  import { AfterContentInit } from '@angular/core';
4
- import { ElementRef } from '@angular/core';
5
4
  import { EventEmitter } from '@angular/core';
6
5
  import * as i0 from '@angular/core';
7
6
  import { NgZone } from '@angular/core';
@@ -12,6 +11,49 @@ import { OnInit } from '@angular/core';
12
11
  import { QueryList } from '@angular/core';
13
12
  import { SimpleChanges } from '@angular/core';
14
13
 
14
+ declare interface Algorithm_2 {
15
+ /**
16
+ * Calculates an array of {@link Cluster}.
17
+ */
18
+ calculate: ({ markers, map }: AlgorithmInput) => AlgorithmOutput;
19
+ }
20
+ export { Algorithm_2 as Algorithm }
21
+
22
+ export declare interface AlgorithmInput {
23
+ /**
24
+ * The map containing the markers and clusters.
25
+ */
26
+ map: google.maps.Map;
27
+ /**
28
+ * An array of markers to be clustered.
29
+ *
30
+ * There are some specific edge cases to be aware of including the following:
31
+ * * Markers that are not visible.
32
+ */
33
+ markers: Marker[];
34
+ /**
35
+ * The `mapCanvasProjection` enables easy conversion from lat/lng to pixel.
36
+ *
37
+ * @see [MapCanvasProjection](https://developers.google.com/maps/documentation/javascript/reference/overlay-view#MapCanvasProjection)
38
+ */
39
+ mapCanvasProjection: google.maps.MapCanvasProjection;
40
+ }
41
+
42
+ export declare interface AlgorithmOptions {
43
+ maxZoom?: number;
44
+ }
45
+
46
+ export declare interface AlgorithmOutput {
47
+ /**
48
+ * The clusters returned based upon the {@link AlgorithmInput}.
49
+ */
50
+ clusters: Cluster[];
51
+ /**
52
+ * A boolean flag indicating that the clusters have not changed.
53
+ */
54
+ changed?: boolean;
55
+ }
56
+
15
57
  /**
16
58
  * Function type alias for determining the aria label on a Google Maps marker cluster.
17
59
  *
@@ -26,13 +68,34 @@ export declare type AriaLabelFn = (text: string) => string;
26
68
  */
27
69
  export declare type Calculator = (markers: google.maps.Marker[], clusterIconStylesCount: number) => ClusterIconInfo;
28
70
 
71
+ export declare class Cluster {
72
+ marker?: Marker;
73
+ readonly markers?: Marker[];
74
+ protected _position: google.maps.LatLng;
75
+ constructor({ markers, position }: ClusterOptions);
76
+ get bounds(): google.maps.LatLngBounds | undefined;
77
+ get position(): google.maps.LatLng;
78
+ /**
79
+ * Get the count of **visible** markers.
80
+ */
81
+ get count(): number;
82
+ /**
83
+ * Add a marker to the cluster.
84
+ */
85
+ push(marker: Marker): void;
86
+ /**
87
+ * Cleanup references and remove marker from map.
88
+ */
89
+ delete(): void;
90
+ }
91
+
29
92
  /**
30
93
  * Cluster class from the @google/markerclustererplus library.
31
94
  *
32
95
  * See googlemaps.github.io/v3-utility-library/classes/_google_markerclustererplus.cluster.html
33
96
  */
34
- declare class Cluster {
35
- constructor(markerClusterer: MarkerClusterer);
97
+ declare class Cluster_2 {
98
+ constructor(markerClusterer: MarkerClusterer_2);
36
99
  getCenter(): google.maps.LatLng;
37
100
  getMarkers(): google.maps.Marker[];
38
101
  getSize(): number;
@@ -76,6 +139,27 @@ export declare interface ClusterIconStyle {
76
139
  width: number;
77
140
  }
78
141
 
142
+ export declare interface ClusterOptions {
143
+ position?: google.maps.LatLng | google.maps.LatLngLiteral;
144
+ markers?: Marker[];
145
+ }
146
+
147
+ export declare class ClusterStats {
148
+ readonly markers: {
149
+ sum: number;
150
+ };
151
+ readonly clusters: {
152
+ count: number;
153
+ markers: {
154
+ mean: number;
155
+ sum: number;
156
+ min: number;
157
+ max: number;
158
+ };
159
+ };
160
+ constructor(markers: Marker[], clusters: Cluster[]);
161
+ }
162
+
79
163
  /** Arbitrary default height for the map element */
80
164
  declare const DEFAULT_HEIGHT = "500px";
81
165
 
@@ -107,6 +191,118 @@ declare const DEFAULT_OPTIONS: google.maps.MapOptions;
107
191
  /** Arbitrary default width for the map element */
108
192
  declare const DEFAULT_WIDTH = "500px";
109
193
 
194
+ export declare const defaultOnClusterClickHandler: onClusterClickHandler;
195
+
196
+ /**
197
+ * Angular component for implementing a Google Maps Marker Clusterer.
198
+ * See https://developers.google.com/maps/documentation/javascript/marker-clustering
199
+ *
200
+ * @deprecated This component is using a deprecated clustering implementation. Use the
201
+ * `map-marker-clusterer` component instead.
202
+ * @breaking-change 21.0.0
203
+ *
204
+ */
205
+ export declare class DeprecatedMapMarkerClusterer implements OnInit, AfterContentInit, OnChanges, OnDestroy {
206
+ private readonly _googleMap;
207
+ private readonly _ngZone;
208
+ private readonly _currentMarkers;
209
+ private readonly _eventManager;
210
+ private readonly _destroy;
211
+ /** Whether the clusterer is allowed to be initialized. */
212
+ private readonly _canInitialize;
213
+ ariaLabelFn: AriaLabelFn;
214
+ set averageCenter(averageCenter: boolean);
215
+ private _averageCenter;
216
+ batchSize?: number;
217
+ set batchSizeIE(batchSizeIE: number);
218
+ private _batchSizeIE;
219
+ set calculator(calculator: Calculator);
220
+ private _calculator;
221
+ set clusterClass(clusterClass: string);
222
+ private _clusterClass;
223
+ set enableRetinaIcons(enableRetinaIcons: boolean);
224
+ private _enableRetinaIcons;
225
+ set gridSize(gridSize: number);
226
+ private _gridSize;
227
+ set ignoreHidden(ignoreHidden: boolean);
228
+ private _ignoreHidden;
229
+ set imageExtension(imageExtension: string);
230
+ private _imageExtension;
231
+ set imagePath(imagePath: string);
232
+ private _imagePath;
233
+ set imageSizes(imageSizes: number[]);
234
+ private _imageSizes;
235
+ set maxZoom(maxZoom: number);
236
+ private _maxZoom;
237
+ set minimumClusterSize(minimumClusterSize: number);
238
+ private _minimumClusterSize;
239
+ set styles(styles: ClusterIconStyle[]);
240
+ private _styles;
241
+ set title(title: string);
242
+ private _title;
243
+ set zIndex(zIndex: number);
244
+ private _zIndex;
245
+ set zoomOnClick(zoomOnClick: boolean);
246
+ private _zoomOnClick;
247
+ set options(options: MarkerClustererOptions);
248
+ private _options;
249
+ /**
250
+ * See
251
+ * googlemaps.github.io/v3-utility-library/modules/
252
+ * _google_markerclustererplus.html#clusteringbegin
253
+ */
254
+ readonly clusteringbegin: Observable<void>;
255
+ /**
256
+ * See
257
+ * googlemaps.github.io/v3-utility-library/modules/_google_markerclustererplus.html#clusteringend
258
+ */
259
+ readonly clusteringend: Observable<void>;
260
+ /** Emits when a cluster has been clicked. */
261
+ readonly clusterClick: Observable<Cluster_2>;
262
+ _markers: QueryList<MapMarker>;
263
+ /**
264
+ * The underlying MarkerClusterer object.
265
+ *
266
+ * See
267
+ * googlemaps.github.io/v3-utility-library/classes/
268
+ * _google_markerclustererplus.markerclusterer.html
269
+ */
270
+ markerClusterer?: MarkerClusterer_2;
271
+ /** Event emitted when the clusterer is initialized. */
272
+ readonly markerClustererInitialized: EventEmitter<MarkerClusterer_2>;
273
+ constructor(...args: unknown[]);
274
+ ngOnInit(): void;
275
+ ngAfterContentInit(): void;
276
+ ngOnChanges(changes: SimpleChanges): void;
277
+ ngOnDestroy(): void;
278
+ fitMapToMarkers(padding: number | google.maps.Padding): void;
279
+ getAverageCenter(): boolean;
280
+ getBatchSizeIE(): number;
281
+ getCalculator(): Calculator;
282
+ getClusterClass(): string;
283
+ getClusters(): Cluster_2[];
284
+ getEnableRetinaIcons(): boolean;
285
+ getGridSize(): number;
286
+ getIgnoreHidden(): boolean;
287
+ getImageExtension(): string;
288
+ getImagePath(): string;
289
+ getImageSizes(): number[];
290
+ getMaxZoom(): number;
291
+ getMinimumClusterSize(): number;
292
+ getStyles(): ClusterIconStyle[];
293
+ getTitle(): string;
294
+ getTotalClusters(): number;
295
+ getTotalMarkers(): number;
296
+ getZIndex(): number;
297
+ getZoomOnClick(): boolean;
298
+ private _combineOptions;
299
+ private _watchForMarkerChanges;
300
+ private _getInternalMarkers;
301
+ private _assertInitialized;
302
+ static ɵfac: i0.ɵɵFactoryDeclaration<DeprecatedMapMarkerClusterer, never>;
303
+ static ɵcmp: i0.ɵɵComponentDeclaration<DeprecatedMapMarkerClusterer, "deprecated-map-marker-clusterer", ["mapMarkerClusterer"], { "ariaLabelFn": { "alias": "ariaLabelFn"; "required": false; }; "averageCenter": { "alias": "averageCenter"; "required": false; }; "batchSize": { "alias": "batchSize"; "required": false; }; "batchSizeIE": { "alias": "batchSizeIE"; "required": false; }; "calculator": { "alias": "calculator"; "required": false; }; "clusterClass": { "alias": "clusterClass"; "required": false; }; "enableRetinaIcons": { "alias": "enableRetinaIcons"; "required": false; }; "gridSize": { "alias": "gridSize"; "required": false; }; "ignoreHidden": { "alias": "ignoreHidden"; "required": false; }; "imageExtension": { "alias": "imageExtension"; "required": false; }; "imagePath": { "alias": "imagePath"; "required": false; }; "imageSizes": { "alias": "imageSizes"; "required": false; }; "maxZoom": { "alias": "maxZoom"; "required": false; }; "minimumClusterSize": { "alias": "minimumClusterSize"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "title": { "alias": "title"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "zoomOnClick": { "alias": "zoomOnClick"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "clusteringbegin": "clusteringbegin"; "clusteringend": "clusteringend"; "clusterClick": "clusterClick"; "markerClustererInitialized": "markerClustererInitialized"; }, ["_markers"], ["*"], true, never>;
304
+ }
305
+
110
306
  /**
111
307
  * Angular component that renders a Google Map via the Google Maps JavaScript
112
308
  * API.
@@ -243,7 +439,7 @@ export declare class GoogleMap implements OnChanges, OnInit, OnDestroy {
243
439
  * https://developers.google.com/maps/documentation/javascript/reference/map#Map.zoom_changed
244
440
  */
245
441
  readonly zoomChanged: Observable<void>;
246
- constructor(_elementRef: ElementRef, _ngZone: NgZone, platformId: Object);
442
+ constructor(...args: unknown[]);
247
443
  ngOnChanges(changes: SimpleChanges): void;
248
444
  ngOnInit(): void;
249
445
  private _initialize;
@@ -346,7 +542,7 @@ export declare class GoogleMap implements OnChanges, OnInit, OnDestroy {
346
542
 
347
543
  export declare class GoogleMapsModule {
348
544
  static ɵfac: i0.ɵɵFactoryDeclaration<GoogleMapsModule, never>;
349
- static ɵmod: i0.ɵɵNgModuleDeclaration<GoogleMapsModule, never, [typeof i1.GoogleMap, typeof i2.MapBaseLayer, typeof i3.MapBicyclingLayer, typeof i4.MapCircle, typeof i5.MapDirectionsRenderer, typeof i6.MapGroundOverlay, typeof i7.MapHeatmapLayer, typeof i8.MapInfoWindow, typeof i9.MapKmlLayer, typeof i10.MapMarker, typeof i11.MapAdvancedMarker, typeof i12.MapMarkerClusterer, typeof i13.MapPolygon, typeof i14.MapPolyline, typeof i15.MapRectangle, typeof i16.MapTrafficLayer, typeof i17.MapTransitLayer], [typeof i1.GoogleMap, typeof i2.MapBaseLayer, typeof i3.MapBicyclingLayer, typeof i4.MapCircle, typeof i5.MapDirectionsRenderer, typeof i6.MapGroundOverlay, typeof i7.MapHeatmapLayer, typeof i8.MapInfoWindow, typeof i9.MapKmlLayer, typeof i10.MapMarker, typeof i11.MapAdvancedMarker, typeof i12.MapMarkerClusterer, typeof i13.MapPolygon, typeof i14.MapPolyline, typeof i15.MapRectangle, typeof i16.MapTrafficLayer, typeof i17.MapTransitLayer]>;
545
+ static ɵmod: i0.ɵɵNgModuleDeclaration<GoogleMapsModule, never, [typeof i1.GoogleMap, typeof i2.MapBaseLayer, typeof i3.MapBicyclingLayer, typeof i4.MapCircle, typeof i5.MapDirectionsRenderer, typeof i6.MapGroundOverlay, typeof i7.MapHeatmapLayer, typeof i8.MapInfoWindow, typeof i9.MapKmlLayer, typeof i10.MapMarker, typeof i11.MapAdvancedMarker, typeof i12.DeprecatedMapMarkerClusterer, typeof i13.MapPolygon, typeof i14.MapPolyline, typeof i15.MapRectangle, typeof i16.MapTrafficLayer, typeof i17.MapTransitLayer, typeof i18.MapMarkerClusterer], [typeof i1.GoogleMap, typeof i2.MapBaseLayer, typeof i3.MapBicyclingLayer, typeof i4.MapCircle, typeof i5.MapDirectionsRenderer, typeof i6.MapGroundOverlay, typeof i7.MapHeatmapLayer, typeof i8.MapInfoWindow, typeof i9.MapKmlLayer, typeof i10.MapMarker, typeof i11.MapAdvancedMarker, typeof i12.DeprecatedMapMarkerClusterer, typeof i13.MapPolygon, typeof i14.MapPolyline, typeof i15.MapRectangle, typeof i16.MapTrafficLayer, typeof i17.MapTransitLayer, typeof i18.MapMarkerClusterer]>;
350
546
  static ɵinj: i0.ɵɵInjectorDeclaration<GoogleMapsModule>;
351
547
  }
352
548
 
@@ -378,7 +574,7 @@ declare namespace i11 {
378
574
 
379
575
  declare namespace i12 {
380
576
  export {
381
- MapMarkerClusterer
577
+ DeprecatedMapMarkerClusterer
382
578
  }
383
579
  }
384
580
 
@@ -412,6 +608,12 @@ declare namespace i17 {
412
608
  }
413
609
  }
414
610
 
611
+ declare namespace i18 {
612
+ export {
613
+ MapMarkerClusterer
614
+ }
615
+ }
616
+
415
617
  declare namespace i2 {
416
618
  export {
417
619
  MapBaseLayer
@@ -466,7 +668,7 @@ declare namespace i9 {
466
668
  *
467
669
  * See developers.google.com/maps/documentation/javascript/reference/marker
468
670
  */
469
- export declare class MapAdvancedMarker implements OnInit, OnChanges, OnDestroy, MapAnchorPoint {
671
+ export declare class MapAdvancedMarker implements OnInit, OnChanges, OnDestroy, MapAnchorPoint, MarkerDirective {
470
672
  private readonly _googleMap;
471
673
  private _ngZone;
472
674
  private _eventManager;
@@ -514,6 +716,26 @@ export declare class MapAdvancedMarker implements OnInit, OnChanges, OnDestroy,
514
716
  * https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElement.click
515
717
  */
516
718
  readonly mapClick: Observable<google.maps.MapMouseEvent>;
719
+ /**
720
+ * This event is fired when the AdvancedMarkerElement is double-clicked.
721
+ */
722
+ readonly mapDblclick: Observable<google.maps.MapMouseEvent>;
723
+ /**
724
+ * This event is fired when the mouse moves out of the AdvancedMarkerElement.
725
+ */
726
+ readonly mapMouseout: Observable<google.maps.MapMouseEvent>;
727
+ /**
728
+ * This event is fired when the mouse moves over the AdvancedMarkerElement.
729
+ */
730
+ readonly mapMouseover: Observable<google.maps.MapMouseEvent>;
731
+ /**
732
+ * This event is fired when the mouse button is released over the AdvancedMarkerElement.
733
+ */
734
+ readonly mapMouseup: Observable<google.maps.MapMouseEvent>;
735
+ /**
736
+ * This event is fired when the AdvancedMarkerElement is right-clicked.
737
+ */
738
+ readonly mapRightclick: Observable<google.maps.MapMouseEvent>;
517
739
  /**
518
740
  * This event is repeatedly fired while the user drags the AdvancedMarkerElement.
519
741
  * https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElement.drag
@@ -537,18 +759,20 @@ export declare class MapAdvancedMarker implements OnInit, OnChanges, OnDestroy,
537
759
  * See developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElement
538
760
  */
539
761
  advancedMarker: google.maps.marker.AdvancedMarkerElement;
540
- constructor(_googleMap: GoogleMap, _ngZone: NgZone);
762
+ constructor(...args: unknown[]);
541
763
  ngOnInit(): void;
542
764
  private _initialize;
543
765
  ngOnChanges(changes: SimpleChanges): void;
544
766
  ngOnDestroy(): void;
545
767
  getAnchor(): google.maps.marker.AdvancedMarkerElement;
768
+ /** Returns a promise that resolves when the marker has been initialized. */
769
+ _resolveMarker(): Promise<google.maps.marker.AdvancedMarkerElement>;
546
770
  /** Creates a combined options object using the passed-in options and the individual inputs. */
547
771
  private _combineOptions;
548
772
  /** Asserts that the map has been initialized. */
549
773
  private _assertInitialized;
550
774
  static ɵfac: i0.ɵɵFactoryDeclaration<MapAdvancedMarker, never>;
551
- static ɵdir: i0.ɵɵDirectiveDeclaration<MapAdvancedMarker, "map-advanced-marker", ["mapAdvancedMarker"], { "title": { "alias": "title"; "required": false; }; "position": { "alias": "position"; "required": false; }; "content": { "alias": "content"; "required": false; }; "gmpDraggable": { "alias": "gmpDraggable"; "required": false; }; "options": { "alias": "options"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; }, { "mapClick": "mapClick"; "mapDrag": "mapDrag"; "mapDragend": "mapDragend"; "mapDragstart": "mapDragstart"; "markerInitialized": "markerInitialized"; }, never, never, true, never>;
775
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MapAdvancedMarker, "map-advanced-marker", ["mapAdvancedMarker"], { "title": { "alias": "title"; "required": false; }; "position": { "alias": "position"; "required": false; }; "content": { "alias": "content"; "required": false; }; "gmpDraggable": { "alias": "gmpDraggable"; "required": false; }; "options": { "alias": "options"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; }, { "mapClick": "mapClick"; "mapDblclick": "mapDblclick"; "mapMouseout": "mapMouseout"; "mapMouseover": "mapMouseover"; "mapMouseup": "mapMouseup"; "mapRightclick": "mapRightclick"; "mapDrag": "mapDrag"; "mapDragend": "mapDragend"; "mapDragstart": "mapDragstart"; "markerInitialized": "markerInitialized"; }, never, never, true, never>;
552
776
  }
553
777
 
554
778
 
@@ -560,7 +784,7 @@ export declare interface MapAnchorPoint {
560
784
  export declare class MapBaseLayer implements OnInit, OnDestroy {
561
785
  protected readonly _map: GoogleMap;
562
786
  protected readonly _ngZone: NgZone;
563
- constructor(_map: GoogleMap, _ngZone: NgZone);
787
+ constructor(...args: unknown[]);
564
788
  ngOnInit(): void;
565
789
  ngOnDestroy(): void;
566
790
  private _assertInitialized;
@@ -683,7 +907,7 @@ export declare class MapCircle implements OnInit, OnDestroy {
683
907
  readonly circleRightclick: Observable<google.maps.MapMouseEvent>;
684
908
  /** Event emitted when the circle is initialized. */
685
909
  readonly circleInitialized: EventEmitter<google.maps.Circle>;
686
- constructor(_map: GoogleMap, _ngZone: NgZone);
910
+ constructor(...args: unknown[]);
687
911
  ngOnInit(): void;
688
912
  private _initialize;
689
913
  ngOnDestroy(): void;
@@ -757,7 +981,7 @@ export declare class MapDirectionsRenderer implements OnInit, OnChanges, OnDestr
757
981
  readonly directionsRendererInitialized: EventEmitter<google.maps.DirectionsRenderer>;
758
982
  /** The underlying google.maps.DirectionsRenderer object. */
759
983
  directionsRenderer?: google.maps.DirectionsRenderer;
760
- constructor(_googleMap: GoogleMap, _ngZone: NgZone);
984
+ constructor(...args: unknown[]);
761
985
  ngOnInit(): void;
762
986
  private _initialize;
763
987
  ngOnChanges(changes: SimpleChanges): void;
@@ -797,7 +1021,7 @@ export declare interface MapDirectionsResponse {
797
1021
  export declare class MapDirectionsService {
798
1022
  private readonly _ngZone;
799
1023
  private _directionsService;
800
- constructor(_ngZone: NgZone);
1024
+ constructor(...args: unknown[]);
801
1025
  /**
802
1026
  * See
803
1027
  * developers.google.com/maps/documentation/javascript/reference/directions
@@ -838,7 +1062,7 @@ declare type MapEventManagerTarget = {
838
1062
  export declare class MapGeocoder {
839
1063
  private readonly _ngZone;
840
1064
  private _geocoder;
841
- constructor(_ngZone: NgZone);
1065
+ constructor(...args: unknown[]);
842
1066
  /**
843
1067
  * See developers.google.com/maps/documentation/javascript/reference/geocoder#Geocoder.geocode
844
1068
  */
@@ -895,7 +1119,7 @@ export declare class MapGroundOverlay implements OnInit, OnDestroy {
895
1119
  readonly mapDblclick: Observable<google.maps.MapMouseEvent>;
896
1120
  /** Event emitted when the ground overlay is initialized. */
897
1121
  readonly groundOverlayInitialized: EventEmitter<google.maps.GroundOverlay>;
898
- constructor(_map: GoogleMap, _ngZone: NgZone);
1122
+ constructor(...args: unknown[]);
899
1123
  ngOnInit(): void;
900
1124
  private _initialize;
901
1125
  ngOnDestroy(): void;
@@ -952,7 +1176,7 @@ export declare class MapHeatmapLayer implements OnInit, OnChanges, OnDestroy {
952
1176
  heatmap?: google.maps.visualization.HeatmapLayer;
953
1177
  /** Event emitted when the heatmap is initialized. */
954
1178
  readonly heatmapInitialized: EventEmitter<google.maps.visualization.HeatmapLayer>;
955
- constructor(_googleMap: GoogleMap, _ngZone: NgZone);
1179
+ constructor(...args: unknown[]);
956
1180
  ngOnInit(): void;
957
1181
  private _initialize;
958
1182
  ngOnChanges(changes: SimpleChanges): void;
@@ -1030,7 +1254,7 @@ export declare class MapInfoWindow implements OnInit, OnDestroy {
1030
1254
  readonly zindexChanged: Observable<void>;
1031
1255
  /** Event emitted when the info window is initialized. */
1032
1256
  readonly infoWindowInitialized: EventEmitter<google.maps.InfoWindow>;
1033
- constructor(_googleMap: GoogleMap, _elementRef: ElementRef<HTMLElement>, _ngZone: NgZone);
1257
+ constructor(...args: unknown[]);
1034
1258
  ngOnInit(): void;
1035
1259
  private _initialize;
1036
1260
  ngOnDestroy(): void;
@@ -1109,7 +1333,7 @@ export declare class MapKmlLayer implements OnInit, OnDestroy {
1109
1333
  readonly statusChanged: Observable<void>;
1110
1334
  /** Event emitted when the KML layer is initialized. */
1111
1335
  readonly kmlLayerInitialized: EventEmitter<google.maps.KmlLayer>;
1112
- constructor(_map: GoogleMap, _ngZone: NgZone);
1336
+ constructor(...args: unknown[]);
1113
1337
  ngOnInit(): void;
1114
1338
  private _initialize;
1115
1339
  ngOnDestroy(): void;
@@ -1147,7 +1371,7 @@ export declare class MapKmlLayer implements OnInit, OnDestroy {
1147
1371
  *
1148
1372
  * See developers.google.com/maps/documentation/javascript/reference/marker
1149
1373
  */
1150
- export declare class MapMarker implements OnInit, OnChanges, OnDestroy, MapAnchorPoint {
1374
+ export declare class MapMarker implements OnInit, OnChanges, OnDestroy, MapAnchorPoint, MarkerDirective {
1151
1375
  private readonly _googleMap;
1152
1376
  private _ngZone;
1153
1377
  private _eventManager;
@@ -1306,7 +1530,7 @@ export declare class MapMarker implements OnInit, OnChanges, OnDestroy, MapAncho
1306
1530
  * See developers.google.com/maps/documentation/javascript/reference/marker#Marker
1307
1531
  */
1308
1532
  marker?: google.maps.Marker;
1309
- constructor(_googleMap: GoogleMap, _ngZone: NgZone);
1533
+ constructor(...args: unknown[]);
1310
1534
  ngOnInit(): void;
1311
1535
  private _initialize;
1312
1536
  ngOnChanges(changes: SimpleChanges): void;
@@ -1387,105 +1611,45 @@ export declare class MapMarker implements OnInit, OnChanges, OnDestroy, MapAncho
1387
1611
  *
1388
1612
  * See https://developers.google.com/maps/documentation/javascript/marker-clustering
1389
1613
  */
1390
- export declare class MapMarkerClusterer implements OnInit, AfterContentInit, OnChanges, OnDestroy {
1614
+ export declare class MapMarkerClusterer implements OnInit, OnChanges, OnDestroy {
1391
1615
  private readonly _googleMap;
1392
1616
  private readonly _ngZone;
1393
1617
  private readonly _currentMarkers;
1394
- private readonly _eventManager;
1395
- private readonly _destroy;
1618
+ private readonly _closestMapEventManager;
1619
+ private _markersSubscription;
1396
1620
  /** Whether the clusterer is allowed to be initialized. */
1397
1621
  private readonly _canInitialize;
1398
- ariaLabelFn: AriaLabelFn;
1399
- set averageCenter(averageCenter: boolean);
1400
- private _averageCenter;
1401
- batchSize?: number;
1402
- set batchSizeIE(batchSizeIE: number);
1403
- private _batchSizeIE;
1404
- set calculator(calculator: Calculator);
1405
- private _calculator;
1406
- set clusterClass(clusterClass: string);
1407
- private _clusterClass;
1408
- set enableRetinaIcons(enableRetinaIcons: boolean);
1409
- private _enableRetinaIcons;
1410
- set gridSize(gridSize: number);
1411
- private _gridSize;
1412
- set ignoreHidden(ignoreHidden: boolean);
1413
- private _ignoreHidden;
1414
- set imageExtension(imageExtension: string);
1415
- private _imageExtension;
1416
- set imagePath(imagePath: string);
1417
- private _imagePath;
1418
- set imageSizes(imageSizes: number[]);
1419
- private _imageSizes;
1420
- set maxZoom(maxZoom: number);
1421
- private _maxZoom;
1422
- set minimumClusterSize(minimumClusterSize: number);
1423
- private _minimumClusterSize;
1424
- set styles(styles: ClusterIconStyle[]);
1425
- private _styles;
1426
- set title(title: string);
1427
- private _title;
1428
- set zIndex(zIndex: number);
1429
- private _zIndex;
1430
- set zoomOnClick(zoomOnClick: boolean);
1431
- private _zoomOnClick;
1432
- set options(options: MarkerClustererOptions);
1433
- private _options;
1434
1622
  /**
1435
- * See
1436
- * googlemaps.github.io/v3-utility-library/modules/
1437
- * _google_markerclustererplus.html#clusteringbegin
1623
+ * Used to customize how the marker cluster is rendered.
1624
+ * See https://googlemaps.github.io/js-markerclusterer/interfaces/Renderer.html.
1438
1625
  */
1439
- readonly clusteringbegin: Observable<void>;
1626
+ renderer: Renderer;
1440
1627
  /**
1441
- * See
1442
- * googlemaps.github.io/v3-utility-library/modules/_google_markerclustererplus.html#clusteringend
1628
+ * Algorithm used to cluster the markers.
1629
+ * See https://googlemaps.github.io/js-markerclusterer/interfaces/Algorithm.html.
1443
1630
  */
1631
+ algorithm: Algorithm_2;
1632
+ /** Emits when clustering has started. */
1633
+ readonly clusteringbegin: Observable<void>;
1634
+ /** Emits when clustering is done. */
1444
1635
  readonly clusteringend: Observable<void>;
1445
1636
  /** Emits when a cluster has been clicked. */
1446
- readonly clusterClick: Observable<Cluster>;
1447
- _markers: QueryList<MapMarker>;
1448
- /**
1449
- * The underlying MarkerClusterer object.
1450
- *
1451
- * See
1452
- * googlemaps.github.io/v3-utility-library/classes/
1453
- * _google_markerclustererplus.markerclusterer.html
1454
- */
1455
- markerClusterer?: MarkerClusterer;
1456
- /** Event emitted when the clusterer is initialized. */
1637
+ readonly clusterClick: EventEmitter<Cluster>;
1638
+ /** Event emitted when the marker clusterer is initialized. */
1457
1639
  readonly markerClustererInitialized: EventEmitter<MarkerClusterer>;
1458
- constructor(_googleMap: GoogleMap, _ngZone: NgZone);
1459
- ngOnInit(): void;
1460
- ngAfterContentInit(): void;
1461
- ngOnChanges(changes: SimpleChanges): void;
1640
+ _markers: QueryList<MarkerDirective>;
1641
+ /** Underlying MarkerClusterer object used to interact with Google Maps. */
1642
+ markerClusterer?: MarkerClusterer;
1643
+ ngOnInit(): Promise<void>;
1644
+ ngOnChanges(changes: SimpleChanges): Promise<void>;
1462
1645
  ngOnDestroy(): void;
1463
- fitMapToMarkers(padding: number | google.maps.Padding): void;
1464
- getAverageCenter(): boolean;
1465
- getBatchSizeIE(): number;
1466
- getCalculator(): Calculator;
1467
- getClusterClass(): string;
1468
- getClusters(): Cluster[];
1469
- getEnableRetinaIcons(): boolean;
1470
- getGridSize(): number;
1471
- getIgnoreHidden(): boolean;
1472
- getImageExtension(): string;
1473
- getImagePath(): string;
1474
- getImageSizes(): number[];
1475
- getMaxZoom(): number;
1476
- getMinimumClusterSize(): number;
1477
- getStyles(): ClusterIconStyle[];
1478
- getTitle(): string;
1479
- getTotalClusters(): number;
1480
- getTotalMarkers(): number;
1481
- getZIndex(): number;
1482
- getZoomOnClick(): boolean;
1483
- private _combineOptions;
1646
+ private _createCluster;
1484
1647
  private _watchForMarkerChanges;
1648
+ private _destroyCluster;
1485
1649
  private _getInternalMarkers;
1486
1650
  private _assertInitialized;
1487
1651
  static ɵfac: i0.ɵɵFactoryDeclaration<MapMarkerClusterer, never>;
1488
- static ɵcmp: i0.ɵɵComponentDeclaration<MapMarkerClusterer, "map-marker-clusterer", ["mapMarkerClusterer"], { "ariaLabelFn": { "alias": "ariaLabelFn"; "required": false; }; "averageCenter": { "alias": "averageCenter"; "required": false; }; "batchSize": { "alias": "batchSize"; "required": false; }; "batchSizeIE": { "alias": "batchSizeIE"; "required": false; }; "calculator": { "alias": "calculator"; "required": false; }; "clusterClass": { "alias": "clusterClass"; "required": false; }; "enableRetinaIcons": { "alias": "enableRetinaIcons"; "required": false; }; "gridSize": { "alias": "gridSize"; "required": false; }; "ignoreHidden": { "alias": "ignoreHidden"; "required": false; }; "imageExtension": { "alias": "imageExtension"; "required": false; }; "imagePath": { "alias": "imagePath"; "required": false; }; "imageSizes": { "alias": "imageSizes"; "required": false; }; "maxZoom": { "alias": "maxZoom"; "required": false; }; "minimumClusterSize": { "alias": "minimumClusterSize"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "title": { "alias": "title"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "zoomOnClick": { "alias": "zoomOnClick"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "clusteringbegin": "clusteringbegin"; "clusteringend": "clusteringend"; "clusterClick": "clusterClick"; "markerClustererInitialized": "markerClustererInitialized"; }, ["_markers"], ["*"], true, never>;
1652
+ static ɵcmp: i0.ɵɵComponentDeclaration<MapMarkerClusterer, "map-marker-clusterer", ["mapMarkerClusterer"], { "renderer": { "alias": "renderer"; "required": false; }; "algorithm": { "alias": "algorithm"; "required": false; }; }, { "clusteringbegin": "clusteringbegin"; "clusteringend": "clusteringend"; "clusterClick": "clusterClick"; "markerClustererInitialized": "markerClustererInitialized"; }, ["_markers"], ["*"], true, never>;
1489
1653
  }
1490
1654
 
1491
1655
  /**
@@ -1554,7 +1718,7 @@ export declare class MapPolygon implements OnInit, OnDestroy {
1554
1718
  readonly polygonRightclick: Observable<google.maps.PolyMouseEvent>;
1555
1719
  /** Event emitted when the polygon is initialized. */
1556
1720
  readonly polygonInitialized: EventEmitter<google.maps.Polygon>;
1557
- constructor(_map: GoogleMap, _ngZone: NgZone);
1721
+ constructor(...args: unknown[]);
1558
1722
  ngOnInit(): void;
1559
1723
  private _initialize;
1560
1724
  ngOnDestroy(): void;
@@ -1653,7 +1817,7 @@ export declare class MapPolyline implements OnInit, OnDestroy {
1653
1817
  readonly polylineRightclick: Observable<google.maps.PolyMouseEvent>;
1654
1818
  /** Event emitted when the polyline is initialized. */
1655
1819
  readonly polylineInitialized: EventEmitter<google.maps.Polyline>;
1656
- constructor(_map: GoogleMap, _ngZone: NgZone);
1820
+ constructor(...args: unknown[]);
1657
1821
  ngOnInit(): void;
1658
1822
  private _initialize;
1659
1823
  ngOnDestroy(): void;
@@ -1763,7 +1927,7 @@ export declare class MapRectangle implements OnInit, OnDestroy {
1763
1927
  readonly rectangleRightclick: Observable<google.maps.MapMouseEvent>;
1764
1928
  /** Event emitted when the rectangle is initialized. */
1765
1929
  readonly rectangleInitialized: EventEmitter<google.maps.Rectangle>;
1766
- constructor(_map: GoogleMap, _ngZone: NgZone);
1930
+ constructor(...args: unknown[]);
1767
1931
  ngOnInit(): void;
1768
1932
  private _initialize;
1769
1933
  ngOnDestroy(): void;
@@ -1817,7 +1981,7 @@ export declare class MapTrafficLayer implements OnInit, OnDestroy {
1817
1981
  set autoRefresh(autoRefresh: boolean);
1818
1982
  /** Event emitted when the traffic layer is initialized. */
1819
1983
  readonly trafficLayerInitialized: EventEmitter<google.maps.TrafficLayer>;
1820
- constructor(_map: GoogleMap, _ngZone: NgZone);
1984
+ constructor(...args: unknown[]);
1821
1985
  ngOnInit(): void;
1822
1986
  private _initialize;
1823
1987
  ngOnDestroy(): void;
@@ -1852,6 +2016,30 @@ export declare class MapTransitLayer implements OnInit, OnDestroy {
1852
2016
  static ɵdir: i0.ɵɵDirectiveDeclaration<MapTransitLayer, "map-transit-layer", ["mapTransitLayer"], {}, { "transitLayerInitialized": "transitLayerInitialized"; }, never, never, true, never>;
1853
2017
  }
1854
2018
 
2019
+ /** Marker types from the Google Maps API. */
2020
+ declare type Marker = google.maps.Marker | google.maps.marker.AdvancedMarkerElement;
2021
+
2022
+ export declare class MarkerClusterer extends google.maps.OverlayView {
2023
+ onClusterClick: onClusterClickHandler;
2024
+ protected algorithm: Algorithm_2;
2025
+ protected clusters: Cluster[];
2026
+ protected markers: Marker[];
2027
+ protected renderer: Renderer;
2028
+ protected map: google.maps.Map | null;
2029
+ protected idleListener: google.maps.MapsEventListener;
2030
+ constructor({ map, markers, algorithmOptions, algorithm, renderer, onClusterClick, }: MarkerClustererOptions_2);
2031
+ addMarker(marker: Marker, noDraw?: boolean): void;
2032
+ addMarkers(markers: Marker[], noDraw?: boolean): void;
2033
+ removeMarker(marker: Marker, noDraw?: boolean): boolean;
2034
+ removeMarkers(markers: Marker[], noDraw?: boolean): boolean;
2035
+ clearMarkers(noDraw?: boolean): void;
2036
+ render(): void;
2037
+ onAdd(): void;
2038
+ onRemove(): void;
2039
+ protected reset(): void;
2040
+ protected renderClusters(): void;
2041
+ }
2042
+
1855
2043
 
1856
2044
  /// <reference types="google.maps" preserve="true" />
1857
2045
  /**
@@ -1860,7 +2048,7 @@ export declare class MapTransitLayer implements OnInit, OnDestroy {
1860
2048
  * See
1861
2049
  * googlemaps.github.io/v3-utility-library/classes/_google_markerclustererplus.markerclusterer.html
1862
2050
  */
1863
- declare class MarkerClusterer {
2051
+ declare class MarkerClusterer_2 {
1864
2052
  constructor(map: google.maps.Map, markers?: google.maps.Marker[], options?: MarkerClustererOptions);
1865
2053
  ariaLabelFn: AriaLabelFn;
1866
2054
  static BATCH_SIZE: number;
@@ -1869,7 +2057,7 @@ declare class MarkerClusterer {
1869
2057
  static IMAGE_PATH: string;
1870
2058
  static IMAGE_SIZES: number[];
1871
2059
  addListener(eventName: string, handler: Function): google.maps.MapsEventListener;
1872
- addMarker(marker: MarkerClusterer, nodraw: boolean): void;
2060
+ addMarker(marker: MarkerClusterer_2, nodraw: boolean): void;
1873
2061
  addMarkers(markers: google.maps.Marker[], nodraw?: boolean): void;
1874
2062
  bindTo(key: string, target: google.maps.MVCObject, targetKey: string, noNotify: boolean): void;
1875
2063
  changed(key: string): void;
@@ -1880,7 +2068,7 @@ declare class MarkerClusterer {
1880
2068
  getBatchSizeIE(): number;
1881
2069
  getCalculator(): Calculator;
1882
2070
  getClusterClass(): string;
1883
- getClusters(): Cluster[];
2071
+ getClusters(): Cluster_2[];
1884
2072
  getEnableRetinaIcons(): boolean;
1885
2073
  getGridSize(): number;
1886
2074
  getIgnoreHidden(): boolean;
@@ -1929,6 +2117,12 @@ declare class MarkerClusterer {
1929
2117
  static withDefaultStyle(overrides: ClusterIconStyle): ClusterIconStyle;
1930
2118
  }
1931
2119
 
2120
+ export declare enum MarkerClustererEvents {
2121
+ CLUSTERING_BEGIN = "clusteringbegin",
2122
+ CLUSTERING_END = "clusteringend",
2123
+ CLUSTER_CLICK = "click"
2124
+ }
2125
+
1932
2126
  /**
1933
2127
  * Options for constructing a MarkerClusterer from the @google/markerclustererplus library.
1934
2128
  *
@@ -1957,4 +2151,45 @@ export declare interface MarkerClustererOptions {
1957
2151
  zoomOnClick?: boolean;
1958
2152
  }
1959
2153
 
2154
+ declare interface MarkerClustererOptions_2 {
2155
+ markers?: Marker[];
2156
+ /**
2157
+ * An algorithm to cluster markers. Default is {@link SuperClusterAlgorithm}. Must
2158
+ * provide a `calculate` method accepting {@link AlgorithmInput} and returning
2159
+ * an array of {@link Cluster}.
2160
+ */
2161
+ algorithm?: Algorithm_2;
2162
+ algorithmOptions?: AlgorithmOptions;
2163
+ map?: google.maps.Map | null;
2164
+ /**
2165
+ * An object that converts a {@link Cluster} into a `google.maps.Marker`.
2166
+ * Default is {@link DefaultRenderer}.
2167
+ */
2168
+ renderer?: Renderer;
2169
+ onClusterClick?: onClusterClickHandler;
2170
+ }
2171
+
2172
+ /** Interface that should be implemented by directives that wrap marker APIs. */
2173
+ declare interface MarkerDirective {
2174
+ _resolveMarker(): Promise<Marker>;
2175
+ }
2176
+
2177
+ export declare type onClusterClickHandler = (event: google.maps.MapMouseEvent, cluster: Cluster, map: google.maps.Map) => void;
2178
+
2179
+ export declare interface Renderer {
2180
+ /**
2181
+ * Turn a {@link Cluster} into a `Marker`.
2182
+ *
2183
+ * Below is a simple example to create a marker with the number of markers in the cluster as a label.
2184
+ *
2185
+ * ```typescript
2186
+ * return new google.maps.Marker({
2187
+ * position,
2188
+ * label: String(markers.length),
2189
+ * });
2190
+ * ```
2191
+ */
2192
+ render(cluster: Cluster, stats: ClusterStats, map: google.maps.Map): Marker;
2193
+ }
2194
+
1960
2195
  export { }