Beispiel #1
0
  private void log(BDLocation location) {
    StringBuffer sb = new StringBuffer(256);
    sb.append("time : ");
    sb.append(location.getTime());
    sb.append("\nerror code : ");
    sb.append(location.getLocType());
    sb.append("\nlatitude : ");
    sb.append(location.getLatitude());
    sb.append("\nlontitude : ");
    sb.append(location.getLongitude());
    sb.append("\nradius : ");
    sb.append(location.getRadius());
    sb.append("\ncity : ");
    sb.append(location.getProvince());
    sb.append(location.getCity());
    sb.append(location.getDistrict());
    if (location.getLocType() == BDLocation.TypeGpsLocation) {
      sb.append("\nspeed : ");
      sb.append(location.getSpeed());
      sb.append("\nsatellite : ");
      sb.append(location.getSatelliteNumber());
    } else if (location.getLocType() == BDLocation.TypeNetWorkLocation) {
      sb.append("\naddr : ");
      sb.append(location.getAddrStr());
    }

    MMLog.autoDebug(sb.toString());
  }