6

マップ アクティビティが呼び出されると、onCreate で addUserMapPoint を呼び出します。この関数には、myOverlay.getMyLocation を使用して位置情報を取得しようとする 2 つのインスタンスが含まれています。このアクティビティの最初のロードで、最初の試行の結果は null GeoPoint を返し、メイン UI スレッドが完了すると、myOverlay.runOnFirstFix(new Runnable()… のリスナー スレッドにある 2 番目の試行が 1 秒後に呼び出され、含まれています緯度と経度を含むジオポイント. このリスナー関数内の呼び出しは、マップにドットを配置するように見え、行 mapController.animateTo(gp) はマップを自分の場所に移動します. 私のアプリには更新ボタンがあります.クリックすると、このアクティビティが再び開始されます。別のサービスから位置データを取得するには、緯度と経度が必要です。更新後、

myOverlay.getMyLocation へのこの最初の呼び出しで GeoPoint を取得できない場合、myOverlay.runOnFirstFix(new Runnable()… スレッドで見つかった 2 番目の呼び出しから緯度と経度の値を渡すにはどうすればよいでしょうか。ヘルパー Bean クラスである MyApp に lat と lon を追加しようとしましたが、このクラスの lat と lon は、更新後でも null です。最初のアクティビティで addUserMapPoint 関数で lat と lon を手動で設定すると、これらの値は保持されます.これは、メイン UI スレッドで設定されているためだと思います.

public class MapActivity extends com.google.android.maps.MapActivity {
    private MapView mapView = null;
    private MapController mapController = null;
    private MyLocationOverlay myOverlay = null;

    public static MyApp app;

    @Override
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_map);

        app = (MyApp) getApplicationContext();

        mapView = (MapView) findViewById(R.id.mapview);
        mapView.setBuiltInZoomControls(true);
        mapController = mapView.getController();

        List<Overlay> mapOverlays = mapView.getOverlays();
        mapOverlays.clear();

        addUserMapPoint(mapView);

        if (!app.isLocServOff()) {
            //map other points – service call to get items from our service near lat and lon
            addOtherMapPoints(mapOverlays);

        } else {
            Toast.makeText(app.getApplicationContext(),"Current location could not be found.",Toast.LENGTH_LONG).show();
        }

    }

    private void addUserMapPoint(MapView mapView){
            myOverlay = new MyLocationOverlay(app.getApplicationContext(), mapView);
            myOverlay.disableCompass();
        myOverlay.enableMyLocation();


            if(app.getMyLat()==null||app.getMyLon()==null){
                GeoPoint gp = myOverlay.getMyLocation();
                if(gp!=null){
                    app.setMyLat(Helper.latLon1E6Calc(gp.getLatitudeE6()));
                    app.setMyLon(Helper.latLon1E6Calc(gp.getLongitudeE6()));
                    app.setLocServOff(false);
                }else{
                    app.setLocServOff(true);
                }
        }


        myOverlay.runOnFirstFix(new Runnable() {   
                public void run() {     
                    GeoPoint gp = myOverlay.getMyLocation();    
                    if(gp!=null){
                        app.setMyLat(Helper.latLon1E6Calc(gp.getLatitudeE6()));
                        app.setMyLon(Helper.latLon1E6Calc(gp.getLongitudeE6()));
                        app.setLocServOff(false);   
                        mapController.animateTo(gp);
                    }else{
                        app.setLocServOff(true);
                    }
                }    
            });

        mapView.getOverlays().add(myOverlay);
    }   

}

