UNPKG

1.4 kBTypeScriptView Raw
1/// <reference types="googlemaps" />
2import { BehaviorSubject, Observable } from 'rxjs';
3import { MapsAPILoader } from './maps-api-loader/maps-api-loader';
4export interface FitBoundsDetails {
5 latLng: google.maps.LatLng | google.maps.LatLngLiteral;
6}
7/**
8 * @internal
9 */
10export declare type BoundsMap = Map<string, google.maps.LatLng | google.maps.LatLngLiteral>;
11/**
12 * Class to implement when you what to be able to make it work with the auto fit bounds feature
13 * of AGM.
14 */
15export declare abstract class FitBoundsAccessor {
16 abstract getFitBoundsDetails$(): Observable<FitBoundsDetails>;
17}
18/**
19 * The FitBoundsService is responsible for computing the bounds of the a single map.
20 */
21export declare class FitBoundsService {
22 protected readonly bounds$: Observable<google.maps.LatLngBounds>;
23 protected readonly _boundsChangeSampleTime$: BehaviorSubject<number>;
24 protected readonly _includeInBounds$: BehaviorSubject<BoundsMap>;
25 constructor(loader: MapsAPILoader);
26 private _generateBounds;
27 addToBounds(latLng: google.maps.LatLng | google.maps.LatLngLiteral): void;
28 removeFromBounds(latLng: google.maps.LatLng | google.maps.LatLngLiteral): void;
29 changeFitBoundsChangeSampleTime(timeMs: number): void;
30 getBounds$(): Observable<google.maps.LatLngBounds>;
31 protected _createIdentifier(latLng: google.maps.LatLng | google.maps.LatLngLiteral): string;
32}