1.0.2 • Published 7 years ago

@jibestream-dev/jmap-device-kit v1.0.2

Weekly downloads
33
License
ISC
Repository
github
Last release
7 years ago

DeviceKit

Jibestream plugin for using Devices

Documentation

Classes

Typedefs

Device

Kind: global class

new Device()

Class representing a Device.

device.heading : Number

Kind: instance property of Device

device.name : String

Kind: instance property of Device

device.waypointId : Number

Kind: instance property of Device

device.mapId : Number

Kind: instance property of Device

device._getLocation(model)

Create a Device.

Kind: instance method of Device

ParamTypeDescription
modelobjectThe model object passed back from the /full payload

DeviceCollection ⇐ jmap.core.BaseCollection

Class representing a collection of Devices.

Kind: global class
Extends: jmap.core.BaseCollection

new DeviceCollection()

Create a collection of Devices.

deviceCollection.isDevice(item) ⇒ Boolean

Returns a boolean for weather or not argument is constructed as an Device object

Kind: instance method of DeviceCollection
Returns: Boolean - Boolean based on evaluation result

ParamTypeDescription
itemObjectItem to evaluate

deviceCollection.getByName(name) ⇒ Array

Get a specific set of devices belonging to a waypoint

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
nameStringA device name

deviceCollection.getByWaypoint(waypoint) ⇒ Array

Get a specific set of devices belonging to a waypoint

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
waypointjmap.core.WaypointAny waypoint to query with

deviceCollection.getByMap(map) ⇒ Array

Get a specific set of devices belonging to a map

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
mapjmap.core.MapAny map to query with

DeviceKit

Kit for working with Jibestream Devices

Kind: global class

new DeviceKit(core, control)

Create a DeviceKit.

ParamTypeDescription
coreJCoreinstanciated JCore
controlJControllerinstanciated JController

deviceKit.getDevices(callback) ⇒ DeviceKit

Make request to JACS to populate the DeviceCollection of the ActiveVenue

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
callbackfunctioncallback fired when devices are ready, passes error, deviceCollection as arguments

deviceKit.wayfindToDevice(callback, device, number) ⇒ Array

Draws a path to the selected device

Kind: instance method of DeviceKit
Returns: Array - List of path points, seperted by floor

ParamTypeDescription
callbackjmap.core.Waypointwaypoint to wayfind from
deviceDevicedevice model
numberaccessLevellevel of accessibility of the path

deviceKit.wayfindFromDevice(waypoint, device, number) ⇒ Array

Draws a path from the selected device

Kind: instance method of DeviceKit
Returns: Array - List of path points, seperted by floor

ParamTypeDescription
waypointjmap.core.Waypointwaypoint to wayfind to
deviceDevicedevice model
numberaccessLevellevel of accessibility of the path

deviceKit.focusToDevice(callback, device, animation) ⇒ DeviceKit

Focuses the view center to the position of the device, changes the mapView if needed

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
callbackjmap.core.Waypointwaypoint to wayfind to
deviceDevicedevice model
animationjmap.Animationanimation definition

deviceKit.focusToDeviceWithHeading(device) ⇒ DeviceKit

Rotates the map to match the device heading

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.getWaypointFromDevice(device) ⇒ jmap.core.Waypoint

Returns the waypoint matching the device waypointId if the waypoint exists in a loaded map

Kind: instance method of DeviceKit
Returns: jmap.core.Waypoint - waypoint

ParamTypeDescription
deviceDevicedevice model

deviceKit.addComponentOverDevice(device, component) ⇒ DeviceKit

Adds an html component ontop of your devoce, commonly used for 'You are here' indicators

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model
componentDOMElementany html element wrapped in a div

deviceKit.removeComponentFromDevice(device) ⇒ DeviceKit

Removes any html component added ontop of your device.

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.showDevice(device, config) ⇒ DeviceKit

Display the device on its respecive map

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model
configDeviceViewConfigconfiguration used to generate the appearance of the device. only read the first time a device is shown

deviceKit.hideDevice(device) ⇒ DeviceKit

Hide the divice

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.showAllDevices(config) ⇒ DeviceKit

