TomTom Maps for JavaScript
    Preparing search index...

    Type Alias CustomGeoJSONSourceSpec

    The configuration of one logical source that a CustomGeoJSONModule manages.

    Each entry is a single MapLibre GeoJSON source and its layers.

    type CustomGeoJSONSourceSpec = {
        cluster?: GeoJSONSourceClusterOptions;
        layers: CustomGeoJSONLayerSpec[];
        sourceID?: string;
    }
    Index
    cluster?: GeoJSONSourceClusterOptions

    MapLibre cluster options, forwarded verbatim to the underlying GeoJSON source.

    Cluster options are applied at source creation time and cannot be changed via CustomGeoJSONModule.applyConfig. To change clustering, recreate the module.

    A cluster is not among the shown features, so an event handler receives the rendered MapLibre feature for it, with cluster, cluster_id and point_count in its properties.

    The layers that render this source. CustomGeoJSONModule.create rejects a source without layers.

    sourceID?: string

    The MapLibre source ID. If absent, it is auto-generated as custom-geojson-${instanceIndex}-${sourceName}. It is fixed at creation, like the source names.