Ejemplo n.º 1
0
  @Override
  public void onGetReverseGeoCodeResult(final ReverseGeoCodeResult result) {
    mGeoCoder.destroy();
    mGeoCoder = null;

    String address = getString(R.string.address_failed);
    if (result != null && result.error == SearchResult.ERRORNO.NO_ERROR)
      address = result.getAddress();

    final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);
    alertDialog.setTitle(R.string.address);
    alertDialog.setMessage(address);
    alertDialog.setPositiveButton(R.string.confirm, null);
    alertDialog.show();
  }
Ejemplo n.º 2
0
  @Override
  protected void onDestroy() {
    if (mMapView != null) mMapView.onDestroy();

    if (mHandler != null) mHandler.removeCallbacks(this);

    if (mRoutePlanSearch != null) mRoutePlanSearch.destroy();

    if (mGeoCoder != null) mGeoCoder.destroy();

    if (mLocationClient != null) mLocationClient.stop();

    mThreadPool.close();
    super.onDestroy();
    exit();
  }