Classes
- Geofence
-
GeofenceCollection ⇐
jmap.core.BaseCollection
-
Class representing a collection of geofences
- GeofenceInstance
- GeofenceKit
-
Kit for working with Jibestream Zones
Typedefs
-
JMapPoint :
Object
-
A point in the venue, defined by x and y coordinates with a map ID
Geofence
Kind: global class
-
Geofence
- new Geofence()
-
.name :
String
-
.description :
String
-
.color :
String
-
.geofenceInstances :
Array.<GeofenceInstance>
-
.geofenceInstances :
Array.<String>
new Geofence()
Class representing a Geofence
String
geofence.name : Kind: instance property of Geofence
String
geofence.description : Kind: instance property of Geofence
String
geofence.color : Kind: instance property of Geofence
Array.<GeofenceInstance>
geofence.geofenceInstances : Kind: instance property of Geofence
Array.<String>
geofence.geofenceInstances : Kind: instance property of Geofence
jmap.core.BaseCollection
GeofenceCollection ⇐ Class representing a collection of geofences
Kind: global class
Extends: jmap.core.BaseCollection
-
GeofenceCollection ⇐
jmap.core.BaseCollection
- new GeofenceCollection()
-
.getByName(name) ⇒
Array
-
.getByMap(map) ⇒
Array
-
.getByFloor(map) ⇒
Array
-
.isGeofence(item) ⇒
Boolean
new GeofenceCollection()
Create a collection of geofences
Array
geofenceCollection.getByName(name) ⇒ Get a specific set of geofences by their name
Kind: instance method of GeofenceCollection
Returns: Array
- An array of geofences
Param | Type | Description |
---|---|---|
name | String |
A geofence name |
Array
geofenceCollection.getByMap(map) ⇒ Get any geofences which appear on the specific map
Kind: instance method of GeofenceCollection
Returns: Array
- An array of geofences
Param | Type | Description |
---|---|---|
map | jmap.core.Map |
Any map to query with |
Array
geofenceCollection.getByFloor(map) ⇒ Get any geofences which appear on the specific map
Kind: instance method of GeofenceCollection
Returns: Array
- An array of geofences
Param | Type | Description |
---|---|---|
map | jmap.core.Map |
Any map to query with |
Boolean
geofenceCollection.isGeofence(item) ⇒ Returns a boolean for whether or not argument is constructed as a Geofence object
Kind: instance method of GeofenceCollection
Returns: Boolean
- Boolean based on evaluation result
Param | Type | Description |
---|---|---|
item | Object |
Item to evaluate |
GeofenceInstance
new GeofenceInstance(options)
Class representing a Geofence Instance
Param | Type | Description |
---|---|---|
options | Object |
GeofenceInstance options |
options.parent | Geofence |
The parent geofence |
options.coordinates | Array.<Array.<Array>> |
The set of coordinates that define the geofence instance's polygon. Is a triple nested array to allow for holes within polygons, for example: [[[10, 20], [12, 21], [15, 14]], [[22, 43], [30, 21], [33, 23]] |
options.localCoordinates | Array.<Array.<Array>> |
The set of local coordinates that define the geofence instance's polygon. Is a triple nested array to allow for holes within polygons, for example: [[[10, 20], [12, 21], [15, 14]], [[22, 43], [30, 21], [33, 23]] |
options.name | String |
The name of the geofence instance |
options.id | Number |
The ID of the geofence instance |
options.floor | jCore.Floor |
The floor that the current geofence instance is placed on |
GeofenceKit
Kit for working with Jibestream Zones
Kind: global class
-
GeofenceKit
- new GeofenceKit(core, control)
-
instance
- .getGeofences(callback)
-
.getBoundsOfGeofenceOnMap(geofence, [map]) ⇒
jmap.Bounds
-
.getPolygonsOfGeofence(geofence, map) ⇒
Array.<jungle.Polygon>
-
.drawPolygonsOfGeofence(geofence, map, [style]) ⇒
Array.<jungle.Polygon>
-
.drawPolygonOfGeofenceInstance(instance, [style]) ⇒
jungle.Polygon
-
.watchMovingObjects(geoExitedCallback, geoEnteredCallback) ⇒
GeofenceKit
-
.unwatchMovingObjects() ⇒
GeofenceKit
-
.getGeofenceInstancesByPoint(point) ⇒
Array.<GeofenceInstance>
-
.getGeofenceInstancesByWaypoint(waypoint) ⇒
Array.<GeofenceInstance>
-
.getWaypointsInGeofence(geofence, [map]) ⇒
Array.<jmap.core.Waypoint>
-
.getDestinationsInGeofenceInstance(instance) ⇒
Array.<jmap.core.Destination>
-
.getDestinationsInGeofence(geofence, [map]) ⇒
Array.<jmap.core.Destination>
-
.getAmenitiesInGeofenceInstance(instance) ⇒
Array.<jmap.core.Amenity>
-
.getAmenitiesInGeofence(geofence, [map]) ⇒
Array.<jmap.core.Amenity>
-
.getPathTypesInGeofenceInstance(instance) ⇒
Array.<jmap.core.PathType>
-
.getPathTypesInGeofence(geofence, [map]) ⇒
Array.<jmap.core.PathType>
-
.getMovingObjectsInGeofenceInstance(instance) ⇒
Array.<jungle.MovingObject>
-
.getMovingObjectsInGeofence(geofence, [map]) ⇒
Array.<jungle.MovingObject>
-
.getClosestWaypointInGeofenceInstance(point, instance) ⇒
jmap.core.Waypoint
-
.getClosestWaypointInGeofence(point, geofence, [map]) ⇒
jmap.core.Waypoint
-
.getGeofenceInstanceByIdWithMapId(instanceId, geofence) ⇒
GeofenceInstance
-
static
-
.getPolygonOfGeofenceInstance(instance) ⇒
jungle.Polygon
-
.getCentroidsOfGeofenceOnMap(geofence, map) ⇒
Array.<Array.<Number>>
-
.getCentroidOfGeofenceInstance(instance) ⇒
Array.<Number>
-
.getWaypointsInGeofenceInstance(instance) ⇒
Array.<jmap.core.Waypoint>
-
.getPolygonOfGeofenceInstance(instance) ⇒
new GeofenceKit(core, control)
Create a ZoneKit.
Param | Type | Description |
---|---|---|
core | jmap.core |
instantiated JCore |
control | jmap.JController |
instantiated JController |
geofenceKit.getGeofences(callback)
Load the geofence data for the current activeVenue and save it to the geofenceKit object
Kind: instance method of GeofenceKit
Access: public
Param | Type | Description |
---|---|---|
callback | function |
The callback that will be fun once the API endpoint has been loaded |
jmap.Bounds
geofenceKit.getBoundsOfGeofenceOnMap(geofence, [map]) ⇒ Calculate the bounds of a given geofence on a specific map Will return null if there are no instances of the geofence on the specified map or if an invalid geofence/map are provided
Kind: instance method of GeofenceKit
Returns: jmap.Bounds
- The calculated bounds object (or null if unable to caluclate bounds)
Access: public
Param | Type | Default | Description |
---|---|---|---|
geofence | Geofence |
The geofence that we wish to gind the boudns of | |
[map] | jcore.Map |
this._control.currentMap |
The map we will use to calculate bounds Defaults to the currently shown map |
Array.<jungle.Polygon>
geofenceKit.getPolygonsOfGeofence(geofence, map) ⇒ Generates an array of polygons for the instances of the geofence on the specified map If there are no instances of the geofence on the map, this will return an empty array
Kind: instance method of GeofenceKit
Returns: Array.<jungle.Polygon>
- An array of polygons
Access: public
Param | Type | Description |
---|---|---|
geofence | Geofence |
The geofence with which we wish to generate polygons |
map | jcore.Map |
The map with which we wish to generate polygons |
Array.<jungle.Polygon>
geofenceKit.drawPolygonsOfGeofence(geofence, map, [style]) ⇒ Draw polygons for each instance of the geofence on the specified map with the specified style. If no style is given, use the geofence's color as the style of the polygons
Kind: instance method of GeofenceKit
Returns: Array.<jungle.Polygon>
- The generated polygons
Access: public
Param | Type | Description |
---|---|---|
geofence | Geofence |
The geofence with which we wish to generate polygons |
map | jcore.Map |
The map on which we wish to place the polygons |
[style] | jmap.Style |
How the polygons should be styled |
jungle.Polygon
geofenceKit.drawPolygonOfGeofenceInstance(instance, [style]) ⇒ Draws a polygon for a specific geofence instance on the map where theinstance resides
Kind: instance method of GeofenceKit
Returns: jungle.Polygon
- A polygon (or null if a polygon is unable to be created)
Access: public
Param | Type | Description |
---|---|---|
instance | GeofenceInstance |
The instance with which we width to generate a polygon |
[style] | jmap.Style |
How the polygon should be styled. Defaults to using the geofence's color |
GeofenceKit
geofenceKit.watchMovingObjects(geoExitedCallback, geoEnteredCallback) ⇒ Add event handlers for when moving objects enter or exit geofences
Kind: instance method of GeofenceKit
Returns: GeofenceKit
- The current geofence kit
Access: public
Param | Type | Description |
---|---|---|
geoExitedCallback | function |
The function that will be fired when a moving object exits a geofence |
geoEnteredCallback | function |
The function that will be fired when a moving object enters a geofence |
GeofenceKit
geofenceKit.unwatchMovingObjects() ⇒ Unsubscribe the event handlers from the moving objects entering/exiting geofences
Kind: instance method of GeofenceKit
Returns: GeofenceKit
- The current geofence kit
Access: public
Array.<GeofenceInstance>
geofenceKit.getGeofenceInstancesByPoint(point) ⇒ Get all of the geofence instances that contain a specified point
Kind: instance method of GeofenceKit
Returns: Array.<GeofenceInstance>
- An array of instances that contain the specified point
Access: public
Param | Type | Description |
---|---|---|
point | JMapPoint |
The point we're querying |
Array.<GeofenceInstance>
geofenceKit.getGeofenceInstancesByWaypoint(waypoint) ⇒ Get all geofence instances that contain a specified waypoint
Kind: instance method of GeofenceKit
Returns: Array.<GeofenceInstance>
- An array of instances that contain the specified waypoint
Access: public
Param | Type | Description |
---|---|---|
waypoint | jmap.core.Waypoint |
The waypoint that we're querying |
Array.<jmap.core.Waypoint>
geofenceKit.getWaypointsInGeofence(geofence, [map]) ⇒ Get all waypoints within a specified geofence, either on all maps or on a specifed map
Kind: instance method of GeofenceKit
Returns: Array.<jmap.core.Waypoint>
- An array of waypoints that are contained within the specified
geofece
Access: public
Param | Type | Description |
---|---|---|
geofence | Geofence |
The geofence that we're querying |
[map] | jmap.core.Map |
The map that we're querying. If not supplied, all maps with be queried |
Array.<jmap.core.Destination>
geofenceKit.getDestinationsInGeofenceInstance(instance) ⇒ Get all destinations within a specified geofence instance
Kind: instance method of GeofenceKit
Returns: Array.<jmap.core.Destination>
- An array of destinations that contained within the specified
geofence instance
Access: public
Param | Type | Description |
---|---|---|
instance | GeofenceInstance |
The geofence instance that we're querying |
Array.<jmap.core.Destination>
geofenceKit.getDestinationsInGeofence(geofence, [map]) ⇒ Get all destinations within a specified geofence
Kind: instance method of GeofenceKit
Returns: Array.<jmap.core.Destination>
- An array of destinations that contained within the specified
geofence
Access: public
Param | Type | Description |
---|---|---|
geofence | Geofence |
The geofence that we're querying |
[map] | jmap.core.Map |
The map that we're querying. If not supplied, all maps with be queried |
Array.<jmap.core.Amenity>
geofenceKit.getAmenitiesInGeofenceInstance(instance) ⇒ Get all amenities within a specified geofence instance
Kind: instance method of GeofenceKit
Returns: Array.<jmap.core.Amenity>
- An array of amenities that contained within the specified
geofence instance
Access: public
Param | Type | Description |
---|---|---|
instance | GeofenceInstance |
The geofence instance that we're querying |
Array.<jmap.core.Amenity>
geofenceKit.getAmenitiesInGeofence(geofence, [map]) ⇒ Get all amenities within a specified geofence
Kind: instance method of GeofenceKit
Returns: Array.<jmap.core.Amenity>
- The amenities that are currently within the specified
geofence on the specified map
Access: public
Param | Type | Description |
---|---|---|
geofence | Geofence |
The geofence that we're querying |
[map] | jmap.core.Map |
The map that we're querying. If not supplied, all maps with be queried |
Array.<jmap.core.PathType>
geofenceKit.getPathTypesInGeofenceInstance(instance) ⇒ Get all path types within a specified geofence instance
Kind: instance method of GeofenceKit
Returns: Array.<jmap.core.PathType>
- The path types that are currently within the specified
geofence instance
Access: public
Param | Type | Description |
---|---|---|
instance | GeofenceInstance |
The geofence instance that we're querying |
Array.<jmap.core.PathType>
geofenceKit.getPathTypesInGeofence(geofence, [map]) ⇒ Get all path types within a specified geofence
Kind: instance method of GeofenceKit
Returns: Array.<jmap.core.PathType>
- The path types that are currently within the specified
geofence on the specified map
Access: public
Param | Type | Description |
---|---|---|
geofence | Geofence |
The geofence that we're querying |
[map] | jmap.core.Map |
The map that we're querying. If not supplied, all maps with be queried |
Array.<jungle.MovingObject>
geofenceKit.getMovingObjectsInGeofenceInstance(instance) ⇒ Get all moving objects within a specified geofence instance
Kind: instance method of GeofenceKit
Returns: Array.<jungle.MovingObject>
- The moving objects that are currently within the specified
geofence instance
Access: public
Param | Type | Description |
---|---|---|
instance | GeofenceInstance |
The geofence instance that we're querying |
Array.<jungle.MovingObject>
geofenceKit.getMovingObjectsInGeofence(geofence, [map]) ⇒ Get all moving objects within a specified geofence
Kind: instance method of GeofenceKit
Returns: Array.<jungle.MovingObject>
- The moving objects that are currently within the specified
geofence on the specific map
Access: public
Param | Type | Description |
---|---|---|
geofence | Geofence |
The geofence that we're querying |
[map] | jmap.core.Map |
The map that we're querying. If not supplied, all maps with be queried |
jmap.core.Waypoint
geofenceKit.getClosestWaypointInGeofenceInstance(point, instance) ⇒ Get the closest waypoint to a specified point within a specified geofence instance
Kind: instance method of GeofenceKit
Returns: jmap.core.Waypoint
- The closest waypoint to the specified point that's contained in
specified geofence instance
Access: public
Param | Type | Description |
---|---|---|
point | JMapPoint |
The point on the map that we're starting from |
instance | GeofenceInstance |
The geofence instance that we're querying |
jmap.core.Waypoint
geofenceKit.getClosestWaypointInGeofence(point, geofence, [map]) ⇒ Get the closest waypoint to a specified point within a specified geofence on a specified map
Kind: instance method of GeofenceKit
Returns: jmap.core.Waypoint
- The closest waypoint to the specified point that's contained in
the specified geofence
Access: public
Param | Type | Description |
---|---|---|
point | JMapPoint |
The point on the map that we're starting from |
geofence | Geofence |
The geofence that we're querying |
[map] | jmap.core.Map |
The map that we're querying. If not supplied, all maps with be queried |
GeofenceInstance
geofenceKit.getGeofenceInstanceByIdWithMapId(instanceId, geofence) ⇒ Get the instance that has the provided instance ID and which is located on the map with the provided map ID
Kind: instance method of GeofenceKit
Returns: GeofenceInstance
- The instance that has the provided instance ID located on the map
with the provided map ID (or null, if not found)
Access: public
Param | Type | Description |
---|---|---|
instanceId | Number |
The instance ID we're searching for |
geofence | Number |
The map ID we're using to search |
jungle.Polygon
GeofenceKit.getPolygonOfGeofenceInstance(instance) ⇒ Generates a polygon for a specific geofence instance
Kind: static method of GeofenceKit
Returns: jungle.Polygon
- A polygon (or null if a polygon is unable to be created)
Access: public
Param | Type | Description |
---|---|---|
instance | GeofenceInstance |
The instance with which we width to generate a polygon |
Array.<Array.<Number>>
GeofenceKit.getCentroidsOfGeofenceOnMap(geofence, map) ⇒ Calculate the centroids of all instances of a geofence on a specific map
Kind: static method of GeofenceKit
Returns: Array.<Array.<Number>>
- An array of points ([x, y]) that correspond to the geofence's instances
on the specific map. Ordered in the same order as the instances in the geofence object
Access: public
Param | Type | Description |
---|---|---|
geofence | Geofence |
The geofence with which we wish to calculate the centroids |
map | jcore.Map |
The map on which we wish to calculate the centroids |
Array.<Number>
GeofenceKit.getCentroidOfGeofenceInstance(instance) ⇒ Calculate the centroid of a specific geofence instance
Kind: static method of GeofenceKit
Returns: Array.<Number>
- A point ([x, y]) that is the centroid of the specified geofence instance.
If no centroid is able to be calculated, null will be returned
Access: public
Param | Type | Description |
---|---|---|
instance | GeofenceInstance |
The geofence instance with which we wish to calculate the centroid |
Array.<jmap.core.Waypoint>
GeofenceKit.getWaypointsInGeofenceInstance(instance) ⇒ Get all waypoints within a specified geofence instance
Kind: static method of GeofenceKit
Returns: Array.<jmap.core.Waypoint>
- An array of waypoints that are contained within the specified
geofece instance
Access: public
Param | Type | Description |
---|---|---|
instance | GeofenceInstance |
The geofence instance we're querying |
Object
JMapPoint : A point in the venue, defined by x and y coordinates with a map ID
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
x | Number |
The x value of the coordinate |
y | Number |
The x value of the coordinate |
mapId | Number |
The map ID of the map where the point is located |