Display all the devices on thier respecive maps

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
configDeviceViewConfigconfiguration used to generate the appearance of the device. only read the first time a device is shown

deviceKit.hideAllDevices() ⇒ DeviceKit

Hides all divices

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

deviceKit.pingDevice(device, onComplete) ⇒ DeviceKit

Plays a pulse animation for the decive once, fires an onComplete callback when done

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model
onCompletefunctioncallback fired once animation is complete

DeviceViewConfig : Object

The configuration object for the creation and update of an asset

Kind: global typedef
Properties

NameTypeDefaultDescription
widthnumber20The width of the icon
heightnumber20The height of the icon
urlstringThe URL of the image to be used as the asset's icon
scaleWithMapbooleantrueWhether the asset's icon should scale with the map
iconColorstringIf no url is provided for the icon, the colour of the default icon
confidenceMaxnumberThe maximum radius of the confidence circle (in pixels)
confidencePercentnumberThe confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle
confidenceColorstringThe color of the confidence circle in hexadecimal format
confidenceAlphanumberThe transparency of the confidence circle (between 0 and 1)
pulseColorstringThe color of the pulse circle
pulseStartAlphanumberThe starting opacity of the pulse circle (between 0 and 1)
pulseEndAlphanumberThe ending opacity of the pulse circle (between 0 and 1)
pulseDurationnumberThe length of time of the pulse animation (in seconds)
pulseDelaynumberThe delay between pulse animation (in seconds)
pulseVisiblebooleanWhether the pulse should be visible

Classes

Typedefs

Device

Kind: global class

new Device()

Class representing a Device.

device.heading : Number

Kind: instance property of Device

device.name : String

Kind: instance property of Device

device.waypointId : Number

Kind: instance property of Device

device.mapId : Number

Kind: instance property of Device

device._getLocation(model)

Create a Device.

Kind: instance method of Device

ParamTypeDescription
modelobjectThe model object passed back from the /full payload

DeviceCollection ⇐ jmap.core.BaseCollection

Class representing a collection of Devices.

Kind: global class
Extends: jmap.core.BaseCollection

new DeviceCollection()

Create a collection of Devices.

deviceCollection.isDevice(item) ⇒ Boolean

Returns a boolean for weather or not argument is constructed as an Device object

Kind: instance method of DeviceCollection
Returns: Boolean - Boolean based on evaluation result

ParamTypeDescription
itemObjectItem to evaluate

deviceCollection.getByName(name) ⇒ Array

Get a specific set of devices belonging to a waypoint

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
nameStringA device name

deviceCollection.getByWaypoint(waypoint) ⇒ Array

Get a specific set of devices belonging to a waypoint

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
waypointjmap.core.WaypointAny waypoint to query with

deviceCollection.getByMap(map) ⇒ Array

Get a specific set of devices belonging to a map

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
mapjmap.core.MapAny map to query with

DeviceKit

Kit for working with Jibestream Devices

Kind: global class

new DeviceKit(core, control)

Create a DeviceKit.

ParamTypeDescription
coreJCoreinstanciated JCore
controlJControllerinstanciated JController

deviceKit.getDevices(callback) ⇒ DeviceKit

Make request to JACS to populate the DeviceCollection of the ActiveVenue

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
callbackfunctioncallback fired when devices are ready, passes error, deviceCollection as arguments

deviceKit.wayfindToDevice(callback, device, number) ⇒ Array

Draws a path to the selected device

Kind: instance method of DeviceKit
Returns: Array - List of path points, seperted by floor

ParamTypeDescription
callbackjmap.core.Waypointwaypoint to wayfind from
deviceDevicedevice model
numberaccessLevellevel of accessibility of the path

deviceKit.wayfindFromDevice(waypoint, device, number) ⇒ Array

Draws a path from the selected device

Kind: instance method of DeviceKit
Returns: Array - List of path points, seperted by floor

ParamTypeDescription
waypointjmap.core.Waypointwaypoint to wayfind to
deviceDevicedevice model
numberaccessLevellevel of accessibility of the path

deviceKit.focusToDevice(callback, device, animation) ⇒ DeviceKit

Focuses the view center to the position of the device, changes the mapView if needed

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
callbackjmap.core.Waypointwaypoint to wayfind to
deviceDevicedevice model
animationjmap.Animationanimation definition

