@maplibre/ngx-maplibre-gl

    Class GeoJSONSourceComponent

    mgl-geojson-source - a geojson source component

    ...
    <mgl-map ...>
    <mgl-geojson-source id="symbols-source">
    <mgl-feature
    *ngFor="let geometry of geometries"
    [geometry]="geometry"
    ></mgl-feature>
    </mgl-geojson-source>
    ...
    <mgl-geojson-source
    id="earthquakes"
    [data]="earthquakes"
    [cluster]="true"
    [clusterMaxZoom]="14"
    [clusterRadius]="50"
    ></mgl-geojson-source>
    </mgl-map>

    Implements

    • OnChanges
    Index

    Constructors

    Properties

    attribution: InputSignal<undefined | string> = ...

    Dynamic input

    buffer: InputSignal<undefined | number> = ...

    Dynamic input

    cluster: InputSignal<undefined | boolean> = ...

    Dynamic input

    clusterMaxZoom: InputSignal<undefined | number> = ...

    Dynamic input

    clusterMinPoints: InputSignal<undefined | number> = ...

    Dynamic input

    clusterProperties: InputSignal<unknown> = ...

    Dynamic input

    clusterRadius: InputSignal<undefined | number> = ...

    Dynamic input

    data: InputSignal<string | GeoJSON<Geometry, GeoJsonProperties>> = ...

    Dynamic input

    filter: InputSignal<unknown> = ...

    Dynamic input

    generateId: InputSignal<undefined | boolean> = ...

    Dynamic input

    lineMetrics: InputSignal<undefined | boolean> = ...

    Dynamic input

    maxzoom: InputSignal<undefined | number> = ...

    Dynamic input

    promoteId: InputSignal<undefined | PromoteIdSpecification> = ...

    Dynamic input

    tolerance: InputSignal<undefined | number> = ...

    Dynamic input

    Methods

    • For clustered sources, fetches the children of the given cluster on the next zoom level (as an array of GeoJSON features).

      Parameters

      • clusterId: number

        The value of the cluster's cluster_id property.

      Returns Promise<Feature<Geometry, GeoJsonProperties>[]>

    • For clustered sources, fetches the original points that belong to the cluster (as an array of GeoJSON features).

      Parameters

      • clusterId: number

        The value of the cluster's cluster_id property.

      • limit: number

        The maximum number of features to return.

      • offset: number

        The number of features to skip (e.g. for pagination).

      Returns Promise<Feature<Geometry, GeoJsonProperties>[]>

    • A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.

      Parameters

      • changes: SimpleChanges

        The changed properties.

      Returns void

    MMNEPVFCICPMFPCPTTAAATR