次の質問について、あなたの助けが求められています。メイン UI スレッドで緯度と経度を含む GeoPoint を取得するにはどうすればよいですか、または myOverlay.runOnFirstFix(new Runnable()… スレッドから取得できる GeoPoint からこれらの値を渡すにはどうすればよいですか?

Handler または runOnUiThread の使用を提案する場合は、緯度と経度をメイン UI スレッド/マップ ビューで使用できるものに戻すコード例を提供してください。次のコードのような、望ましい結果が得られないことを試しました。トースト メッセージを表示することはできましたが、使用できる方法で渡された緯度と経度を取得できませんでした。

    final Handler handler = new Handler();   
    myOverlay.runOnFirstFix(new Runnable() {                     
        @Override public void run() {

            handler.post(new Runnable() {                                   
                @Override public void run() {

                        GeoPoint gp = myOverlay.getMyLocation();    
                        if(gp!=null){
                            app.setMyLat(Helper.latLon1E6Calc(gp.getLatitudeE6()));
                            app.setMyLon(Helper.latLon1E6Calc(gp.getLongitudeE6()));
                            app.setLocServOff(false);   
                            mapController.animateTo(gp);                                

                        }else{
                            app.setLocServOff(true);
                        }

                    //Toast.makeText(getApplicationContext(),"wowoowowowoowoowowow",Toast.LENGTH_LONG).show();                      
                    }                                  
                });

            }                
        }); 

また、次のようなコードを使用して緯度と経度を取得しましたが、機能しますが、現在の場所は、返されたものとは異なる緯度と経度になることがあるため、たとえば gps 信号を取得できませんでしたが、古い値が返されました。緯度/経度データが 2 分より古いかどうかを確認するチェックを追加しましたが、最新の緯度と経度を myOverlay.getMyLocation によって返されたものと一致させることができませんでした。

    LocationManager locMgr = (LocationManager)appcontext.getSystemService(Context.LOCATION_SERVICE);
    MyLocationListener locLstnr = new MyLocationListener();

    //fetch current location for current location 
    locMgr.requestSingleUpdate(LocationManager.GPS_PROVIDER, locLstnr, appcontext.getMainLooper());  
4

5 に答える 5

2
handler.post(new Runnable() {                                   
            @Override public void run() {

                    GeoPoint gp = myOverlay.getMyLocation();    
                    if(gp!=null){
                        app.setMyLat(Helper.latLon1E6Calc(gp.getLatitudeE6()));
                        app.setMyLon(Helper.latLon1E6Calc(gp.getLongitudeE6()));
                        app.setLocServOff(false);

                        // HERE WE HAVE VALID gp VALUE AND WE NEED TO SHARE IT

                        mapController.animateTo(gp);                                

                    }else{
                        app.setLocServOff(true);
                    }
                }                                  
            });

別のスレッドから呼び出しているため、app.set / get | MyLat/Lonが機能していないと思います。これを修正するには、セットを同期し、MyLat/Longのメソッドを取得します。(同期用のオブジェクトを作成し、同期します)

または、ハンドラーを使用する方法が気に入った場合は、これでうまくいくはずです。

final Handler handler = new Handler(); // BE SURE TO RUN THIS LINE ON UI THREAD
...   
myOverlay.runOnFirstFix(new Runnable() {                     
    @Override public void run() {

        // THIS PART WORKS AS BEFORE
        final GeoPoint gp = myOverlay.getMyLocation();
        mapController.animateTo(gp);                        
        ...
        // AND THIS RUNNABLE TO UPDATE MyLat/MyLong FROM UI THREAD
        handler.post(new Runnable() {                                   
            @Override public void run() {
               app.setMyLat(Helper.latLon1E6Calc(gp.getLatitudeE6()));
               app.setMyLon(Helper.latLon1E6Calc(gp.getLongitudeE6()));
            });

        }                
    }); 
于 2012-12-28T13:21:33.510 に答える
2

デバイスの位置を探す際に考慮しなければならない最も重要な点のいくつかは次のとおりです。

  1. 衛星 GPS 修正は、適切な時間内に受信されるとは限りません。例: デバイスが建物の中にある / 空の下ではない。
  2. 衛星 GPS リスナーが長時間アクティブに保たれないようにしてください。リスナーをオンにしておくことは、GPS ラジオを常にオンにしておくことを意味し、バッテリーを消耗する最大の理由になります。

以下のコード例では、LinkedBlockingQueue の poll メソッドは、指定された時間間隔が終了するか、Location がキューに入れられるまで戻りません。

以下のようなものを使用して、現在の場所を取得します。

    Location getCurrentLocation() {
    long startmillis = 0;
    LinkedBlockingQueue<Location> mQueue = new LinkedBlockingQueue<Location>();
            try{


                long millisSinceLastCollection = System.currentTimeMillis() - startmillis; 


                startmillis = System.currentTimeMillis();
                mQueue.clear();

    // Register for Satellite GPS listener as well as Network GPS listener.
                registerGPSListeners();

                // Wait for a maximum of one minutes for a fix
                Location firstfix = mQueue.poll(1, TimeUnit.MINUTES);


                if(firstfix != null && firstfix.getProvider().equals(LocationManager.GPS_PROVIDER)) {
                    return firstfix;
                }

                long elapsedmillis = System.currentTimeMillis() - startmillis;
                long remainingmillis = ONE_MINUTE_IN_MS - elapsedmillis; 
                if (remainingmillis <= 0){
                    return firstfix;
                }

                Location secondfix = mQueue.poll(remainingmillis, TimeUnit.MILLISECONDS);

                if(secondfix != null && secondfix.getProvider().equals(LocationManager.GPS_PROVIDER)) {
                    return secondfix;
                }

                /*
                 * In case we receive fix only from Network provider, return it.
                 */
                if(firstfix != null && firstfix.getProvider().equals(LocationManager.NETWORK_PROVIDER)) {
                    return firstfix;
                }

            } catch(Exception e){
                Logger.e("GPS: Exception while listening for the current location", e);
            } finally {
                Logger.i("GPS: Unsubscribing from any existing GPS listeners");
                unregisterGPSListeners();

            }
    }


// GPS issue fix edit.
    private void registerGPSListeners() {

        LocationManager locationManager = (LocationManager)AirWatchApp.getAppContext().getSystemService(Context.LOCATION_SERVICE);

        if(locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER))
            locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 30000, 100, oneShotNetworkGPSLocationListener, MyAppApp.getAppContext().getMainLooper());

        if(locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){
            locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 30000, 100, oneShotSatelliteGPSLocationListener, AirWatchApp.getAppContext().getMainLooper());
        }
    }

    private void unregisterGPSListeners(){

        final LocationManager locationManager = (LocationManager)MyApp.getAppContext().getSystemService(Context.LOCATION_SERVICE);
        locationManager.removeUpdates(oneShotSatelliteGPSLocationListener);
        locationManager.removeUpdates(oneShotNetworkGPSLocationListener);
    }