deviceKit.focusToDeviceWithHeading(device) ⇒ DeviceKit

Rotates the map to match the device heading

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.getWaypointFromDevice(device) ⇒ jmap.core.Waypoint

Returns the waypoint matching the device waypointId if the waypoint exists in a loaded map

Kind: instance method of DeviceKit
Returns: jmap.core.Waypoint - waypoint

ParamTypeDescription
deviceDevicedevice model

deviceKit.addComponentOverDevice(device, component) ⇒ DeviceKit

Adds an html component ontop of your devoce, commonly used for 'You are here' indicators

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model
componentDOMElementany html element wrapped in a div

deviceKit.removeComponentFromDevice(device) ⇒ DeviceKit

Removes any html component added ontop of your device.

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.showDevice(device, config) ⇒ DeviceKit

Display the device on its respecive map

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model
configDeviceViewConfigconfiguration used to generate the appearance of the device. only read the first time a device is shown

deviceKit.hideDevice(device) ⇒ DeviceKit

Hide the divice

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.showAllDevices(config) ⇒ DeviceKit

Display all the devices on thier respecive maps

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
configDeviceViewConfigconfiguration used to generate the appearance of the device. only read the first time a device is shown

deviceKit.hideAllDevices() ⇒ DeviceKit

Hides all divices

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

deviceKit.pingDevice(device, onComplete) ⇒ DeviceKit

Plays a pulse animation for the decive once, fires an onComplete callback when done

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model
onCompletefunctioncallback fired once animation is complete

DeviceViewConfig : Object

The configuration object for the creation and update of an asset

Kind: global typedef
Properties

NameTypeDefaultDescription
widthnumber20The width of the icon
heightnumber20The height of the icon
urlstringThe URL of the image to be used as the asset's icon
scaleWithMapbooleantrueWhether the asset's icon should scale with the map
iconColorstringIf no url is provided for the icon, the colour of the default icon
confidenceMaxnumberThe maximum radius of the confidence circle (in pixels)
confidencePercentnumberThe confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle
confidenceColorstringThe color of the confidence circle in hexadecimal format
confidenceAlphanumberThe transparency of the confidence circle (between 0 and 1)
pulseColorstringThe color of the pulse circle
pulseStartAlphanumberThe starting opacity of the pulse circle (between 0 and 1)
pulseEndAlphanumberThe ending opacity of the pulse circle (between 0 and 1)
pulseDurationnumberThe length of time of the pulse animation (in seconds)
pulseDelaynumberThe delay between pulse animation (in seconds)
pulseVisiblebooleanWhether the pulse should be visible

Classes

Typedefs

Device

Kind: global class

new Device()

Class representing a Device.

device.heading : Number

Kind: instance property of Device

device.name : String

Kind: instance property of Device

device.waypointId : Number

Kind: instance property of Device

device.mapId : Number

Kind: instance property of Device

device._getLocation(model)

Create a Device.

Kind: instance method of Device

ParamTypeDescription
modelobjectThe model object passed back from the /full payload

DeviceCollection ⇐ jmap.core.BaseCollection

Class representing a collection of Devices.

Kind: global class
Extends: jmap.core.BaseCollection

new DeviceCollection()

Create a collection of Devices.

deviceCollection.isDevice(item) ⇒ Boolean

Returns a boolean for weather or not argument is constructed as an Device object

Kind: instance method of DeviceCollection
Returns: Boolean - Boolean based on evaluation result

ParamTypeDescription
itemObjectItem to evaluate

deviceCollection.getByName(name) ⇒ Array

Get a specific set of devices belonging to a waypoint

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
nameStringA device name

deviceCollection.getByWaypoint(waypoint) ⇒ Array

Get a specific set of devices belonging to a waypoint

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
waypointjmap.core.WaypointAny waypoint to query with

deviceCollection.getByMap(map) ⇒ Array

Get a specific set of devices belonging to a map

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
mapjmap.core.MapAny map to query with

DeviceKit

Kit for working with Jibestream Devices

Kind: global class

new DeviceKit(core, control)

Create a DeviceKit.

