situm-cordova-plugin-official
Version:
Situm Cordova-based Plugin for hybrid apps.
4,087 lines (1,124 loc) • 54.4 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Namespace: Situm</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Namespace: Situm</h1>
<section>
<header>
<h2>Situm</h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line5">line 5</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".fetchBuildings"><span class="type-signature">(static) </span>fetchBuildings<span class="signature">(cb, error)</span><span class="type-signature"> → {Array.<<a href="global.html#Building">Building</a>>}</span></h4>
<div class="description">
Download all the buildings for the current user
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line75">line 75</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
buildings Array of buildings.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<<a href="global.html#Building">Building</a>></span>
</dd>
</dl>
<h4 class="name" id=".fetchEventsFromBuilding"><span class="type-signature">(static) </span>fetchEventsFromBuilding<span class="signature">(building, cb, error)</span><span class="type-signature"> → {Array.<event>}</span></h4>
<div class="description">
Download the events of a building
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>building</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Building">Building</a></span>
</td>
<td class="description last">The building. Not null.</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line119">line 119</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
events The evetns of a building
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<event></span>
</dd>
</dl>
<h4 class="name" id=".fetchFloorsFromBuilding"><span class="type-signature">(static) </span>fetchFloorsFromBuilding<span class="signature">(building, cb, error)</span><span class="type-signature"> → {Array.<<a href="global.html#Floor">Floor</a>>}</span></h4>
<div class="description">
Download all the floors of a building
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>building</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Building">Building</a></span>
</td>
<td class="description last">The building. Not null.</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line86">line 86</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
floors Array of floors.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<<a href="global.html#Floor">Floor</a>></span>
</dd>
</dl>
<h4 class="name" id=".fetchIndoorPOIsFromBuilding"><span class="type-signature">(static) </span>fetchIndoorPOIsFromBuilding<span class="signature">(building, cb, error)</span><span class="type-signature"> → {Array.<Poi>}</span></h4>
<div class="description">
Download the indoor POIs of a building
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>building</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Building">Building</a></span>
</td>
<td class="description last">The building. Not null.</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line97">line 97</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
pois Array of POIs
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<Poi></span>
</dd>
</dl>
<h4 class="name" id=".fetchMapFromFloor"><span class="type-signature">(static) </span>fetchMapFromFloor<span class="signature">(floor, cb, error)</span><span class="type-signature"> → {bitmap}</span></h4>
<div class="description">
Download the map image of a floor
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>floor</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Floor">Floor</a></span>
</td>
<td class="description last">The floor. Not null.</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line140">line 140</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
map The map image
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">bitmap</span>
</dd>
</dl>
<h4 class="name" id=".fetchOutdoorPOIsFromBuilding"><span class="type-signature">(static) </span>fetchOutdoorPOIsFromBuilding<span class="signature">(building, cb, error)</span><span class="type-signature"> → {Array.<Poi>}</span></h4>
<div class="description">
Download the outdoor POIs of a building
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>building</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Building">Building</a></span>
</td>
<td class="description last">The building. Not null.</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line108">line 108</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
pois Array of POIs
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<Poi></span>
</dd>
</dl>
<h4 class="name" id=".fetchPoiCategories"><span class="type-signature">(static) </span>fetchPoiCategories<span class="signature">(cb, error)</span><span class="type-signature"> → {Array.<<a href="global.html#PoiCategory">PoiCategory</a>>}</span></h4>
<div class="description">
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)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line129">line 129</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
poiCategories The poiCategories array
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<<a href="global.html#PoiCategory">PoiCategory</a>></span>
</dd>
</dl>
<h4 class="name" id=".fetchPoiCategoryIconNormal"><span class="type-signature">(static) </span>fetchPoiCategoryIconNormal<span class="signature">(category, cb, error)</span><span class="type-signature"> → {bitmap}</span></h4>
<div class="description">
Get the normal category icon for a category
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>category</code></td>
<td class="type">
<span class="param-type"><a href="global.html#PoiCategory">PoiCategory</a></span>
</td>
<td class="description last">The category. Not null.</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line151">line 151</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
icon The category icon
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">bitmap</span>
</dd>
</dl>
<h4 class="name" id=".fetchPoiCategoryIconSelected"><span class="type-signature">(static) </span>fetchPoiCategoryIconSelected<span class="signature">(category, cb, error)</span><span class="type-signature"> → {bitmap}</span></h4>
<div class="description">
Get the selected category icon for a category
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>category</code></td>
<td class="type">
<span class="param-type"><a href="global.html#PoiCategory">PoiCategory</a></span>
</td>
<td class="description last">The category. Not null.</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line162">line 162</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
icon The category icon
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">bitmap</span>
</dd>
</dl>
<h4 class="name" id=".invalidateCache"><span class="type-signature">(static) </span>invalidateCache<span class="signature">(cb, error)</span><span class="type-signature"> → {void}</span></h4>
<div class="description">
Invalidate all the resources in the cache
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line172">line 172</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">void</span>
</dd>
</dl>
<h4 class="name" id=".removeNavigationUpdates"><span class="type-signature">(static) </span>removeNavigationUpdates<span class="signature">(cb, error)</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
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.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line226">line 226</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
success True if a listener was removed. False if there was no listener.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".requestDirections"><span class="type-signature">(static) </span>requestDirections<span class="signature">(args, cb, error)</span><span class="type-signature"> → {<a href="global.html#Route">Route</a>}</span></h4>
<div class="description">
Calculates a route between two points.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>args</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">Request - non-null search parameters.
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>building</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Building">Building</a></span>
</td>
<td class="attributes">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>from</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Point">Point</a></span>
</td>
<td class="attributes">
</td>
<td class="description last">Points have to be inside the same building.</td>
</tr>
<tr>
<td class="name"><code>to</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Point">Point</a></span>
</td>
<td class="attributes">
</td>
<td class="description last">Points have to be inside the same building.</td>
</tr>
<tr>
<td class="name"><code>minimizeFloorChanges</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">Sets if you want to calculate a route minimizing the floor changes even if the route is longer.</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line187">line 187</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
route The route between provided points
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="global.html#Route">Route</a></span>
</dd>
</dl>
<h4 class="name" id=".requestNavigationUpdates"><span class="type-signature">(static) </span>requestNavigationUpdates<span class="signature">(args, cb, error)</span><span class="type-signature"> → {void}</span></h4>
<div class="description">
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.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>args</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">Request non-null search parameters. Must be an object with next properties:
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>distanceToFloorChangeThreshold</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">DistanceToFloorChangeThreshold, integer in meters</td>
</tr>
<tr>
<td class="name"><code>distanceToChangeIndicationThreshold</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">DistanceToChangeIndicationThreshold, integer in meters</td>
</tr>
<tr>
<td class="name"><code>distanceToGoalThreshold</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">DistanceToGoalThreshold, integer in meters</td>
</tr>
<tr>
<td class="name"><code>outsideRouteThreshold</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">OutsideRouteThreshold, integer in meters</td>
</tr>
<tr>
<td class="name"><code>indicationsInterval</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">IndicationsInterval, long in miliseconds</td>
</tr>
<tr>
<td class="name"><code>timeToFirstIndication</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">TimeToFirstIndication, long in miliseconds</td>
</tr>
<tr>
<td class="name"><code>roundIndicationsStep</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">RoundIndicationsStep, integer in meters</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line205">line 205</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">void</span>
</dd>
</dl>
<h4 class="name" id=".setApiKey"><span class="type-signature">(static) </span>setApiKey<span class="signature">(email, apiKey, cb, error)</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
Provides your API key to the Situm SDK. This key is generated for your application in the Dashboard. Old credentials will be removed.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>email</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Email that identifies the account. Can't be empty.</td>
</tr>
<tr>
<td class="name"><code>apiKey</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Key obtained at situm.es. Can't be empty.</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line20">line 20</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
success True if operation finished successfully, otherwise false
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".setCacheMaxAge"><span class="type-signature">(static) </span>setCacheMaxAge<span class="signature">(cacheAge, cb, error)</span><span class="type-signature"> → {void}</span></h4>
<div class="description">
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.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cacheAge</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">A non-negative integer</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line43">line 43</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">void</span>
</dd>
</dl>
<h4 class="name" id=".setUserPass"><span class="type-signature">(static) </span>setUserPass<span class="signature">(email, password, cb, error)</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
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.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>email</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">User's email. Can't be empty.</td>
</tr>
<tr>
<td class="name"><code>password</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">User's password. Can't be empty.</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line32">line 32</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
success True if operation finished successfully, otherwise false
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".startPositioning"><span class="type-signature">(static) </span>startPositioning<span class="signature">(request, building, locationRequest, cb, error)</span><span class="type-signature"> → {<a href="global.html#Location">Location</a>}</span></h4>
<div class="description">
Set callback and starts listen onLocationChanged event.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>request</code></td>
<td class="type">
<span class="param-type">request</span>
</td>
<td class="description last">Location Request. Must be an object with next properties:</td>
</tr>
<tr>
<td class="name"><code>building</code></td>
<td class="type">
<span class="param-type">request.building</span>
</td>
<td class="description last">Building in which the positioning will be started.</td>
</tr>
<tr>
<td class="name"><code>locationRequest</code></td>
<td class="type">
<span class="param-type">request.locationRequest</span>
</td>
<td class="description last">LocationRequest to activate locationListener.</td>
</tr>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="situm.js.html">situm.js</a>, <a href="situm.js.html#line55">line 55</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
position Current position of device.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="global.html#Location">Location</a></span>
</dd>
</dl>
<h4 class="name" id=".stopPositioning"><span class="type-signature">(static) </span>stopPositioning<span class="signature">(cb, error)</span><span class="type-signature"> → {void}</span></h4>
<div class="description">
Stop locationListener on current active listener.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cb</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive data.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Cordova native callback to recive errors.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class