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(); } } }
public Location getLocation() { if (mGuide == null) { return null; } else { return mGuide.getLocation(); } }
@Override public String getName() { if (mGuide == null) { return ""; } else { return mGuide.getName(); } }