ParamTypeDescription
coreJCoreinstanciated JCore
controlJControllerinstanciated JController

deviceKit.getDevices(callback) ⇒ DeviceKit

Make request to JACS to populate the DeviceCollection of the ActiveVenue

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
callbackfunctioncallback fired when devices are ready, passes error, deviceCollection as arguments

deviceKit.wayfindToDevice(callback, device, number) ⇒ Array

Draws a path to the selected device

Kind: instance method of DeviceKit
Returns: Array - List of path points, seperted by floor

ParamTypeDescription
callbackjmap.core.Waypointwaypoint to wayfind from
deviceDevicedevice model
numberaccessLevellevel of accessibility of the path

deviceKit.wayfindFromDevice(waypoint, device, number) ⇒ Array

Draws a path from the selected device

Kind: instance method of DeviceKit
Returns: Array - List of path points, seperted by floor

ParamTypeDescription
waypointjmap.core.Waypointwaypoint to wayfind to
deviceDevicedevice model
numberaccessLevellevel of accessibility of the path

deviceKit.focusToDevice(callback, device, animation) ⇒ DeviceKit

Focuses the view center to the position of the device, changes the mapView if needed

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
callbackjmap.core.Waypointwaypoint to wayfind to
deviceDevicedevice model
animationjmap.Animationanimation definition

deviceKit.focusToDeviceWithHeading(device) ⇒ DeviceKit

Rotates the map to match the device heading

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.getWaypointFromDevice(device) ⇒ jmap.core.Waypoint

Returns the waypoint matching the device waypointId if the waypoint exists in a loaded map

Kind: instance method of DeviceKit
Returns: jmap.core.Waypoint - waypoint

ParamTypeDescription
deviceDevicedevice model

deviceKit.addComponentOverDevice(device, component) ⇒ DeviceKit

Adds an html component ontop of your devoce, commonly used for 'You are here' indicators

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model
componentDOMElementany html element wrapped in a div

deviceKit.removeComponentFromDevice(device) ⇒ DeviceKit

Removes any html component added ontop of your device.

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.showDevice(device, config) ⇒ DeviceKit

Display the device on its respecive map

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model
configDeviceViewConfigconfiguration used to generate the appearance of the device. only read the first time a device is shown

deviceKit.hideDevice(device) ⇒ DeviceKit

Hide the divice

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.showAllDevices(config) ⇒ DeviceKit

Display all the devices on thier respecive maps

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
configDeviceViewConfigconfiguration used to generate the appearance of the device. only read the first time a device is shown

deviceKit.hideAllDevices() ⇒ DeviceKit

Hides all divices

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

deviceKit.pingDevice(device, onComplete) ⇒ DeviceKit

Plays a pulse animation for the decive once, fires an onComplete callback when done

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model
onCompletefunctioncallback fired once animation is complete

DeviceViewConfig : Object

The configuration object for the creation and update of an asset

Kind: global typedef
Properties

NameTypeDefaultDescription
widthnumber20The width of the icon
heightnumber20The height of the icon
urlstringThe URL of the image to be used as the asset's icon
scaleWithMapbooleantrueWhether the asset's icon should scale with the map
iconColorstringIf no url is provided for the icon, the colour of the default icon
confidenceMaxnumberThe maximum radius of the confidence circle (in pixels)
confidencePercentnumberThe confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle
confidenceColorstringThe color of the confidence circle in hexadecimal format
confidenceAlphanumberThe transparency of the confidence circle (between 0 and 1)
pulseColorstringThe color of the pulse circle
pulseStartAlphanumberThe starting opacity of the pulse circle (between 0 and 1)
pulseEndAlphanumberThe ending opacity of the pulse circle (between 0 and 1)
pulseDurationnumberThe length of time of the pulse animation (in seconds)
pulseDelaynumberThe delay between pulse animation (in seconds)
pulseVisiblebooleanWhether the pulse should be visible

Classes

Typedefs

Device

Kind: global class

new Device()

Class representing a Device.

device.heading : Number

Kind: instance property of Device

device.name : String

Kind: instance property of Device

device.waypointId : Number

Kind: instance property of Device

device.mapId : Number

Kind: instance property of Device

