[ReactNative] geolocation method docs

This commit is contained in:
Spencer Ahrens
2015-04-24 16:10:46 -07:00
parent a1a15bda06
commit 68eb3e4906
2 changed files with 18 additions and 3 deletions

View File

@@ -50,7 +50,8 @@ var GeolocationExample = React.createClass({
componentDidMount: function() {
navigator.geolocation.getCurrentPosition(
(initialPosition) => this.setState({initialPosition}),
(error) => console.error(error)
(error) => console.error(error),
{enableHighAccuracy: true, timeout: 100, maximumAge: 1000}
);
this.watchID = navigator.geolocation.watchPosition((lastPosition) => {
this.setState({lastPosition});