@maplibre/geojson-vt
    Preparing search index...

    Class GeoJSONVT

    Main class for creating and managing a vector tile index from GeoJSON data.

    Index

    Constructors

    Accessors

    • get stats(): any
      Internal

      This is for the tests

      Returns any

    • get tiles(): any
      Internal

      This is for the tests

      Returns any

    • get total(): any
      Internal

      This is for the tests

      Returns any

    Methods

    • Returns the immediate children (clusters or points) of a cluster as GeoJSON.

      Parameters

      • clusterId: number

        The target cluster id.

      Returns ClusterOrPointFeature[]

      the immediate children or null in case of non-clustered source

    • Returns the zoom level at which a cluster expands into multiple children.

      Parameters

      • clusterId: number

        The target cluster id.

      Returns number

      the expansion zoom or null in case of non-clustered source

    • Returns leaf point features under a cluster, paginated by limit and offset.

      Parameters

      • clusterId: number

        The target cluster id.

      • limit: number

        Maximum number of points to return (defaults to 10).

      • offset: number

        Number of points to skip before collecting results (defaults to 0).

      Returns Feature<Point, { [name: string]: any }>[]

      leaf point features under a cluster or null in case of non-clustered source

    • Returns source data as GeoJSON - only available when updateable option is set to true.

      Returns GeoJSON

    • Given z, x, and y tile coordinates, returns the corresponding tile with geometries in tile coordinates, much like MVT data is stored.

      Parameters

      • z: string | number

        tile zoom level

      • x: string | number

        tile x coordinate

      • y: string | number

        tile y coordinate

      Returns GeoJSONVTTile

      the transformed tile or null if not found