We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this.listener = Location.addLocationListener(location => { this.setState({location}); const coord={ latitude:location.latitude, longitude:location.longitude, } const latitude=location.latitude const longitude=location.longitude global.latitudeGlobal=location.latitude global.longitudeGlobal=location.longitude this.setState({ latitude,longitude }) Geocode.reverse(coord).then( (Promise)=>{ var city=Promise.city this.setState({city}) global.cityglobal=Promise.city } ); }) 我是在componentDidMount函数里调用的这个监听,获取到了城市,获取到了经纬度,多次测试,报这个错的时候非常少,10次里面只有一次会出现这种情况,请问这个的原因是什么呢?
The text was updated successfully, but these errors were encountered:
我也碰到,同问
Sorry, something went wrong.
同问,一般出现在第一次打开app定位的时候,第一次不行,再试就行了
No branches or pull requests
this.listener = Location.addLocationListener(location => {
this.setState({location});
const coord={
latitude:location.latitude,
longitude:location.longitude,
}
const latitude=location.latitude
const longitude=location.longitude
global.latitudeGlobal=location.latitude
global.longitudeGlobal=location.longitude
this.setState({
latitude,longitude
})
Geocode.reverse(coord).then(
(Promise)=>{
var city=Promise.city
this.setState({city})
global.cityglobal=Promise.city
}
);
})
我是在componentDidMount函数里调用的这个监听,获取到了城市,获取到了经纬度,多次测试,报这个错的时候非常少,10次里面只有一次会出现这种情况,请问这个的原因是什么呢?
The text was updated successfully, but these errors were encountered: