location |
|
The location object. It error attribute is a boolean,
if set to true, then an error accured. If set to false, then the
location object may have the aditionnal following attributes:
** latitude: Latitude (float, unit: degree). This attribute is
mandatory.
** longitude: Longitude (float, unit: degree). This attribute is
mandatory.
** accuracy: String that describes, in a fuzzy way the accuracy level.
That is, if the swarmlet is running in a device that is equiped
with GPS, then the accuracy will be set to 'high'. If it uses an ip
address based lookup, the it will be set to 'low'. These values are
set at the module level.
** timestamp: Creation timestamp of the coordiantes (Number, unit:
milliseconds).
Example usage:
var geoLoc = instantiate('geoLoc','services/GeoLocation');
geoLoc.initialize();
geoLoc.provideInput('trigger', true);
geoLoc.react();
latestOutput('location'); |