UNPKG

@maplibre/ngx-maplibre-gl

Version:
51 lines (50 loc) 1.7 kB
import { ElementRef, OnDestroy } from '@angular/core'; import type { ControlPosition, IControl } from 'maplibre-gl'; import * as i0 from "@angular/core"; export declare class CustomControl implements IControl { private container; constructor(container: HTMLElement); /** @inheritdoc */ onAdd(): HTMLElement; /** @inheritdoc */ onRemove(): HTMLElement; /** @inheritdoc */ getDefaultPosition(): ControlPosition; } /** * `mgl-control` - a custom control component * @see [Controls](https://maplibre.org/maplibre-gl-js/docs/API/interfaces/IControl/) * * @category Components * * @example * ```html * ... * <mgl-map ...> * <mgl-control> Hello </mgl-control> * ... * <mgl-control mglNavigation></mgl-control> * ... * <mgl-control mglScale unit="imperial" position="top-right"></mgl-control> * ... * <mgl-control * mglTerrain * source="rasterDemSource" * exaggeration="3.1" * ></mgl-control> * </mgl-map> * ``` */ export declare class ControlComponent<T extends IControl> implements OnDestroy { /** Init injection */ private readonly mapService; /** Init input */ readonly position: import("@angular/core").InputSignal<ControlPosition | undefined>; /** @hidden */ readonly content: import("@angular/core").Signal<ElementRef<HTMLDivElement>>; control: T | CustomControl; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ControlComponent<any>, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ControlComponent<any>, "mgl-control", never, { "position": { "alias": "position"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>; }