UNPKG

@maplibre/ngx-maplibre-gl

Version:
64 lines (63 loc) 2.75 kB
import { TemplateRef } from '@angular/core'; import type { MapGeoJSONFeature, QueryRenderedFeaturesOptions } from 'maplibre-gl'; import * as i0 from "@angular/core"; /** * a template directive for point for {@link MarkersForClustersComponent} * * @category Directives */ export declare class PointDirective { static ɵfac: i0.ɵɵFactoryDeclaration<PointDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<PointDirective, "ng-template[mglPoint]", never, {}, {}, never, never, true, never>; } /** * a template directive for clustered point for {@link MarkersForClustersComponent} * * @category Directives */ export declare class ClusterPointDirective { static ɵfac: i0.ɵɵFactoryDeclaration<ClusterPointDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<ClusterPointDirective, "ng-template[mglClusterPoint]", never, {}, {}, never, never, true, never>; } /** * [ngx] `mgl-markers-for-clusters` - an HTML marker component for clustered points. * Requires a geojson source that is clustered. * * @category Components * * @example * ```html * ... * <mgl-map ...> * <mgl-markers-for-cluster [source]="myGeoJsonclusteredSource"> * <ng-template mglPoint let-feature> Marker! </ng-template> * <ng-template mglClusterPoint let-feature> * ClusterId: {{feature.properties?.cluster_id}}, Points: * {{feature.properties?.point_count}} * </ng-template> * </mgl-markers-for-cluster> * </mgl-map> * ``` * * Note: Only use this if you **really** need to use HTML/Angular component to render your symbols. This is **slower** than rendering symbols in WebGL. */ export declare class MarkersForClustersComponent { private readonly destroyRef; private readonly mapService; private readonly ngZone; /** Init input */ readonly source: import("@angular/core").InputSignal<string>; /** @hidden */ readonly pointTpl: import("@angular/core").Signal<TemplateRef<PointDirective> | undefined>; /** @hidden */ readonly clusterPointTpl: import("@angular/core").Signal<TemplateRef<ClusterPointDirective> | undefined>; /** @hidden */ readonly clusterPoints: import("@angular/core").WritableSignal<MapGeoJSONFeature[]>; /** @hidden */ readonly layerId: string; constructor(); private updateCluster; getClusterParams(pointTpl: TemplateRef<PointDirective> | undefined): QueryRenderedFeaturesOptions; static ɵfac: i0.ɵɵFactoryDeclaration<MarkersForClustersComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MarkersForClustersComponent, "mgl-markers-for-clusters", never, { "source": { "alias": "source"; "required": true; "isSignal": true; }; }, {}, ["pointTpl", "clusterPointTpl"], never, true, never>; }