Skip to content

Commit 0236c70

Browse files
ZephDcharpeni
authored andcommitted
Update geolocation.md (facebook#416)
* Update geolocation.md Updated the options information using the HTML GeoPosition as a guide, plus my own knowledge, plus some googling of ReactNative's defaults. * Update geolocation.md
1 parent a402285 commit 0236c70

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/geolocation.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ Invokes the success callback once with the latest location info.
106106

107107
Supported options:
108108

109-
* `timeout` (ms)
110-
* `maximumAge` (ms) - Defaults to INFINITY.
111-
* `enableHighAccuracy` (bool) - On Android, if the location is cached this can return almost immediately, or it will request an update which might take a while.
109+
* `timeout` (ms) - Is a positive value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position. Defaults to INFINITY.
110+
* `maximumAge` (ms) - Is a positive value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return. If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. If set to Infinity the device will always return a cached position regardless of its age. Defaults to INFINITY.
111+
* `enableHighAccuracy` (bool) - Is a boolean representing if to use GPS or not. If set to true, a GPS position will be requested. If set to false, a WIFI location will be requested.
112112

113113
---
114114

@@ -130,11 +130,11 @@ Invokes the success callback whenever the location changes. Returns a `watchId`
130130

131131
Supported options:
132132

133-
* `timeout` (ms)
134-
* `maximumAge` (ms) - Defaults to INFINITY.
135-
* `enableHighAccuracy` (bool)
136-
* `distanceFilter` (m)
137-
* `useSignificantChanges` (bool)
133+
* `timeout` (ms) - Is a positive value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position. Defaults to INFINITY.
134+
* `maximumAge` (ms) - Is a positive value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return. If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. If set to Infinity the device will always return a cached position regardless of its age. Defaults to INFINITY.
135+
* `enableHighAccuracy` (bool) - Is a boolean representing if to use GPS or not. If set to true, a GPS position will be requested. If set to false, a WIFI location will be requested.
136+
* `distanceFilter` (m) - The minimum distance from the previous location to exceed before returning a new location. Set to 0 to not filter locations. Defaults to 100m.
137+
* `useSignificantChanges` (bool) - Uses the battery-efficient native significant changes APIs to return locations. Locations will only be returned when the device detects a significant distance has been breached. Defaults to FALSE.
138138

139139
---
140140

0 commit comments

Comments
 (0)