Class Renderer

Hierarchy

  • Renderer

Constructors

Methods

  • Add a start/end marker for wayfinding

    Parameters

    • lng: number

      the longitude to add the marker

    • lat: number

      the latitude to add the marker

    • selectedWP: Waypoint
    • callback: ((err) => void)

      the handler when selecting on the marker

        • (err): void
        • Parameters

          • err: any

          Returns void

    Returns void

  • Adds a floor change popup to the map at the specified location

    Parameters

    • lat: number

      the latitude of the coordinate to place the popup

    • lng: number

      the longitude of the coordinate to place the popup

    • floorId: string

      the id of the floor to add the popup to

    Returns Popup

    the maplibre popup

  • Clear all popups from the map

    Returns void

  • Rotate the map to the heading defined by two waypoints

    Parameters

    Returns void

    Since

    2.0

  • Fly to the location and set the map bearing

    Parameters

    • p1: Location

      a waypoint

    • p2: Location

      a waypoint

    • bearing: number

      the bearing of the map

    Returns void

  • Get list of floors with the same ordinals as the given floor

    Parameters

    • floorId: string

      the id of the target floor

    Returns any[]

    a list of floors with the same ordinal

  • Parameters

    • floorId: string
    • showing: boolean

    Returns void

  • Updates start/end destination markers on the map to be visible or not for specified floor

    Parameters

    • floorId: string

      the id of the floor that's being displayed

    • showing: boolean

    Returns void

  • Hide wayfinding layers for a floor

    Parameters

    • floorId: string

      the id of the floor to hide

    Returns void

  • Load wayfinding styles from map's style json

    Returns void

  • Highlight path when direction item has been selected.

    Adds a Layer to the map for the selected segment with a LineString GeoJSON Feature as a source

    Parameters

    • segmentIndex: number

      the index of the segment in the wayfinding path to highlight

    • activeFloor: string

    Returns void

  • Draws the path on the map for the active wayfinding results This method is an adaptation of the bullder design pattern Steps taken:

    1 Builds line segments for all directions (see WayfindingLineSegment) 2 Builds an array of all the waypoint items of the route 3 Adds a Layer with a GeoJSON FeatureCollection for each floor 4 Updates the state 5 Calls for animation of the lines in the current floor

    Parameters

    Returns void

    Since

    2.2.0

  • Clear the wayfinding path from the map

    Returns void

  • Set properties for next wayfinding marker that is added to the map

    Parameters

    • type: string

      the of marker

    • callback: (() => void)

      function to execute when marker is selecteds

        • (): void
        • Returns void

    Returns void

    Todo

    :deprecate

  • Show wayfinding layers for a floor

    Parameters

    • floorId: string

      the id of the floor to show

    Returns void

  • Swap current start and end points for wayfinding

    Parameters

    • swap: boolean

      true to swap start/end false to reverse

    Returns void

  • Finds the map unit containing the specified wayfinding node

    Parameters

    • nodeId: string

      the id of the wayfinding node

    Returns any

    the geojson unit node

  • Updates active floors

    Parameters

    • floorId: string

      the id of the new floor

    Returns void

    Todo

    This might not be needed. Is not used

  • Updates the wayfinding layers for a specific floor

    Parameters

    • floorId: string

      the id of the floor to update

    Returns void

Properties

SELECTED_LAYER_ID: "selected-segment" = 'selected-segment'
logger: Logger = logger
state: RenderState = {}

Generated using TypeDoc