void setDistance(Bookmark bmk) { final Location loc = LocationHelper.INSTANCE.getSavedLocation(); if (loc != null) { final DistanceAndAzimut daa = bmk.getDistanceAndAzimuth(loc.getLatitude(), loc.getLongitude(), 0.0); distance.setText(daa.getDistance()); } else distance.setText(null); }
private void updatePedestrian(RoutingInfo info) { Location next = info.pedestrianNextDirection; Location location = LocationHelper.INSTANCE.getLastLocation(); DistanceAndAzimut da = Framework.nativeGetDistanceAndAzimutFromLatLon( next.getLatitude(), next.getLongitude(), location.getLatitude(), location.getLongitude(), mNorth); String[] splitDistance = da.getDistance().split(" "); mDistanceTurn.setText( Utils.formatUnitsText( R.dimen.text_size_display_1, R.dimen.text_size_toolbar, splitDistance[0], splitDistance[1])); if (info.pedestrianTurnDirection != null) info.pedestrianTurnDirection.setTurnDrawable(mTurnDirection, da); }