UNPKG

@ng-maps/core

Version:

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

45 lines (44 loc) 1.67 kB
import { OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'; import { FitBoundsAccessor, FitBoundsService } from '../services/fit-bounds'; import * as i0 from "@angular/core"; /** * Adds the given directive to the auto fit bounds feature when the value is true. * To make it work with you custom AGM component, you also have to implement the {@link FitBoundsAccessor} abstract class. * * @example * <map-marker [mapFitBounds]="true"></map-marker> */ export declare class NgMapsFitBoundsDirective implements OnInit, OnDestroy, OnChanges { private readonly _fitBoundsAccessor; private readonly _fitBoundsService; /** * If the value is true, the element gets added to the bounds of the map. * Default: true. */ mapFitBounds: boolean; private _latestFitBoundsDetails; private subscription; constructor(_fitBoundsAccessor: FitBoundsAccessor, _fitBoundsService: FitBoundsService); /** * @internal */ ngOnChanges(changes: SimpleChanges): void; /** * @internal */ ngOnInit(): void; /** * Either the location changed, or visible status changed. * Possible state changes are * invisible -> visible * visible -> invisible * visible -> visible (new location) */ private _updateBounds; /** * @internal */ ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<NgMapsFitBoundsDirective, [{ self: true; }, null]>; static ɵdir: i0.ɵɵDirectiveDeclaration<NgMapsFitBoundsDirective, "[mapFitBounds]", never, { "mapFitBounds": { "alias": "mapFitBounds"; "required": false; }; }, {}, never, never, false, never>; }