//One shot location listener
    protected LocationListener oneShotSatelliteGPSLocationListener = new LocationListener() {
        public void onLocationChanged(Location location) {

            try {
                mQueue.put(location);
            } catch (InterruptedException e) {
                Logger.e("Exception in putting new Location to the queue", e);
            }

            Logger.d("GPS: Location received from Satellite GPS Provider");
            unregisterGPSListeners();
        }

        public void onProviderDisabled(String provider) {}
        public void onStatusChanged(String provider, int status, Bundle extras) {}
        public void onProviderEnabled(String provider) {}
    };

    //One shot location listener
    protected LocationListener oneShotNetworkGPSLocationListener = new LocationListener() {
        public void onLocationChanged(Location location) {

            try {
                mQueue.put(location);
            } catch (InterruptedException e) {
                Logger.e("Exception in putting new Location to the queue", e);
            }

            Logger.d("GPS: Location received from Network GPS Provider");
            // Stop Listener for one-shot location fix from Network GPS provider.
            final LocationManager locationManager = (LocationManager)AirWatchApp.getAppContext().getSystemService(Context.LOCATION_SERVICE);
            locationManager.removeUpdates(oneShotNetworkGPSLocationListener);
            Logger.d("GPS: Unsubscribed the network location listener.");
        }

        public void onProviderDisabled(String provider) {}
        public void onStatusChanged(String provider, int status, Bundle extras) {}
        public void onProviderEnabled(String provider) {}
    };
于 2012-12-27T17:13:02.307 に答える
2

Android はユーザー インターフェースを変更し、単一のユーザー インターフェース スレッド (メイン スレッド) からの入力イベントを処理します。

