Created
February 24, 2017 15:40
-
-
Save kaueDM/4f0fb8edb28f551037c803ff80b9d4a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { AppRegistry, Text, View } from 'react-native'; | |
| const options = { | |
| enableHighAccuracy: true, | |
| timeout: 10000, | |
| maximumAge: 1000 | |
| }; | |
| const myPosition = () => { | |
| navigator.geolocation.getCurrentPosition( | |
| position => console.log(JSON.stringify(position)), | |
| error => console.log('Erro: ', error)), | |
| options | |
| }; | |
| export default class navigator_test extends Component { | |
| render() { | |
| myPosition() | |
| return ( | |
| <View> | |
| <Text>Navigator test</Text> | |
| </View> | |
| ); | |
| } | |
| } | |
| AppRegistry.registerComponent('navigator_test', () => navigator_test); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment