-
-
Download the information of a building (floors, pois, basic information, ...)
Parameters:
Name |
Type |
Description |
building |
Building
|
The building identifier. Not null. |
cb |
function
|
Cordova native callback to recive data. |
error |
function
|
Cordova native callback to recive errors. |
-
-
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. |
Returns:
Array.<Building>
- buildings Array of buildings.
-
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. |
Returns:
Array.<event>
- events The events of a building
-
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. |
Returns:
Array.<Floor>
- floors Array of floors.
-
static fetchGeofencesFromBuilding(buildingIdentifier, cb, error) → {Array.<Building>}
-
Download the indoor POIs of a building
Parameters:
Name |
Type |
Description |
buildingIdentifier |
Int
|
The building identifier. Not null. |
cb |
function
|
Cordova native callback to recive data. |
error |
function
|
Cordova native callback to recive errors. |
Returns:
Array.<Building>
- pois Array of POIs
-
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. |
Returns:
Array.<Poi>
- pois Array of POIs
-
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. |
Returns:
bitmap
- map The map image
-
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. |
Returns:
Array.<Poi>
- pois Array of POIs
-
-
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. |
Returns:
Array.<PoiCategory>
- poiCategories The poiCategories array
-
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. |
Returns:
bitmap
- icon The category icon
-
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. |
Returns:
bitmap
- icon The category icon
-
static getDeviceId(cb, error) → {void}
-
Gets the id of the device.
Parameters:
Name |
Type |
Description |
cb |
function
|
Cordova native callback to recive data. |
error |
function
|
Cordova native callback to recive errors. |
Returns:
void
-
static internalSetEventDelegate()
-
An internal method.
Parameters:
Name |
Type |
Description |
callback. |
internalEventDelegate
|
|
-
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. |
Returns:
void
-
static onEnterGeofences(cb, error) → {Array.<Geofence>}
-
Set the geofence listener to receive updates when you enter or exit one of them.
Parameters:
Name |
Type |
Description |
cb |
function
|
Cordova native callback to recive data. The data is an array of geofences. |
error |
function
|
Cordova native callback to recive errors. |
-
static onExitGeofences(cb, error) → {Array.<Geofence>}
-
Set the geofence listener to receive updates when you enter or exit one of them.
Parameters:
Name |
Type |
Description |
cb |
function
|
Cordova native callback to recive data. The data is an array of geofences. |
error |
function
|
Cordova native callback to recive errors. |
-
static onLocationError(callback)
-
Get notified about positioning errors.
- See:
-
-
static onLocationStatus(callback)
-
Get notified about positioning status changes.
- See:
-
-
static onLocationUpdate(callback)
-
Get notified about location updates.
- See:
-
-
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. |
Returns:
boolean
- success True if a listener was removed. False if there was no listener.
-
static removeRealTimeUpdates(cb, error)
-
Stops receiving updates in realtime about user location.
Parameters:
Name |
Type |
Description |
cb |
function
|
Cordova native callback to recive data. |
error |
function
|
Cordova native callback to recive errors. |
-
static removeUpdates() → {Promise}
-
Stops positioning.
Returns:
Promise
- Get notified when the native SDK actually stops positioning.
-
static requestDirections(directionsRequest, cb, error) → {Route}
-
Calculates a route between two points.
Parameters:
Name |
Type |
Description |
directionsRequest |
DirectionsRequest
|
Request - non-null search parameters. |
cb |
function
|
Cordova native callback to recive data. |
error |
function
|
Cordova native callback to recive errors. |
Returns:
Route
- route The route between provided points
-
static requestLocationUpdates(request)
-
Starts positioning. Use onLocationUpdate, onLocationStatus, and onLocationError to receive location updates, status changes and errors.
Parameters:
Name |
Type |
Description |
request |
LocationRequest
|
LocationRequest containing the positioning options. |
- See:
-
- onLocationUpdate
- onLocationStatus
- onLocationError
-
static requestNavigationUpdates(navigationRequest, 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 |
navigationRequest |
NavigationRequest
|
Request non-null search parameters. |
cb |
function
|
Cordova native callback to recive data. See NavigationProgress |
error |
function
|
Cordova native callback to recive errors. |
Returns:
void
-
static requestRealTimeUpdates(request, cb, error)
-
Set the realtime params and listener that receives realtime location updates
Parameters:
Name |
Type |
Description |
request |
RealTimeRequest
|
Request - non-null search parameters. |
cb |
fuction
|
Cordova native callback to recive data. |
error |
function
|
Cordova native callback to recive errors. |
-
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. |
Returns:
boolean
- success True if operation finished successfully, otherwise false
-
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. |
Returns:
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. |
Returns:
boolean
- success True if operation finished successfully, otherwise false
-
static startPositioning(request, cb, error) → {Location}
-
Set callback and starts listen onLocationChanged event.
Parameters:
Name |
Type |
Description |
request |
LocationRequest
|
Location Request. |
cb |
function
|
Cordova native callback to recive data. |
error |
function
|
Cordova native callback to recive errors. |
Returns:
Location
- Current position of device.
- Deprecated:
- Use requestLocationUpdates instead. Use onLocationUpdate, onLocationStatus, and onLocationError to receive location updates, status changes and errors.
- See:
-
- requestLocationUpdates
- onLocationUpdate
- onLocationStatus
- onLocationError
-
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. |
Returns:
void
- Deprecated:
- Use removeUpdates instead.
-
static updateNavigationState(externalNavigation, cb, error) → {boolean}
-
Informs NavigationManager object the change of the user's location.
Parameters:
Name |
Type |
Description |
externalNavigation |
ExternalNavigation
|
Navigation info. |
cb |
function
|
Cordova native callback to recive data. |
error |
function
|
Cordova native callback to recive errors. |
Returns:
boolean
- success True if there is a listener to which notify progress update. False if there isn't, so this method do nothing.
-
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. |
Returns:
boolean
- success True if there is a listener to which notify progress update. False if there isn't, so this method do nothing.