GeoLeaf Core API - v3.0.0
    Preparing search index...

    Click handlers for a clustered POI source.

    The two cases are distinct on purpose: clicking a cluster usually zooms in, clicking a point opens a feature. Both receive the coordinates so a popup can be anchored without a second lookup.

    interface PoiEventHandlers {
        onPointClick?: (
            feature: MapGeoJSONFeature,
            lngLat: { lng: number; lat: number },
        ) => void;
        onClusterClick?: (
            feature: MapGeoJSONFeature,
            lngLat: { lng: number; lat: number },
        ) => void;
    }
    Index

    Properties

    onPointClick?: (
        feature: MapGeoJSONFeature,
        lngLat: { lng: number; lat: number },
    ) => void

    Called when an unclustered point is clicked. Receives the feature and coordinates.

    onClusterClick?: (
        feature: MapGeoJSONFeature,
        lngLat: { lng: number; lat: number },
    ) => void

    Called when a cluster is clicked. Receives the cluster feature and coordinates.