new GeoPosition(navigator, options)
Create a new GeoPosition.
Parameters:
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
navigator |
Object | provides access to geolocation system | ||||||||||
options |
Object | parameters for initializing this GeoPosition
Properties
|
- Source:
Methods
connect(geoUpdateCallback)
Attempts to get an initial rough geographic location for the listener, then sets up a callback
to update the position.
Parameters:
Name | Type | Description |
---|---|---|
geoUpdateCallback |
function | object that should receive geolocation coordinate updates |
- Source:
- See:
-
- geoListenEnabled
toString() → {String}
- Source:
Returns:
Human-readable representation of this GeoPosition
- Type
- String
waitForInitialGeolocation() → {Promise}
Allows you to wait on the progress of the .connect() behavior, attempting to get an initial
estimate of the user's position. Note that this promise will never fail - if we cannot get an
accurate estimate, we fall back to default coordinates (currently latitude 1, longitude 1)
- Source:
Returns:
Represents the attempt to get an initial estimate of the user's position
- Type
- Promise