Class PoiTable

The PoiTable stores individual information for each POI type.

Remarks

If a TextElement has a reference to a PoiTable (if TextElement.poiInfo.poiTableName is set), information for the TextElement and its icon are read from the PoiTable.

The key to look up the POI is taken from the data, in case of OSM data with TileZen data, the poiNameField is set to kind, which makes the content of the field kind in the data the key to look up the POIs in the PoiTable.

On the side of the PoiTable, the key to look up the PoiTableEntry is either the property "name" of the [[PoiTableEntry]] (which should be unique), or the alternative list of names altNames, where each value should also be unique. If the property useAltNamesForKey is set to true, the altNames will be used.

Hierarchy

  • PoiTable

Constructors

Properties

Accessors

Methods

Constructors

  • Creates an instance of PoiTable.

    Parameters

    • name: string

      Name of the PoiTable. Must be unique.

    • useAltNamesForKey: boolean

      Pass true to use the contents of the property altNames to find a [[PoiTableEntry]] in the table.

    Returns PoiTable

Properties

name: string

Name of the PoiTable. Must be unique.

useAltNamesForKey: boolean

Pass true to use the contents of the property altNames to find a [[PoiTableEntry]] in the table.

Accessors

Methods

  • Gets [[PoiTableEntry]] for poi name specified.

    Parameters

    • poiName: string

      poi name or one of its alternative names if [[useAltNamesForKey]] is set to true.

    Returns undefined | PoiTableEntry

    [[PoiTableEntry]] object or undefined if name was not found in dictionary.

  • Start to load the PoiTable from the specified URL. Can only be called once per table.

    Parameters

    • poiTableUrl: string

      URL that points to the JSON file.

    • Optional abortSignal: AbortSignal

      Signal to abort the loading of the poi table file

    Returns Promise<boolean>

    Promise is being resolved once the JSON file has been fetched and the PoiTable has been set up.

Generated using TypeDoc