Namespace: wf

aegir.wf

The aegir.wf namespace contains all of the functions for enabling wayfinding

Methods

(static) addPopup(lat, lng, floorId)

Adds a floor change popup to the map at the specified location
Parameters:
Name Type Description
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

(static) aegir.addMarker(lng, lat, lng, callback)

Add a start/end marker for wayfinding
Parameters:
Name Type Description
lng number the longitude to add the marker
lat number the latitude to add the marker
lng object the selected waypoint
callback function the handler when selecting on the marker
Deprecated:
  • since version 1.2. There is no replacement.

(static) aegir.clearPath()

Clear the wayfinding path from the map
Deprecated:
  • since version 1.2. Use aegir.wf.reset() instead().

(static) aegir.flyToLoc(wp1, wp2, bearing)

Fly to the location and set the map bearing
Parameters:
Name Type Description
wp1 location a waypoint
wp2 location a waypoint
bearing number the bearing of the map

(static) aegir.handlePins(floorId)

Updates start/end destination markers on the map to be visible or not for specified floor
Parameters:
Name Type Description
floorId string the id of the floor that's being displayed
Deprecated:
  • since version 1.2. There is no replacement.

(static) aegir.loadMapInstance(venueId, xmlUrl, geoJsonUrl, onComplete)

Initialized map data in backend API for wayfinding
Parameters:
Name Type Description
venueId string the venue id
xmlUrl string the url for the VMD's xml file
geoJsonUrl string the url for the VMD's geojson file
onComplete onCompleteCallback function to execute when loading is complete
Deprecated:
  • since version 1.2. Use aegir.wf.initialize() instead.

(static) aegir.rotateMap(startWaypointId, endWaypointId)

Rotate the map to the heading defined by two waypoints
Parameters:
Name Type Description
startWaypointId string the starting waypoint
endWaypointId string the ending waypoint
Deprecated:
  • since version 1.2. Use aegir.wf.fixCameraToSegment() instead.

(static) aegir.unitFinderByNodeId(nodeId) → {object}

Finds the map unit containing the specified wayfinding node
Parameters:
Name Type Description
nodeId string the id of the wayfinding node
Deprecated:
  • since version 1.2. There is no replacement.
Returns:
the geojson unit feature
Type
object

(static) animateLine(waypointItem)

Animate a segment for part of a wayfinding path
Parameters:
Name Type Description
waypointItem object the wayfinding object parsed from the geojson
Deprecated:
  • since version 1.2. There is no replacement.

(static) clearAllPopUps()

Clear all popups from the map
Deprecated:
  • since version 1.2. There is no replacement.

(static) directionHighlight(path, callback)

Highlight path when direction item has been selected.
Parameters:
Name Type Description
path number the index of the segment in the wayfinding path to highlight
callback onCompleteCallback the function to execute on completion

(static) drawWPLines()

Draws waypath lines for the currently active waypath
Deprecated:
  • since version 1.2. There is no replacement.

(static) findClosestWaypoint(lon, lat, floorKey, callback)

Makes API call to find the closest waypoint to a given lat/lng on a specific floor
Parameters:
Name Type Description
lon number the longitude of the coordinate to check
lat number the latitude of the coordinate to check
floorKey string the id of the floor to check
callback onCompleteCallback function to execute when results are available

(static) findFloorObjForFloorId(floorId) → {object}

Finds a floor object with the given id
Parameters:
Name Type Description
floorId string the id of the floor to find
Deprecated:
  • since version 1.2. Use aegir.findFloorWithId() or aegir.findOutdoorFloorWithId() instead.
Returns:
the floor, or null if it doesnt exist.
Type
object

(static) findPath(routeStart, routeEnd, options)

Find waypath between two points
Parameters:
Name Type Description
routeStart string the id of the wayfinding node to start the route
routeEnd string the id of the wayfinding node to end the route
options object configuration properties
Deprecated:
  • since version 1.2. Use aegir.wf.findWaypath() instead.

(static) findWayPath(routeStart, routeEnd, options)

Find waypath between two points
Parameters:
Name Type Description
routeStart string the id of the wayfinding node to start the route
routeEnd string the id of the wayfinding node to end the route
options object configuration properties

(static) fixCameraToSegment(startWaypointId, endWaypointId)

Rotate the map to the heading defined by two waypoints
Parameters:
Name Type Description
startWaypointId string the starting waypoint
endWaypointId string the ending waypoint
Since:
  • 1.2

(static) getConfig() → {object}

Get default properties
Since:
  • 1.2
Returns:
default properties
Type
object

(static) getDefaults() → {object}

Get default properties
Returns:
default properties
Type
object

(static) getDirections() → {object}

Get the latest wayfinding directions
Returns:
the directions
Type
object

(static) getSameOrdinalFloors(floorId) → {Array.<vmMapBuildingFloor>}

Get list of floors with the same ordinals as the given floor
Parameters:
Name Type Description
floorId string the id of the target floor
Deprecated:
  • since version 1.2. There is no replacement.
Returns:
a list of floors with the same ordinal
Type
Array.<vmMapBuildingFloor>

(static) handlePopup(floorId, method)

Handle floor change popup clicked
Parameters:
Name Type Description
floorId string the id of the floor to move to
method boolean true to advance, false to do nothing
Deprecated:
  • since version 1.2. There is no replacement.

(static) initialize(fileCollection, params, onComplete)

Initialize wayfinding for a particular venue
Parameters:
Name Type Description
fileCollection vmdFileCollection properties for file Loading
params wayfindingLoadConfig settings
onComplete onCompleteCallback callback when loading is complete
Since:
  • 1.2

(static) onSegmentSelected(segmentIndex, callback)

Highlight path when direction item has been selected.
Parameters:
Name Type Description
segmentIndex number the index of the segment in the wayfinding path to highlight
callback onCompleteCallback the function to execute on completion
Since:
  • 1.2

(static) populateWaypoints()

Draws the path on the map for the active wayfinding results
Deprecated:
  • since version 1.2. There is no replacement.

(static) reset()

Clear the wayfinding path from the map
Since:
  • 1.2

(static) setMarkerType(type, callback)

Set properties for next wayfinding marker that is added to the map
Parameters:
Name Type Description
type string the of marker
callback function function to execute when marker is selecteds
To Do:
  • :deprecate

(static) swapDirections(swap)

Swap current start and end points for wayfinding
Parameters:
Name Type Description
swap boolean true to swap start/end false to reverse

(static) updateActiveFloors(floorId)

Updates active floors
Parameters:
Name Type Description
floorId string the id of the new floor

(static) updateWFLayersForFloor(floorId)

Updates the wayfinding layers for a specific floor
Parameters:
Name Type Description
floorId string the id of the floor to update
Deprecated:
  • since version 1.2. There is no replacement.