diff --git a/docs/geolocation.html b/docs/geolocation.html index 1471ea99517..7f8de08e71e 100644 --- a/docs/geolocation.html +++ b/docs/geolocation.html @@ -41,11 +41,15 @@ exports.examples : function() { navigator.geolocation.getCurrentPosition( - (initialPosition) => this.setState({initialPosition}), + (position) => { + var initialPosition = JSON.stringify(position); + this.setState({initialPosition}); + }, (error) => alert(error.message), {enableHighAccuracy: true, timeout: 20000, maximumAge: 1000} ); - this.watchID = navigator.geolocation.watchPosition((lastPosition) => { + this.watchID = navigator.geolocation.watchPosition((position) => { + var lastPosition = JSON.stringify(position); this.setState({lastPosition}); }); }, @@ -59,11 +63,11 @@ exports.examples > <Text> <Text style={styles.title}>Initial position: </Text> - {JSON.stringify(this.state.initialPosition)} + {this.state.initialPosition} </Text> <Text> <Text style={styles.title}>Current position: </Text> - {JSON.stringify(this.state.lastPosition)} + {this.state.lastPosition} </Text> </View> ); diff --git a/docs/image.html b/docs/image.html index f1da2e2a1a9..86dcc0da4e0 100644 --- a/docs/image.html +++ b/docs/image.html @@ -43,6 +43,7 @@ network.