@angular/google-maps 19.0.0-next.8 → 19.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.
package/index.d.ts
CHANGED
|
@@ -11,6 +11,49 @@ import { OnInit } from '@angular/core';
|
|
|
11
11
|
import { QueryList } from '@angular/core';
|
|
12
12
|
import { SimpleChanges } from '@angular/core';
|
|
13
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
|
+
|
|
14
57
|
/**
|
|
15
58
|
* Function type alias for determining the aria label on a Google Maps marker cluster.
|
|
16
59
|
*
|
|
@@ -25,13 +68,34 @@ export declare type AriaLabelFn = (text: string) => string;
|
|
|
25
68
|
*/
|
|
26
69
|
export declare type Calculator = (markers: google.maps.Marker[], clusterIconStylesCount: number) => ClusterIconInfo;
|
|
27
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
|
+
|
|
28
92
|
/**
|
|
29
93
|
* Cluster class from the @google/markerclustererplus library.
|
|
30
94
|
*
|
|
31
95
|
* See googlemaps.github.io/v3-utility-library/classes/_google_markerclustererplus.cluster.html
|
|
32
96
|
*/
|
|
33
|
-
declare class
|
|
34
|
-
constructor(markerClusterer:
|
|
97
|
+
declare class Cluster_2 {
|
|
98
|
+
constructor(markerClusterer: MarkerClusterer_2);
|
|
35
99
|
getCenter(): google.maps.LatLng;
|
|
36
100
|
getMarkers(): google.maps.Marker[];
|
|
37
101
|
getSize(): number;
|
|
@@ -75,6 +139,27 @@ export declare interface ClusterIconStyle {
|
|
|
75
139
|
width: number;
|
|
76
140
|
}
|
|
77
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
|
+
|
|
78
163
|
/** Arbitrary default height for the map element */
|
|
79
164
|
declare const DEFAULT_HEIGHT = "500px";
|
|
80
165
|
|
|
@@ -106,6 +191,118 @@ declare const DEFAULT_OPTIONS: google.maps.MapOptions;
|
|
|
106
191
|
/** Arbitrary default width for the map element */
|
|
107
192
|
declare const DEFAULT_WIDTH = "500px";
|
|
108
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
|
+
|
|
109
306
|
/**
|
|
110
307
|
* Angular component that renders a Google Map via the Google Maps JavaScript
|
|
111
308
|
* API.
|
|
@@ -345,7 +542,7 @@ export declare class GoogleMap implements OnChanges, OnInit, OnDestroy {
|
|
|
345
542
|
|
|
346
543
|
export declare class GoogleMapsModule {
|
|
347
544
|
static ɵfac: i0.ɵɵFactoryDeclaration<GoogleMapsModule, never>;
|
|
348
|
-
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.
|
|
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]>;
|
|
349
546
|
static ɵinj: i0.ɵɵInjectorDeclaration<GoogleMapsModule>;
|
|
350
547
|
}
|
|
351
548
|
|
|
@@ -377,7 +574,7 @@ declare namespace i11 {
|
|
|
377
574
|
|
|
378
575
|
declare namespace i12 {
|
|
379
576
|
export {
|
|
380
|
-
|
|
577
|
+
DeprecatedMapMarkerClusterer
|
|
381
578
|
}
|
|
382
579
|
}
|
|
383
580
|
|
|
@@ -411,6 +608,12 @@ declare namespace i17 {
|
|
|
411
608
|
}
|
|
412
609
|
}
|
|
413
610
|
|
|
611
|
+
declare namespace i18 {
|
|
612
|
+
export {
|
|
613
|
+
MapMarkerClusterer
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
414
617
|
declare namespace i2 {
|
|
415
618
|
export {
|
|
416
619
|
MapBaseLayer
|
|
@@ -465,7 +668,7 @@ declare namespace i9 {
|
|
|
465
668
|
*
|
|
466
669
|
* See developers.google.com/maps/documentation/javascript/reference/marker
|
|
467
670
|
*/
|
|
468
|
-
export declare class MapAdvancedMarker implements OnInit, OnChanges, OnDestroy, MapAnchorPoint {
|
|
671
|
+
export declare class MapAdvancedMarker implements OnInit, OnChanges, OnDestroy, MapAnchorPoint, MarkerDirective {
|
|
469
672
|
private readonly _googleMap;
|
|
470
673
|
private _ngZone;
|
|
471
674
|
private _eventManager;
|
|
@@ -562,6 +765,8 @@ export declare class MapAdvancedMarker implements OnInit, OnChanges, OnDestroy,
|
|
|
562
765
|
ngOnChanges(changes: SimpleChanges): void;
|
|
563
766
|
ngOnDestroy(): void;
|
|
564
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>;
|
|
565
770
|
/** Creates a combined options object using the passed-in options and the individual inputs. */
|
|
566
771
|
private _combineOptions;
|
|
567
772
|
/** Asserts that the map has been initialized. */
|
|
@@ -1166,7 +1371,7 @@ export declare class MapKmlLayer implements OnInit, OnDestroy {
|
|
|
1166
1371
|
*
|
|
1167
1372
|
* See developers.google.com/maps/documentation/javascript/reference/marker
|
|
1168
1373
|
*/
|
|
1169
|
-
export declare class MapMarker implements OnInit, OnChanges, OnDestroy, MapAnchorPoint {
|
|
1374
|
+
export declare class MapMarker implements OnInit, OnChanges, OnDestroy, MapAnchorPoint, MarkerDirective {
|
|
1170
1375
|
private readonly _googleMap;
|
|
1171
1376
|
private _ngZone;
|
|
1172
1377
|
private _eventManager;
|
|
@@ -1406,105 +1611,45 @@ export declare class MapMarker implements OnInit, OnChanges, OnDestroy, MapAncho
|
|
|
1406
1611
|
*
|
|
1407
1612
|
* See https://developers.google.com/maps/documentation/javascript/marker-clustering
|
|
1408
1613
|
*/
|
|
1409
|
-
export declare class MapMarkerClusterer implements OnInit,
|
|
1614
|
+
export declare class MapMarkerClusterer implements OnInit, OnChanges, OnDestroy {
|
|
1410
1615
|
private readonly _googleMap;
|
|
1411
1616
|
private readonly _ngZone;
|
|
1412
1617
|
private readonly _currentMarkers;
|
|
1413
|
-
private readonly
|
|
1414
|
-
private
|
|
1618
|
+
private readonly _closestMapEventManager;
|
|
1619
|
+
private _markersSubscription;
|
|
1415
1620
|
/** Whether the clusterer is allowed to be initialized. */
|
|
1416
1621
|
private readonly _canInitialize;
|
|
1417
|
-
ariaLabelFn: AriaLabelFn;
|
|
1418
|
-
set averageCenter(averageCenter: boolean);
|
|
1419
|
-
private _averageCenter;
|
|
1420
|
-
batchSize?: number;
|
|
1421
|
-
set batchSizeIE(batchSizeIE: number);
|
|
1422
|
-
private _batchSizeIE;
|
|
1423
|
-
set calculator(calculator: Calculator);
|
|
1424
|
-
private _calculator;
|
|
1425
|
-
set clusterClass(clusterClass: string);
|
|
1426
|
-
private _clusterClass;
|
|
1427
|
-
set enableRetinaIcons(enableRetinaIcons: boolean);
|
|
1428
|
-
private _enableRetinaIcons;
|
|
1429
|
-
set gridSize(gridSize: number);
|
|
1430
|
-
private _gridSize;
|
|
1431
|
-
set ignoreHidden(ignoreHidden: boolean);
|
|
1432
|
-
private _ignoreHidden;
|
|
1433
|
-
set imageExtension(imageExtension: string);
|
|
1434
|
-
private _imageExtension;
|
|
1435
|
-
set imagePath(imagePath: string);
|
|
1436
|
-
private _imagePath;
|
|
1437
|
-
set imageSizes(imageSizes: number[]);
|
|
1438
|
-
private _imageSizes;
|
|
1439
|
-
set maxZoom(maxZoom: number);
|
|
1440
|
-
private _maxZoom;
|
|
1441
|
-
set minimumClusterSize(minimumClusterSize: number);
|
|
1442
|
-
private _minimumClusterSize;
|
|
1443
|
-
set styles(styles: ClusterIconStyle[]);
|
|
1444
|
-
private _styles;
|
|
1445
|
-
set title(title: string);
|
|
1446
|
-
private _title;
|
|
1447
|
-
set zIndex(zIndex: number);
|
|
1448
|
-
private _zIndex;
|
|
1449
|
-
set zoomOnClick(zoomOnClick: boolean);
|
|
1450
|
-
private _zoomOnClick;
|
|
1451
|
-
set options(options: MarkerClustererOptions);
|
|
1452
|
-
private _options;
|
|
1453
1622
|
/**
|
|
1454
|
-
*
|
|
1455
|
-
* googlemaps.github.io/
|
|
1456
|
-
* _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.
|
|
1457
1625
|
*/
|
|
1458
|
-
|
|
1626
|
+
renderer: Renderer;
|
|
1459
1627
|
/**
|
|
1460
|
-
*
|
|
1461
|
-
* googlemaps.github.io/
|
|
1628
|
+
* Algorithm used to cluster the markers.
|
|
1629
|
+
* See https://googlemaps.github.io/js-markerclusterer/interfaces/Algorithm.html.
|
|
1462
1630
|
*/
|
|
1631
|
+
algorithm: Algorithm_2;
|
|
1632
|
+
/** Emits when clustering has started. */
|
|
1633
|
+
readonly clusteringbegin: Observable<void>;
|
|
1634
|
+
/** Emits when clustering is done. */
|
|
1463
1635
|
readonly clusteringend: Observable<void>;
|
|
1464
1636
|
/** Emits when a cluster has been clicked. */
|
|
1465
|
-
readonly clusterClick:
|
|
1466
|
-
|
|
1467
|
-
/**
|
|
1468
|
-
* The underlying MarkerClusterer object.
|
|
1469
|
-
*
|
|
1470
|
-
* See
|
|
1471
|
-
* googlemaps.github.io/v3-utility-library/classes/
|
|
1472
|
-
* _google_markerclustererplus.markerclusterer.html
|
|
1473
|
-
*/
|
|
1474
|
-
markerClusterer?: MarkerClusterer;
|
|
1475
|
-
/** Event emitted when the clusterer is initialized. */
|
|
1637
|
+
readonly clusterClick: EventEmitter<Cluster>;
|
|
1638
|
+
/** Event emitted when the marker clusterer is initialized. */
|
|
1476
1639
|
readonly markerClustererInitialized: EventEmitter<MarkerClusterer>;
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
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>;
|
|
1481
1645
|
ngOnDestroy(): void;
|
|
1482
|
-
|
|
1483
|
-
getAverageCenter(): boolean;
|
|
1484
|
-
getBatchSizeIE(): number;
|
|
1485
|
-
getCalculator(): Calculator;
|
|
1486
|
-
getClusterClass(): string;
|
|
1487
|
-
getClusters(): Cluster[];
|
|
1488
|
-
getEnableRetinaIcons(): boolean;
|
|
1489
|
-
getGridSize(): number;
|
|
1490
|
-
getIgnoreHidden(): boolean;
|
|
1491
|
-
getImageExtension(): string;
|
|
1492
|
-
getImagePath(): string;
|
|
1493
|
-
getImageSizes(): number[];
|
|
1494
|
-
getMaxZoom(): number;
|
|
1495
|
-
getMinimumClusterSize(): number;
|
|
1496
|
-
getStyles(): ClusterIconStyle[];
|
|
1497
|
-
getTitle(): string;
|
|
1498
|
-
getTotalClusters(): number;
|
|
1499
|
-
getTotalMarkers(): number;
|
|
1500
|
-
getZIndex(): number;
|
|
1501
|
-
getZoomOnClick(): boolean;
|
|
1502
|
-
private _combineOptions;
|
|
1646
|
+
private _createCluster;
|
|
1503
1647
|
private _watchForMarkerChanges;
|
|
1648
|
+
private _destroyCluster;
|
|
1504
1649
|
private _getInternalMarkers;
|
|
1505
1650
|
private _assertInitialized;
|
|
1506
1651
|
static ɵfac: i0.ɵɵFactoryDeclaration<MapMarkerClusterer, never>;
|
|
1507
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MapMarkerClusterer, "map-marker-clusterer", ["mapMarkerClusterer"], { "
|
|
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>;
|
|
1508
1653
|
}
|
|
1509
1654
|
|
|
1510
1655
|
/**
|
|
@@ -1871,6 +2016,30 @@ export declare class MapTransitLayer implements OnInit, OnDestroy {
|
|
|
1871
2016
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MapTransitLayer, "map-transit-layer", ["mapTransitLayer"], {}, { "transitLayerInitialized": "transitLayerInitialized"; }, never, never, true, never>;
|
|
1872
2017
|
}
|
|
1873
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
|
+
|
|
1874
2043
|
|
|
1875
2044
|
/// <reference types="google.maps" preserve="true" />
|
|
1876
2045
|
/**
|
|
@@ -1879,7 +2048,7 @@ export declare class MapTransitLayer implements OnInit, OnDestroy {
|
|
|
1879
2048
|
* See
|
|
1880
2049
|
* googlemaps.github.io/v3-utility-library/classes/_google_markerclustererplus.markerclusterer.html
|
|
1881
2050
|
*/
|
|
1882
|
-
declare class
|
|
2051
|
+
declare class MarkerClusterer_2 {
|
|
1883
2052
|
constructor(map: google.maps.Map, markers?: google.maps.Marker[], options?: MarkerClustererOptions);
|
|
1884
2053
|
ariaLabelFn: AriaLabelFn;
|
|
1885
2054
|
static BATCH_SIZE: number;
|
|
@@ -1888,7 +2057,7 @@ declare class MarkerClusterer {
|
|
|
1888
2057
|
static IMAGE_PATH: string;
|
|
1889
2058
|
static IMAGE_SIZES: number[];
|
|
1890
2059
|
addListener(eventName: string, handler: Function): google.maps.MapsEventListener;
|
|
1891
|
-
addMarker(marker:
|
|
2060
|
+
addMarker(marker: MarkerClusterer_2, nodraw: boolean): void;
|
|
1892
2061
|
addMarkers(markers: google.maps.Marker[], nodraw?: boolean): void;
|
|
1893
2062
|
bindTo(key: string, target: google.maps.MVCObject, targetKey: string, noNotify: boolean): void;
|
|
1894
2063
|
changed(key: string): void;
|
|
@@ -1899,7 +2068,7 @@ declare class MarkerClusterer {
|
|
|
1899
2068
|
getBatchSizeIE(): number;
|
|
1900
2069
|
getCalculator(): Calculator;
|
|
1901
2070
|
getClusterClass(): string;
|
|
1902
|
-
getClusters():
|
|
2071
|
+
getClusters(): Cluster_2[];
|
|
1903
2072
|
getEnableRetinaIcons(): boolean;
|
|
1904
2073
|
getGridSize(): number;
|
|
1905
2074
|
getIgnoreHidden(): boolean;
|
|
@@ -1948,6 +2117,12 @@ declare class MarkerClusterer {
|
|
|
1948
2117
|
static withDefaultStyle(overrides: ClusterIconStyle): ClusterIconStyle;
|
|
1949
2118
|
}
|
|
1950
2119
|
|
|
2120
|
+
export declare enum MarkerClustererEvents {
|
|
2121
|
+
CLUSTERING_BEGIN = "clusteringbegin",
|
|
2122
|
+
CLUSTERING_END = "clusteringend",
|
|
2123
|
+
CLUSTER_CLICK = "click"
|
|
2124
|
+
}
|
|
2125
|
+
|
|
1951
2126
|
/**
|
|
1952
2127
|
* Options for constructing a MarkerClusterer from the @google/markerclustererplus library.
|
|
1953
2128
|
*
|
|
@@ -1976,4 +2151,45 @@ export declare interface MarkerClustererOptions {
|
|
|
1976
2151
|
zoomOnClick?: boolean;
|
|
1977
2152
|
}
|
|
1978
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
|
+
|
|
1979
2195
|
export { }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/google-maps",
|
|
3
|
-
"version": "19.0.0-
|
|
3
|
+
"version": "19.0.0-rc.0",
|
|
4
4
|
"description": "Angular Google Maps",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,7 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"schematics": "./schematics/collection.json",
|
|
30
|
-
"ng-update": {
|
|
30
|
+
"ng-update": {
|
|
31
|
+
"migrations": "./schematics/migration.json",
|
|
32
|
+
"packageGroup": [
|
|
33
|
+
"@angular/google-maps"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
31
36
|
"module": "./fesm2022/google-maps.mjs",
|
|
32
37
|
"typings": "./index.d.ts",
|
|
33
38
|
"type": "module",
|