Class PoiManager

POI manager class, responsible for loading the @xyzmaps/harp-datasource-protocol#PoiGeometry objects from the @xyzmaps/harp-datasource-protocol#DecodedTile, and preparing them for rendering.

Remarks

Also loads and manages the texture atlases for the icons.

Hierarchy

  • PoiManager

Constructors

Properties

mapView: MapView

The MapView instance that should display the POIs.

Methods

  • Load the texture atlas that defines the segments of the texture that should be used for specific icons.

    Parameters

    • imageName: string

      Name of the image from the theme (NOT the url!).

    • atlas: string

      URL of the JSON file defining the texture atlas.

    • Optional abortSignal: AbortSignal

      Signal to Abort the loading of the Atlas Image

    Returns Promise<void>

    Remarks

    Creates an @xyzmaps/harp-datasource-protocol#ImageTexture for every element in the atlas, such that it can be addressed in the theme file.

  • Update the TextElement with the information taken from the PoiTable which is referenced in the PoiInfo of the pointLabel.

    If the requested PoiTable is not available yet, the function returns false. If the PoiTable is not defined, or if the references POI has no entry in the PoiTable, no action is taken, and the function returns false.

    If the PoiTable has been processed, it returns true, indicating that this function doesn't have to be called again.

    Parameters

    Returns boolean

    true if the PoiTable has been processed, and the function does not have to be called again.

Generated using TypeDoc