我写,显示在谷歌地图所在位置的应用程序... 到目前为止,这么好......它确实显示了我的位置正确如何频繁更新GPS位置?
的问题是,这款GPS未更新,如果我移动(或它,但只有一段时间后)
有没有人知道如何做到这一点像本地谷歌地图(对于Android)呢? 这是,如果你点击“我的位置”它显示了一个闪烁的蓝点,你运动时发生改变......
这是我的代码:
//Initializing the listeners
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 35000, 10, networkLocationListener);
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 35000, 10, gpsLocationListener);
//and now, in both 'networkLocationListener' and 'gpsLocationListener'
//I overwrite the method 'onLocationChanged':
@Override
public void onLocationChanged(Location location) {
Log.i("test", "New network location: "+location.getLatitude()+
" , "+location.getLongitude());
myLongitude= location.getLongitude();
myLatitude= location.getLatitude();
}
//and the variables myLongitude and myLatitude are the only ones that I need to display my
//position in the map...
有谁知道,如果我失去了一些东西?