XYZ Maps Documentation
    Preparing search index...

    Interface ClusterTileLayerOptions

    Options for configuring a ClusterTileLayer.

    interface ClusterTileLayerOptions {
        aggregateProperties?: (
            clusterProperties: ClusterFeatureProperties,
            featureProperties: { [name: string]: any },
            operation: "add" | "remove",
        ) => void;
        attribution?: string | DataSourceAttribution | DataSourceAttribution[];
        clusterMaxZoom?: number;
        clusterRadius?: number;
        createProperties?: (
            feature: { [name: string]: any },
        ) => ClusterFeatureProperties;
        margin?: number;
        max?: number;
        maxDataZoom?: number;
        min?: number;
        name?: string;
        pointerEvents?: boolean;
        provider: FeatureProvider;
        style?: LayerStyle;
        tileSize?: number;
        visible?: boolean;
    }

    Hierarchy (View Summary)

    Index
    aggregateProperties?: (
        clusterProperties: ClusterFeatureProperties,
        featureProperties: { [name: string]: any },
        operation: "add" | "remove",
    ) => void

    Use this function to aggregate cluster properties whenever a feature is being added or removed to the cluster.

    Type Declaration

      • (
            clusterProperties: ClusterFeatureProperties,
            featureProperties: { [name: string]: any },
            operation: "add" | "remove",
        ): void
      • Parameters

        • clusterProperties: ClusterFeatureProperties

          The properties of the cluster.

        • featureProperties: { [name: string]: any }

          The properties of the feature being added or removed.

        • operation: "add" | "remove"

          The operation being performed ('add' or 'remove').

        Returns void

    attribution?: string | DataSourceAttribution | DataSourceAttribution[]

    Attribution information for data sources used by this layer.

    Attributions are automatically displayed or hidden depending on whether the corresponding data is currently active or visible on the map — e.g., based on zoom level, layer visibility, or usage. This ensures that only active data providers are credited, as required by licensing.

    Can be a simple string (displayed as static text), or an array of structured attribution entries that support clickable labels and optional tooltips.

    // Simple attribution string
    attribution: "© Data Provider"
    // Multiple detailed attributions
    attribution: [
    {
    label: "© Elevation Provider",
    url: "https://elevation.example.com",
    title: "Elevation data source"
    },
    {
    label: "Imagery © HERE Maps",
    url: "https://www.here.com",
    title: "Satellite imagery by HERE"
    }
    ]
    clusterMaxZoom?: number

    Specifies the maximum zoom level at which data should be clustered. If not defined, it defaults to zoom level 13. When the map zoom level exceeds the clusterMaxZoom, raw data features will be displayed instead of clusters.

    13
    
    clusterRadius?: number

    Defines the radius, in pixels, within which features should be clustered. The default value is 32 pixels.

    32
    
    createProperties?: (
        feature: { [name: string]: any },
    ) => ClusterFeatureProperties

    This function generates the initial properties of a cluster. Please note that defined Properties in ClusterFeatureProperties are considered as readonly and are not allowed to be set. If the function is not defined, the default implementation returns an empty object.

    margin?: number

    tileMargin that should be applied to all providers of the layer.

    max?: number

    The maximum zoom level at which data from the TileLayer will be displayed.

    maxDataZoom?: number

    Maximum zoom level at which actual tile data is available from the data source.

    When the map is zoomed beyond this level, the layer will load tiles at maxDataZoom instead of the current viewport zoom level. This avoids unnecessary tile requests for zoom levels where no data exists.

    For example, if terrain data is only available up to zoom 15 but the map is at zoom 17, the display will request zoom-15 tiles and scale them up, while other layers (e.g., imagery) can still load tiles at zoom 17.

    Same as TileLayerOptions.max — tiles are loaded up to the layer's maximum visibility zoom level.

    min?: number

    minimum zoom level at which data from the TileLayer will be displayed.

    name?: string

    Name of the TileLayer.

    pointerEvents?: boolean

    Determines whether pointer events are enabled for all features of the layer.

    false
    
    provider: FeatureProvider

    The data provider supplying the data to be clustered.

    style?: LayerStyle

    Style for rendering features in this layer.

    tileSize?: number

    the size of the tile data in pixel.

    512
    
    visible?: boolean

    Indicates whether the layer should be visible (true) or hidden (false).

    true