Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new PoiTable(name: string, useAltNamesForKey: boolean): PoiTable
  • 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

Readonly name

name: string

Name of the PoiTable. Must be unique.

Readonly useAltNamesForKey

useAltNamesForKey: boolean

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

Accessors

isLoading

  • get isLoading(): boolean

loadedOk

  • get loadedOk(): boolean

Methods

getEntry

  • getEntry(poiName: string): PoiTableEntry | undefined

load

  • load(poiTableUrl: string, abortSignal?: AbortSignal): Promise<boolean>
  • 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