Ejemplo n.º 1
0
  public void onLocationChanged(Location location) {
    // Logger.d(TAG, "onLocationChanged(" + location + ")");

    if (mGuide != null) {
      boolean bContinue = true;

      if (location != null) {
        bContinue = mGuide.actualizeState(location);
        mTargetName = mGuide.getTargetName();
        mAzimuthToTarget = mGuide.getAzimuthToTaget();
        mDistanceToTarget = mGuide.getDistanceToTarget();
      } else {
        bContinue = true;
        mTargetName = null;
        mAzimuthToTarget = 0.0f;
        mDistanceToTarget = 0.0f;
      }

      if (bContinue == true) {
        for (GuidingListener list : listeners) {
          list.receiveGuideEvent(mGuide, mTargetName, mAzimuthToTarget, mDistanceToTarget);
        }
      } else {
        A.getGuidingContent().guideStop();
      }
    }
  }
Ejemplo n.º 2
0
 public Location getLocation() {
   if (mGuide == null) {
     return null;
   } else {
     return mGuide.getLocation();
   }
 }
Ejemplo n.º 3
0
 @Override
 public String getName() {
   if (mGuide == null) {
     return "";
   } else {
     return mGuide.getName();
   }
 }