プログラマーがコンカレンシー コンストラクトを使用しない場合、Android アプリケーションのすべてのコードはこのスレッドで実行されます。

GPSはユーザーの位置を特定するための最良の方法ですが、全地球測位衛星に ping を送信しすぎると、モバイル デバイスのバッテリーが急速に消耗し、ユーザーの位置を取得するのに時間がかかります。また、この方法は屋内では常に機能するとは限りません。You are not getting your location in first attempt that's why you are getting null over there.

Androidは、携帯Network Location Provider電話基地局と Wi-Fi 信号に基づいてユーザーの位置を割り出します。GPS よりバッテリー消費が少ないだけでなく、より高速で、ユーザーが屋外にいても屋内にいても機能します。

その show の下に作業コードを提供progress dialogし、ユーザーの場所をリッスンし、場所を取得した後、ユーザーlocation overlayGoogle マップに表示します

My メインクラスで以下の権限を与えていると仮定しますMenifest file
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>

public class MyLocationOnMap extends MapActivity {

private MapView mapView;
private MyLocationOverlay itemizedoverlay;
private LocationManager locationManager;
private String provider;
private MyLocationListener locationListener;
MyBroadCastreceiver myBroadCastreceiver;
/**
 * My current Location <i>longitude</i>.
 */
static int longitude;
/**
 * My current Location <i>latitude</i>.
 */
static int latitude;
/**
 *My progress indicator. 
 */
ProgressDialog loadingDialog;

public static final String INTENT_FILTER_TAG="my location broadcast receiver";


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.my_location_on_map);

    loadingDialog = new ProgressDialog(this);
    loadingDialog.setTitle("Hot Spots!");
    loadingDialog.setMessage("Please wait ...");
    loadingDialog.setIndeterminate(true);
    loadingDialog.setCancelable(false);

    loadingDialog.show();

 // Configure the Map
    mapView = (MapView) findViewById(R.id.mapview);
    mapView.setBuiltInZoomControls(true);
    mapView.setStreetView(true);

    /**
     * Get your location manager and Location Listener...
     */
    locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
    locationListener=new MyLocationListener();

    myBroadCastreceiver = new MyBroadCastreceiver();

        if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
            Log.i("GPS_Enabled", "GPS enable! listening for gps location.");
            locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 10000, 0, locationListener);
            registerReceiver(myBroadCastreceiver, new IntentFilter(INTENT_FILTER_TAG));
        } else if (locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {
            Log.i("Network_Enabled", "Network enable! listening for Network location.");
            locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 10000, 0, locationListener);
            registerReceiver(myBroadCastreceiver, new IntentFilter(INTENT_FILTER_TAG));
        } else {
            loadingDialog.dismiss();
            Toast.makeText(this, "No Provider enable!", Toast.LENGTH_LONG).show();
        }

}//End of onCreate......

 /**
 * My BroadCast Receiver, that is called when i get the location of user.
 * @author Rupesh Yadav.
 *
 */
class MyBroadCastreceiver extends BroadcastReceiver{

    @Override
    public void onReceive(Context context, Intent intent) {
        //Remove location update when you get user`s location very first time.
        locationManager.removeUpdates(locationListener);
        //Remove the broadcast listener that update my location on map.
        unregisterReceiver(myBroadCastreceiver);

        GeoPoint point = new GeoPoint(latitude, longitude);
        mapView.getController().animateTo(point);

        List<Overlay> mapOverlays = mapView.getOverlays();
        Drawable drawable = MyLocationOnMap.this.getResources().getDrawable(R.drawable.hs_mapoverlay);
        itemizedoverlay = new MyLocationOverlay(drawable, MyLocationOnMap.this);

        OverlayItem overlayitem = new OverlayItem(point, "Hello!", "My Current Location :)");

        itemizedoverlay.addOverlay(overlayitem);
        mapOverlays.add(itemizedoverlay);

        loadingDialog.dismiss();

    }

}

/**
 * My Location listener...
 */