device._getLocation(model)

Create a Device.

Kind: instance method of Device

ParamTypeDescription
modelobjectThe model object passed back from the /full payload

DeviceCollection ⇐ jmap.core.BaseCollection

Class representing a collection of Devices.

Kind: global class
Extends: jmap.core.BaseCollection

new DeviceCollection()

Create a collection of Devices.

deviceCollection.isDevice(item) ⇒ Boolean

Returns a boolean for weather or not argument is constructed as an Device object

Kind: instance method of DeviceCollection
Returns: Boolean - Boolean based on evaluation result

ParamTypeDescription
itemObjectItem to evaluate

deviceCollection.getByName(name) ⇒ Array

Get a specific set of devices belonging to a waypoint

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
nameStringA device name

deviceCollection.getByWaypoint(waypoint) ⇒ Array

Get a specific set of devices belonging to a waypoint

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
waypointjmap.core.WaypointAny waypoint to query with

deviceCollection.getByMap(map) ⇒ Array

Get a specific set of devices belonging to a map

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
mapjmap.core.MapAny map to query with

DeviceKit

Kit for working with Jibestream Devices

Kind: global class

new DeviceKit(core, control)

Create a DeviceKit.

ParamTypeDescription
coreJCoreinstanciated JCore
controlJControllerinstanciated JController

deviceKit.getDevices(callback) ⇒ DeviceKit

Make request to JACS to populate the DeviceCollection of the ActiveVenue

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
callbackfunctioncallback fired when devices are ready, passes error, deviceCollection as arguments

deviceKit.wayfindToDevice(callback, device, number) ⇒ Array

Draws a path to the selected device

Kind: instance method of DeviceKit
Returns: Array - List of path points, seperted by floor

ParamTypeDescription
callbackjmap.core.Waypointwaypoint to wayfind from
deviceDevicedevice model
numberaccessLevellevel of accessibility of the path

deviceKit.wayfindFromDevice(waypoint, device, number) ⇒ Array

Draws a path from the selected device

Kind: instance method of DeviceKit
Returns: Array - List of path points, seperted by floor

ParamTypeDescription
waypointjmap.core.Waypointwaypoint to wayfind to
deviceDevicedevice model
numberaccessLevellevel of accessibility of the path

deviceKit.focusToDevice(callback, device, animation) ⇒ DeviceKit

Focuses the view center to the position of the device, changes the mapView if needed

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
callbackjmap.core.Waypointwaypoint to wayfind to
deviceDevicedevice model
animationjmap.Animationanimation definition

deviceKit.focusToDeviceWithHeading(device) ⇒ DeviceKit

Rotates the map to match the device heading

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.getWaypointFromDevice(device) ⇒ jmap.core.Waypoint

Returns the waypoint matching the device waypointId if the waypoint exists in a loaded map

Kind: instance method of DeviceKit
Returns: jmap.core.Waypoint - waypoint

ParamTypeDescription
deviceDevicedevice model

deviceKit.addComponentOverDevice(device, component) ⇒ DeviceKit

Adds an html component ontop of your devoce, commonly used for 'You are here' indicators

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model
componentDOMElementany html element wrapped in a div

deviceKit.removeComponentFromDevice(device) ⇒ DeviceKit

Removes any html component added ontop of your device.

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.showDevice(device, config) ⇒ DeviceKit

Display the device on its respecive map

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model
configDeviceViewConfigconfiguration used to generate the appearance of the device. only read the first time a device is shown

deviceKit.hideDevice(device) ⇒ DeviceKit

Hide the divice

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.showAllDevices(config) ⇒ DeviceKit

Display all the devices on thier respecive maps

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
configDeviceViewConfigconfiguration used to generate the appearance of the device. only read the first time a device is shown

deviceKit.hideAllDevices() ⇒ DeviceKit

Hides all divices

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

deviceKit.pingDevice(device, onComplete) ⇒ DeviceKit

Plays a pulse animation for the decive once, fires an onComplete callback when done

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model
onCompletefunctioncallback fired once animation is complete

DeviceViewConfig : Object

The configuration object for the creation and update of an asset

Kind: global typedef
Properties

