UNPKG

@ng-maps/core

Version:

**@ng-maps/core** is a simple, modular and tree-shakable library for displaying google-maps inside an angular application

37 lines (36 loc) 1.57 kB
import { BehaviorSubject, Observable } from 'rxjs'; import { BoundsLiteral } from '../interface/bounds'; import { GeoPoint } from '../interface/geo-point'; import { MapsAPILoader } from './maps-api-loader/maps-api-loader'; import * as i0 from "@angular/core"; export interface FitBoundsDetails { latLng: GeoPoint; } /** * @internal */ export type BoundsMap = Map<string, GeoPoint>; /** * Class to implement when you what to be able to make it work with the auto fit bounds feature * of AGM. */ export declare abstract class FitBoundsAccessor { abstract getFitBoundsDetails$(): Observable<FitBoundsDetails>; } /** * The FitBoundsService is responsible for computing the bounds of the a single map. */ export declare abstract class FitBoundsService { protected readonly bounds$: Observable<BoundsLiteral>; protected readonly _boundsChangeSampleTime$: BehaviorSubject<number>; protected readonly _includeInBounds$: BehaviorSubject<BoundsMap>; constructor(loader: MapsAPILoader); protected abstract generateBounds(includeInBounds: Map<string, GeoPoint>): BoundsLiteral; addToBounds(latLng: GeoPoint): void; removeFromBounds(latLng: google.maps.LatLng | google.maps.LatLngLiteral): void; changeFitBoundsChangeSampleTime(timeMs: number): void; getBounds$(): Observable<BoundsLiteral>; protected _createIdentifier(latLng: google.maps.LatLng | google.maps.LatLngLiteral): string; static ɵfac: i0.ɵɵFactoryDeclaration<FitBoundsService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<FitBoundsService>; }