1 | import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChange } from '@angular/core';
|
2 | import { ClusterManager } from '../services/managers/cluster-manager';
|
3 | import { CalculateFunction, ClusterOptions, ClusterStyle } from '../services/google-clusterer-types';
|
4 | /**
|
5 | * AgmMarkerCluster clusters map marker if they are near together
|
6 | *
|
7 | * ### Example
|
8 | * ```typescript
|
9 | * import { Component } from '@angular/core';
|
10 | *
|
11 | * @Component({
|
12 | * selector: 'my-map-cmp',
|
13 | * styles: [`
|
14 | * agm-map {
|
15 | * height: 300px;
|
16 | * }
|
17 | * `],
|
18 | * template: `
|
19 | * <agm-map [latitude]="lat" [longitude]="lng" [zoom]="zoom">
|
20 | * <agm-marker-cluster>
|
21 | * <agm-marker [latitude]="lat" [longitude]="lng" [label]="'M'">
|
22 | * </agm-marker>
|
23 | * <agm-marker [latitude]="lat2" [longitude]="lng2" [label]="'N'">
|
24 | * </agm-marker>
|
25 | * </agm-marker-cluster>
|
26 | * </agm-map>
|
27 | * `
|
28 | * })
|
29 | * ```
|
30 | */
|
31 | export declare class AgmMarkerCluster implements OnDestroy, OnChanges, OnInit, ClusterOptions {
|
32 | private _clusterManager;
|
33 | /**
|
34 | * The grid size of a cluster in pixels
|
35 | */
|
36 | gridSize: number;
|
37 | /**
|
38 | * The maximum zoom level that a marker can be part of a cluster.
|
39 | */
|
40 | maxZoom: number;
|
41 | /**
|
42 | * Whether the default behaviour of clicking on a cluster is to zoom into it.
|
43 | */
|
44 | zoomOnClick: boolean;
|
45 | /**
|
46 | * Whether the center of each cluster should be the average of all markers in the cluster.
|
47 | */
|
48 | averageCenter: boolean;
|
49 | /**
|
50 | * The minimum number of markers to be in a cluster before the markers are hidden and a count is shown.
|
51 | */
|
52 | minimumClusterSize: number;
|
53 | /**
|
54 | * An object that has style properties.
|
55 | */
|
56 | styles: ClusterStyle[];
|
57 | /**
|
58 | * A function that calculates the cluster style and text based on the markers in the cluster.
|
59 | */
|
60 | calculator: CalculateFunction;
|
61 | imagePath: string;
|
62 | imageExtension: string;
|
63 | clusterClick: EventEmitter<void>;
|
64 | private _observableSubscriptions;
|
65 | constructor(_clusterManager: ClusterManager);
|
66 | /** @internal */
|
67 | ngOnDestroy(): void;
|
68 | /** @internal */
|
69 | ngOnChanges(changes: {
|
70 | [key: string]: SimpleChange;
|
71 | }): void;
|
72 | private _addEventListeners;
|
73 | /** @internal */
|
74 | ngOnInit(): void;
|
75 | }
|