NameTypeDefaultDescription
widthnumber20The width of the icon
heightnumber20The height of the icon
urlstringThe URL of the image to be used as the asset's icon
scaleWithMapbooleantrueWhether the asset's icon should scale with the map
iconColorstringIf no url is provided for the icon, the colour of the default icon
confidenceMaxnumberThe maximum radius of the confidence circle (in pixels)
confidencePercentnumberThe confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle
confidenceColorstringThe color of the confidence circle in hexadecimal format
confidenceAlphanumberThe transparency of the confidence circle (between 0 and 1)
pulseColorstringThe color of the pulse circle
pulseStartAlphanumberThe starting opacity of the pulse circle (between 0 and 1)
pulseEndAlphanumberThe ending opacity of the pulse circle (between 0 and 1)
pulseDurationnumberThe length of time of the pulse animation (in seconds)
pulseDelaynumberThe delay between pulse animation (in seconds)
pulseVisiblebooleanWhether the pulse should be visible

Classes

Typedefs

Device

Kind: global class

new Device()

Class representing a Device.

device.heading : Number

Kind: instance property of Device

device.name : String

Kind: instance property of Device

device.waypointId : Number

Kind: instance property of Device

device.mapId : Number

Kind: instance property of Device

device._getLocation(model)

Create a Device.

Kind: instance method of Device

ParamTypeDescription
modelobjectThe model object passed back from the /full payload

DeviceCollection ⇐ jmap.core.BaseCollection

Class representing a collection of Devices.

Kind: global class
Extends: jmap.core.BaseCollection

new DeviceCollection()

Create a collection of Devices.

deviceCollection.isDevice(item) ⇒ Boolean

Returns a boolean for weather or not argument is constructed as an Device object

Kind: instance method of DeviceCollection
Returns: Boolean - Boolean based on evaluation result

ParamTypeDescription
itemObjectItem to evaluate

deviceCollection.getByName(name) ⇒ Array

Get a specific set of devices belonging to a waypoint

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
nameStringA device name

deviceCollection.getByWaypoint(waypoint) ⇒ Array

Get a specific set of devices belonging to a waypoint

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
waypointjmap.core.WaypointAny waypoint to query with

deviceCollection.getByMap(map) ⇒ Array

Get a specific set of devices belonging to a map

Kind: instance method of DeviceCollection
Returns: Array - an array of devices

ParamTypeDescription
mapjmap.core.MapAny map to query with

DeviceKit

Kit for working with Jibestream Devices

Kind: global class

new DeviceKit(core, control)

Create a DeviceKit.

ParamTypeDescription
coreJCoreinstanciated JCore
controlJControllerinstanciated JController

deviceKit.getDevices(callback) ⇒ DeviceKit

Make request to JACS to populate the DeviceCollection of the ActiveVenue

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
callbackfunctioncallback fired when devices are ready, passes error, deviceCollection as arguments

deviceKit.wayfindToDevice(callback, device, number) ⇒ Array

Draws a path to the selected device

Kind: instance method of DeviceKit
Returns: Array - List of path points, seperted by floor

ParamTypeDescription
callbackjmap.core.Waypointwaypoint to wayfind from
deviceDevicedevice model
numberaccessLevellevel of accessibility of the path

deviceKit.wayfindFromDevice(waypoint, device, number) ⇒ Array

Draws a path from the selected device

Kind: instance method of DeviceKit
Returns: Array - List of path points, seperted by floor

ParamTypeDescription
waypointjmap.core.Waypointwaypoint to wayfind to
deviceDevicedevice model
numberaccessLevellevel of accessibility of the path

deviceKit.focusToDevice(callback, device, animation) ⇒ DeviceKit

Focuses the view center to the position of the device, changes the mapView if needed

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
callbackjmap.core.Waypointwaypoint to wayfind to
deviceDevicedevice model
animationjmap.Animationanimation definition

deviceKit.focusToDeviceWithHeading(device) ⇒ DeviceKit

Rotates the map to match the device heading

Kind: instance method of DeviceKit
Returns: DeviceKit - DeviceKit

ParamTypeDescription
deviceDevicedevice model

deviceKit.getWaypointFromDevice(device) ⇒ jmap.core.Waypoin