Namespace: Situm

Situm

Source:

Methods

(static) fetchBuildings(cb, error) → {Array.<Building>}

Download all the buildings for the current user
Parameters:
Name Type Description
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
buildings Array of buildings.
Type
Array.<Building>

(static) fetchEventsFromBuilding(building, cb, error) → {Array.<event>}

Download the events of a building
Parameters:
Name Type Description
building Building The building. Not null.
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
events The evetns of a building
Type
Array.<event>

(static) fetchFloorsFromBuilding(building, cb, error) → {Array.<Floor>}

Download all the floors of a building
Parameters:
Name Type Description
building Building The building. Not null.
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
floors Array of floors.
Type
Array.<Floor>

(static) fetchIndoorPOIsFromBuilding(building, cb, error) → {Array.<Poi>}

Download the indoor POIs of a building
Parameters:
Name Type Description
building Building The building. Not null.
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
pois Array of POIs
Type
Array.<Poi>

(static) fetchMapFromFloor(floor, cb, error) → {bitmap}

Download the map image of a floor
Parameters:
Name Type Description
floor Floor The floor. Not null.
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
map The map image
Type
bitmap

(static) fetchOutdoorPOIsFromBuilding(building, cb, error) → {Array.<Poi>}

Download the outdoor POIs of a building
Parameters:
Name Type Description
building Building The building. Not null.
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
pois Array of POIs
Type
Array.<Poi>

(static) fetchPoiCategories(cb, error) → {Array.<PoiCategory>}

Get all POI categories, download and cache their icons asynchronously. To get some of those icons from local storage @see fetchPoiCategoryIconNormal(PoiCategory) or fetchPoiCategoryIconSelected(PoiCategory)
Parameters:
Name Type Description
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
poiCategories The poiCategories array
Type
Array.<PoiCategory>

(static) fetchPoiCategoryIconNormal(category, cb, error) → {bitmap}

Get the normal category icon for a category
Parameters:
Name Type Description
category PoiCategory The category. Not null.
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
icon The category icon
Type
bitmap

(static) fetchPoiCategoryIconSelected(category, cb, error) → {bitmap}

Get the selected category icon for a category
Parameters:
Name Type Description
category PoiCategory The category. Not null.
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
icon The category icon
Type
bitmap

(static) invalidateCache(cb, error) → {void}

Invalidate all the resources in the cache
Parameters:
Name Type Description
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
Type
void

(static) removeNavigationUpdates(cb, error) → {boolean}

Removes all location updates. This removes the internal state of the manager, including the listener provided in requestNavigationUpdates(NavigationRequest, NavigationListener), so it won't receive more progress updates.
Parameters:
Name Type Description
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
success True if a listener was removed. False if there was no listener.
Type
boolean

(static) requestDirections(args, cb, error) → {Route}

Calculates a route between two points.
Parameters:
Name Type Description
args object Request - non-null search parameters.
Properties
Name Type Attributes Description
building Building
from Point Points have to be inside the same building.
to Point Points have to be inside the same building.
minimizeFloorChanges boolean <optional>
Sets if you want to calculate a route minimizing the floor changes even if the route is longer.
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
route The route between provided points
Type
Route

(static) requestNavigationUpdates(args, cb, error) → {void}

Set the navigation params, and the listener that receives the updated navigation progress. Can only exist one navigation with one listener at a time. If this method was previously invoked, but removeUpdates() wasn't, removeUpdates() is called internally.
Parameters:
Name Type Description
args object Request non-null search parameters. Must be an object with next properties:
Properties
Name Type Attributes Description
distanceToFloorChangeThreshold number <optional>
DistanceToFloorChangeThreshold, integer in meters
distanceToChangeIndicationThreshold number <optional>
DistanceToChangeIndicationThreshold, integer in meters
distanceToGoalThreshold number <optional>
DistanceToGoalThreshold, integer in meters
outsideRouteThreshold number <optional>
OutsideRouteThreshold, integer in meters
indicationsInterval number <optional>
IndicationsInterval, long in miliseconds
timeToFirstIndication number <optional>
TimeToFirstIndication, long in miliseconds
roundIndicationsStep number <optional>
RoundIndicationsStep, integer in meters
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
Type
void

(static) setApiKey(email, apiKey, cb, error) → {boolean}

Provides your API key to the Situm SDK. This key is generated for your application in the Dashboard. Old credentials will be removed.
Parameters:
Name Type Description
email string Email that identifies the account. Can't be empty.
apiKey string Key obtained at situm.es. Can't be empty.
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
success True if operation finished successfully, otherwise false
Type
boolean

(static) setCacheMaxAge(cacheAge, cb, error) → {void}

Sets the maximum age of a cached response. If the cache response's age exceeds maxAge, it will not be used and a network request will be made.
Parameters:
Name Type Description
cacheAge number A non-negative integer
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
Type
void

(static) setUserPass(email, password, cb, error) → {boolean}

Provides user's email and password. This credentials will be used to obtain a valid user token to authenticate the server request, when necessary. Token obtaining is not necessary done when this method is executed. Old credentials will be removed.
Parameters:
Name Type Description
email string User's email. Can't be empty.
password string User's password. Can't be empty.
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
success True if operation finished successfully, otherwise false
Type
boolean

(static) startPositioning(request, building, locationRequest, cb, error) → {Location}

Set callback and starts listen onLocationChanged event.
Parameters:
Name Type Description
request request Location Request. Must be an object with next properties:
building request.building Building in which the positioning will be started.
locationRequest request.locationRequest LocationRequest to activate locationListener.
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
position Current position of device.
Type
Location

(static) stopPositioning(cb, error) → {void}

Stop locationListener on current active listener.
Parameters:
Name Type Description
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
Type
void

(static) updateNavigationWithLocation(location, cb, error) → {boolean}

Informs NavigationManager object the change of the user's location.
Parameters:
Name Type Description
location Location New Location of the user. If null, nothing is done.
cb function Cordova native callback to recive data.
error function Cordova native callback to recive errors.
Source:
Returns:
success True if there is a listener to which notify progress update. False if there isn't, so this method do nothing.
Type
boolean