class MyLocationListener implements LocationListener{
    @Override
    public void onLocationChanged(Location location) {
        latitude=(int) ((location.getLatitude())*1E6);
        longitude=(int) ((location.getLongitude())*1E6);

        //Send broadcast to update my location.
        Intent sendLocationIntent=new Intent(INTENT_FILTER_TAG);
        sendBroadcast(sendLocationIntent);
    }
    @Override
    public void onProviderDisabled(String provider) {
        // TODO Auto-generated method stub
    }
    @Override
    public void onProviderEnabled(String provider) {
        // TODO Auto-generated method stub
    }
    @Override
    public void onStatusChanged(String provider, int status, Bundle extras) {
        // TODO Auto-generated method stub
    }

}

@Override
protected boolean isRouteDisplayed() {
    // TODO Auto-generated method stub
    return false;
}

}

MyLocationOverlay クラス

public class MyLocationOverlay extends ItemizedOverlay<OverlayItem> {

Context mContext;
private ArrayList<OverlayItem> hsOverlays = new ArrayList<OverlayItem>();

public MyLocationOverlay(Drawable defaultMarker) {
    super(boundCenterBottom(defaultMarker));
    // TODO Auto-generated constructor stub
}

public MyLocationOverlay(Drawable defaultMarker, Context context) {
    super(boundCenterBottom(defaultMarker));
    mContext = context;
}

@Override
protected OverlayItem createItem(int i) {
    // TODO Auto-generated method stub
    return hsOverlays.get(i);
}

@Override
public int size() {
    // TODO Auto-generated method stub
    return hsOverlays.size();
}

/**
 * add new OverlayItem objects to map OverlayItem ArrayList.
 * 
 * @param overlay
 */
public void addOverlay(OverlayItem overlay) {
    hsOverlays.add(overlay);
    populate();
}

/**
 * Called when user clicks on map overlay.
 */
@Override
protected boolean onTap(int index) {
    // TODO Auto-generated method stub
    // return super.onTap(index);
    OverlayItem item = hsOverlays.get(index);
    AlertDialog.Builder dialog = new AlertDialog.Builder(mContext);
    dialog.setTitle(item.getTitle());
    dialog.setMessage(item.getSnippet());
    dialog.show();
    return true;
}

Location Listener必要に応じて&を変更できBroadcasr Receiverます。これで問題が解決することを願っています。
よろしくお願いします!

于 2012-12-28T13:52:10.583 に答える
2

このクラスを使用して、緯度と経度を検出しました。これがあなたにとっても役立つことを願っています。

使用方法の例: GPSUtility.getInstance(Context).getLatitude(); GPSUtility.getInstance(CamPhotoModeAct.this).getLongitude()

public class GPSUtility {
    public static final String TAG = "GPSUtility";

    private Context ctx;

    Timer timer1;
    LocationManager lm;
    LocationResult locationResult;
    boolean gps_enabled=false;
    boolean network_enabled=false;

    private double latitude;
    private double longitude;

    private static SharedPreferences SHARED_PREF;
    private static SharedPreferences.Editor EDITOR_SHARED_PREF;

    private static GPSUtility this_instance;

    public GPSUtility(Context ctx){
        this.ctx = ctx;
        SHARED_PREF = ctx.getSharedPreferences(ConstantsG.SHARED_PREF_FILE, Context.MODE_PRIVATE);
        EDITOR_SHARED_PREF = SHARED_PREF.edit();
        this.getLocation(innerLocationResult);
    }

    public static GPSUtility getInstance(Context ctx){
        if(this_instance == null)
            this_instance = new GPSUtility(ctx);
        return this_instance;
    }

    public static void updateLocation(Context ctx){
        GPSUtility.getInstance(ctx);//this writes the latitude and longitude in sharable preference file
    }

    public double getLatitude(){
        String latitudeStr = SHARED_PREF.getString(ConstantsG.KEY_LATITUDE,null);
        if(latitudeStr == null){
            latitude = 0.0;
        }
        else{
            latitude = Double.parseDouble(latitudeStr);
        }
        return latitude;
    }

