如何从Android中的位置获取海拔?

时间:2018-09-17 06:30:11

标签: android gps location altitude

location_manager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,
                            2, 2, mLocationListener);
location = location_manager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
     mAltitude = location.getAltitude();

我尝试了上面的代码来获取高度,但是我没有得到正确的高度答案。 因此,请给我适当的解决方案以从GPS位置获取海拔高度。 我想使用GPS状态和卫星来获取海拔高度,但是我无法获得正确的海拔高度结果。

0 个答案:

没有答案
相关问题