私は、これまで ...それがない...とても良いグーグルマップで自分の位置を示したアプリケーションを書いていますが、私の場所を示して正しくgpsの場所を頻繁に更新するには?
問題は、私は動いていた場合、このGPSは更新されないということです(または、しばらくしてから)
ネイティブのGoogleマップ(アンドロイド用)のようにこれを行う方法を知っている人はいますか? これは、これは私のコードです...あなたは「私の場所」をクリックした場合、それはあなたが移動するように変更点滅する青の点を示し、
です:私は何かが欠けていた場合
//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...
は誰もが知っています?