    public double getLongitude(){
        String longitudeStr = SHARED_PREF.getString(ConstantsG.KEY_LONGITUDE,null);
        if(longitudeStr == null){
            longitude = 0.0;
        }
        else{
            longitude = Double.parseDouble(longitudeStr);
        }
        return longitude;
    }

    private void updateWithNewLocation(Location location) {

        if (location != null) {
            latitude = location.getLatitude();
            EDITOR_SHARED_PREF.putString(ConstantsG.KEY_LATITUDE, String.valueOf(latitude) );

            longitude = location.getLongitude();
            EDITOR_SHARED_PREF.putString(ConstantsG.KEY_LONGITUDE, String.valueOf(longitude));

            EDITOR_SHARED_PREF.commit();
        }
    }

    public boolean getLocation(LocationResult result)
    {
        //I use LocationResult callback class to pass location value from GPSUtility to user code.
        locationResult=result;
        if(lm==null)
            lm = (LocationManager) this.ctx.getSystemService(Context.LOCATION_SERVICE);

        //exceptions will be thrown if provider is not permitted.
        try {
            gps_enabled = lm.isProviderEnabled(LocationManager.GPS_PROVIDER);
        } catch (Exception ex) {
            Log.e(TAG, "Exception error: " + ex.getLocalizedMessage(), ex);
        }
        try {
            network_enabled = lm
                    .isProviderEnabled(LocationManager.NETWORK_PROVIDER);
        } catch (Exception ex) {
            Log.e(TAG, "Exception error: " + ex.getLocalizedMessage(), ex);
        }

        //Toast.makeText(context, gps_enabled+" "+network_enabled,     Toast.LENGTH_LONG).show();

        //don't start listeners if no provider is enabled
        if(!gps_enabled && !network_enabled){
            Toast.makeText(this.ctx, "You should enable gps or be connected to network.", Toast.LENGTH_LONG).show();
            return false;
        }

        if(gps_enabled)
            lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListenerGps);
        if(network_enabled)
            lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListenerNetwork);
        timer1=new Timer();


        timer1.schedule(new GetLastLocation(), 10000);
        return true;
    }

    LocationListener locationListenerGps = new LocationListener() {
        public void onLocationChanged(Location location) {
            timer1.cancel();
            locationResult.gotLocation(location);
            lm.removeUpdates(this);
            lm.removeUpdates(locationListenerNetwork);
        }
        public void onProviderDisabled(String provider) {}
        public void onProviderEnabled(String provider) {}
        public void onStatusChanged(String provider, int status, Bundle extras) {}
    };

    LocationListener locationListenerNetwork = new LocationListener() {
        public void onLocationChanged(Location location) {
            timer1.cancel();
            locationResult.gotLocation(location);
            lm.removeUpdates(this);
            lm.removeUpdates(locationListenerGps);
        }
        public void onProviderDisabled(String provider) {}
        public void onProviderEnabled(String provider) {}
        public void onStatusChanged(String provider, int status, Bundle extras) {}
    };

    class GetLastLocation extends TimerTask {
        @Override
        public void run() {
            //Context context = getClass().getgetApplicationContext();
             Location net_loc=null, gps_loc=null;
             if(gps_enabled)
                 gps_loc=lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
             if(network_enabled)
                 net_loc=lm.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);

             //if there are both values use the latest one
             if(gps_loc!=null && net_loc!=null){
                 if(gps_loc.getTime()>net_loc.getTime())
                     locationResult.gotLocation(gps_loc);
                 else
                     locationResult.gotLocation(net_loc);
                 return;
             }

             if(gps_loc!=null){
                 locationResult.gotLocation(gps_loc);
                 return;
             }
             if(net_loc!=null){
                 locationResult.gotLocation(net_loc);
                 return;
             }
             locationResult.gotLocation(null);
        }
    }


    public static abstract class LocationResult{
        public abstract void gotLocation(Location location);
    }

    LocationResult innerLocationResult = new LocationResult() {
        @Override
        public void gotLocation(Location location) {
            updateWithNewLocation(location);
        }
    };
}
于 2012-12-28T15:36:08.857 に答える