AssetKit
Jibestream plugin for using Devices
Documentation
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |
Asset
assetKit.createAsset(assetConfig) ⇒ - Create an asset based on the configuration passed in
Kind: instance method of AssetKit
Returns: Asset
- - The created asset
Access: public
Param | Type | Description |
---|---|---|
assetConfig | assetConfig |
The configuration object for the asset |
AssetKit
assetKit.updateAsset(asset, config, [animation]) ⇒ - Update any properties of the asset that are passed in, animated using the animation passed in
Kind: instance method of AssetKit
Returns: AssetKit
- - The current asset kit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that will be updated |
config | assetConfig |
An object containing any properties that you wish to update |
[animation] | jmap.Animation |
The way in which these properties should be animated, if it's possible to animate them |
Asset
assetKit.updateAssetWithPosition(asset, jMapPoint, animation) ⇒ - Update the position of an asset, using the provided animation
Kind: instance method of AssetKit
Returns: Asset
- - The asset which has been moved
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset which will be moved |
jMapPoint | jMapPoint |
The new position and map ID for the asset |
animation | jmap.Animation |
How the asset should be animated as its updated |
Asset
assetKit.getNearestAssetToPoint(jMapPoint, [assets]) ⇒ - Return the nearest asset to a given point on a map. Accepts an optional parameter of an array of assets to search through. If not provided, search through all assets in given building
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
jMapPoint | jMapPoint |
The point that you are searching with |
[assets] | Array.<Asset> |
A subset of the building's assets to search through Defaults to using all assets |
Asset
assetKit.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒ - Return the nearest asset of a specific type to a given point on a map.
Kind: instance method of AssetKit
Returns: Asset
- - The closest asset of the specific type to the provided jMapPoint
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that we're searching for |
jMapPoint | jMapPoint |
The point that you are searching with |
AssetKit
assetKit.showAssetsOfType(type) ⇒ - Show all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be shown |
AssetKit
assetKit.hideAssetsOfType(type) ⇒ - Hide all assets of a specific type
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | string |
The type of assets that will be hidden |
AssetKit
assetKit.removeAsset(asset) ⇒ - Remove a specific asset
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset to be removed |
Asset
assetKit.getAssetById(id) ⇒ - Return a specific asset by its ID
Kind: instance method of AssetKit
Returns: Asset
- - The asset with the matching ID
Access: public
Param | Type | Description |
---|---|---|
id | Number |
The ID to search for |
Array.<Asset>
assetKit.getAssetsByType(type) ⇒ - Return all assets of a specific type
Kind: instance method of AssetKit
Returns: Array.<Asset>
- - All assets with the matching type
Access: public
Param | Type | Description |
---|---|---|
type | string |
The asset type to search for |
AssetKit
assetKit.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒ - Wayfind to a specific asset, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
asset | Asset |
The asset that we are wayfinding to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
pathStyle | jmap.Style |
The path style |
AssetKit
assetKit.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒ - Wayfind to a specific asset, given a point on the map and reroute if the asset moves
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Default | Description |
---|---|---|---|
asset | Asset |
The asset that we are wayfinding to | |
pathStyle | pathStyle |
The path style | |
[rerouteInterval] | Number |
|
How often the wayfinding path should be redrawn if the asset moves. If nothing is passed in, or null/false is passed in, the wayfinding path will not be redrawn |
AssetKit
assetKit.wayfindToNearestAssetOfType(type, jMapPoint) ⇒ - Wayfind to the nearest asset of the given type, given a point on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
type | String |
The type of asset that we want to route to |
jMapPoint | jMapPoint |
The point on the map that we're wayfinding from |
AssetKit
assetKit.clearWayfindingPath() ⇒ - Clear any wayfinding paths on the map
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
AssetKit
assetKit.enableAssetTap(cb) ⇒ - Enable a tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.enableAssetDoubleTap(cb) ⇒ - Enable a double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on tap Accepts two parameters: asset, event |
AssetKit
assetKit.disableAssetTap(cb) ⇒ - Disable the specified tap handlers on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.disableAssetDoubleTap(cb) ⇒ - Disable the specified double tap handler on assets
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The specific function to remove |
AssetKit
assetKit.wayfindAssetUpdated(cb) ⇒ - Add a callback for every time an asset's position is updated
Kind: instance method of AssetKit
Returns: AssetKit
- - The current AssetKit
Access: public
Param | Type | Description |
---|---|---|
cb | function |
The callback that will be run on update of asset Accepts one parameters: asset |
Object
JMapPoint : A point that describes an x, y coordinate with the mapId that it's on
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point |
y | number |
The y coordinate of the point |
mapId | number |
The ID of the map that the coordinates are on |
Object
assetConfig : The configuration object for the creation and update of an asset
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
map | Map |
The map the asset will be placed on | |
position | Array.<number> |
Coordinates of the asset (as [x, y]) | |
id | number |
0 |
The ID of the asset |
name | string |
"''" |
The name of the asset |
speed | number |
100 |
How quickly the asset should move to new coordinates (pixels per second) |
orientation | number |
0 |
The orientation of the asset's icon |
type | string |
""_default"" |
The type of asset |
snapToGrid | boolean |
false |
Whether the asset should follow the waypoint grid |
snapToWaypoint | boolean |
false |
Whether the asset should snap to waypoints when repositioning |
width | number |
20 |
The width of the icon |
height | number |
20 |
The height of the icon |
url | string |
The URL of the image to be used as the asset's icon | |
scaleWithMap | boolean |
true |
Whether the asset's icon should scale with the map |
rotateWithMap | boolean |
true |
Whether the asset's icon should rotate with the map |
anchor | Array.<number> |
The origin point of the icon, with the two values being percentages of the sprite's dimensions (between 0 and 1) | |
iconColor | string |
If no url is provided for the icon, the colour of the default icon | |
confidenceMax | number |
The maximum radius of the confidence circle (in pixels) | |
confidencePercent | number |
The confidence in the position of the item (between 0 and 1). 0 will hide the confidence circle; 1 will display the full circle | |
confidenceColor | string |
The color of the confidence circle in hexadecimal format | |
confidenceAlpha | number |
The transparency of the confidence circle (between 0 and 1) | |
pulseColor | string |
The color of the pulse circle | |
pulseStartAlpha | number |
The starting opacity of the pulse circle (between 0 and 1) | |
pulseEndAlpha | number |
The ending opacity of the pulse circle (between 0 and 1) | |
pulseDuration | number |
The length of time of the pulse animation (in seconds) | |
pulseDelay | number |
The delay between pulse animation (in seconds) | |
pulseVisible | boolean |
Whether the pulse should be visible |
Classes
Typedefs
-
JMapPoint :
Object
-
A point that describes an x, y coordinate with the mapId that it's on
-
assetConfig :
Object
-
The configuration object for the creation and update of an asset
Asset
Kind: global class
Access: public
new Asset([assetConfig])
Creates a new Asset
Param | Type | Description |
---|---|---|
[assetConfig] | assetConfig |
The configuration object for the asset |
AssetKit
Kind: global class
Access: public
-
AssetKit
- new AssetKit(control)
-
.createAsset(assetConfig) ⇒
Asset
-
.updateAsset(asset, config, [animation]) ⇒
AssetKit
-
.updateAssetWithPosition(asset, jMapPoint, animation) ⇒
Asset
-
.getNearestAssetToPoint(jMapPoint, [assets]) ⇒
Asset
-
.getNearestAssetOfTypeToPoint(type, jMapPoint) ⇒
Asset
-
.showAssetsOfType(type) ⇒
AssetKit
-
.hideAssetsOfType(type) ⇒
AssetKit
-
.removeAsset(asset) ⇒
AssetKit
-
.getAssetById(id) ⇒
Asset
-
.getAssetsByType(type) ⇒
Array.<Asset>
-
.wayfindToAssetFromPoint(asset, jMapPoint, pathStyle) ⇒
AssetKit
-
.wayfindFromUserLocationToAssetWithAutoReroute(asset, pathStyle, [rerouteInterval]) ⇒
AssetKit
-
.wayfindToNearestAssetOfType(type, jMapPoint) ⇒
AssetKit
-
.clearWayfindingPath() ⇒
AssetKit
-
.enableAssetTap(cb) ⇒
AssetKit
-
.enableAssetDoubleTap(cb) ⇒
AssetKit
-
.disableAssetTap(cb) ⇒
AssetKit
-
.disableAssetDoubleTap(cb) ⇒
AssetKit
-
.wayfindAssetUpdated(cb) ⇒
AssetKit
new AssetKit(control)
- Creates a new AssetKit, where users can create, read, update and remove Assets
Param | Type | Description |
---|---|---|
control | jmap.JController |
The controller for the map instance where assets are to be placed |