Class

AegirMap

AegirMap()

The aegir default implementation contains all of the functions for loading and displaying your venue map, as well as basic interactions.

Constructor

# new AegirMap()

Example
const aegir = new AegirMap()

Members

# EVENTS

Dispatched events

Methods

# _setStyleForFillLayer(style, unitId, floorId)

Parameters:
Name Type Description
style VmVenueLayerStyle

the style that will be applied

unitId string

the id of the unit to apply the style to

floorId string

the id of the floor where the unit is

Since:
  • 1.2.1

# _setStyleForLabelLayer(style, unitId, floorId)

Parameters:
Name Type Description
style vmVenueLayerStyle

the style that will be applied

unitId string

the id of the unit to apply the style to

floorId string

the id of the floor where the unit is

Since:
  • 1.2.1

# addAnnotation(annotation)

Add annotation to map

Parameters:
Name Type Description
annotation PointAnnotation

the annotation options

# addUnitSelectionListener(handler)

Parameters:
Name Type Description
handler
To Do:
  • TOBE Implemented

# ajax(url, options, onSuccess, onFailure)

Simple replacement for jquery's $.ajax fn. This implementation is not full-featured.

Parameters:
Name Type Description
url string

the endpoint for the ajax call

options ajaxConfig

configuration options

onSuccess onCompleteCallback

handler for succesful ajax calls

onFailure onCompleteCallback

handler for failed ajax calls

Deprecated:
  • Yes

# changeFloors(floors)

Handles automatically hiding and showing floors.

Parameters:
Name Type Description
floors Array.<string>

the list of ids for floors to change

# configure(params, propertyName, defaultValue, targetObject) → {boolean}

Initialize configuration values by merging user-defined properties with default values

Parameters:
Name Type Description
params object

source object

propertyName string

the name of the property to check for a user-defined value

defaultValue string

the default value if it doesnt exist in the source object

targetObject object

the destination object to set the property on

true if user-defined or default value was specified

boolean

# coordFinderById(wpId) → {Geometry}

Get the geojson geometry information associated with a given feature

Parameters:
Name Type Description
wpId string

the feature id of the item to search for

the geojson object with the given feature id, or null

Geometry

# createStyleObjs()

Initializes map styles

# doChangeFloors(indoorFloors, outdoorFloors)

Handles automatically hiding and showing floors.

Parameters:
Name Type Description
indoorFloors Array.<string>

the list of ids for floors indoor floors to change

outdoorFloors Array.<string>

the list of ids for floors outdoor floors to change

# findFloorObjForFloorId(floorId) → {Floor}

Find floor with id in the venue, either indoors or outdoors

Parameters:
Name Type Description
floorId string

the id of the floor to search for

the matched floor, or null

Floor

# findOutdoorFloorWithId(floorId) → {vmMapBuildingFloor}

Search for outdoor floors in any building

Parameters:
Name Type Description
floorId string

the unique id for the floor you are searching for

Since:
  • 1.2

the matched floor, or null if not found

vmMapBuildingFloor

# getConfig() → {object}

Get current configuration

active configuration settings

object

# getCurrentFloors() → {Array.<vmMapBuildingFloor>}

Get the list of currently active indoor floors

list of floors

Array.<vmMapBuildingFloor>

# getCurrentOutdoorFloors() → {Array.<vmMapBuildingFloor>}

Get the list of currently active outdoor floors

list of floors

Array.<vmMapBuildingFloor>

# getDebug() → {object}

Get debug settings

debug settings

object

# getDefaults() → {object}

Get default configuration settings

default settings

object

# getMap() → {object}

Get mapbox map instance

mapbox map

object

# hideFloors(indoorFloors, outdoorFloors)

Hide map layers associated with specific map floors

Parameters:
Name Type Description
indoorFloors Array.<string>

list of ids for indoor floors to NOT hide

outdoorFloors Array.<string>

list of ids for outdoor floors to NOT hide

# async loadVenueMapData(fileCollection, params, onComplete) → {boolean}

Parameters:
Name Type Description
fileCollection FileCollection

Collection files configuration

params MapDataLoadConfig

Load configuration object

onComplete function

Callback function

True if the VMD was loaded

boolean

# nodeFinderById(itemId) → (nullable) {object}

Get the geojson properties associated with a given feature

Parameters:
Name Type Description
itemId string

the feature id of the item to search for

the geojson object with the given feature id, or null

object

# refreshBuildingLabelLayers()

Force refresh label& icon layers

# removeAnnotation(annotation)

Remove an annotation from the map

Parameters:
Name Type Description
annotation PointAnnotation

the annotation options

# setDefaultProcessing()

Set Processing mode to: ProcessingMode.DEFAULT

See:

# setLegacyProcessing()

Set Processing mode to: ProcessingMode.LEGACY

See:

# setProcessingMode(mode)

Set Processing mode

Parameters:
Name Type Description
mode ProcessingMode
See:

# setRasterRendering()

Set Rendering mode to: RenderMode.RASTER

See:

# setRenderMode(mode)

Set Rendering mode

Parameters:
Name Type Description
mode RenderMode
See:

# setVectorRendering()

Set Rendering mode to: RenderMode.VECTOR

See:

# showFloor(floorId)

Load map layers for a particular floor

Parameters:
Name Type Description
floorId string

the id of the floor to show