Gets the current location as a promise.

Can optionally be passed a timeout (in milliseconds) that the promise should be rejected after.

If successful, the promise is resolved with an object of the following form:

{
    altitude: altitude measured in meters,
    latitude: a number measured in decimal degrees,
    longitude: a number measured in decimal degrees,
    accuracy: a number measured in meters,
    speed: speed measured in meters per second
}

See the GeoLocation module for an example.

Location

Namespace
Fuse.GeoLocation
Package
Fuse.GeoLocation 2.7.0

Returns

a promise