use of org.osmdroid.api.IGeoPoint in project Conversations by siacs.
the class ShareLocationActivity method shareLocation.
private void shareLocation(final View view) {
final Intent result = new Intent();
if (marker_fixed_to_loc && myLoc != null) {
result.putExtra("latitude", myLoc.getLatitude());
result.putExtra("longitude", myLoc.getLongitude());
result.putExtra("altitude", myLoc.getAltitude());
result.putExtra("accuracy", DoubleMath.roundToInt(myLoc.getAccuracy(), RoundingMode.HALF_UP));
} else {
final IGeoPoint markerPoint = this.binding.map.getMapCenter();
result.putExtra("latitude", markerPoint.getLatitude());
result.putExtra("longitude", markerPoint.getLongitude());
}
setResult(RESULT_OK, result);
finish();
}
use of org.osmdroid.api.IGeoPoint in project Conversations by siacs.
the class LocationActivity method onSaveInstanceState.
@Override
protected void onSaveInstanceState(@NonNull final Bundle outState) {
super.onSaveInstanceState(outState);
final IGeoPoint center = map.getMapCenter();
outState.putParcelable(KEY_LOCATION, new GeoPoint(center.getLatitude(), center.getLongitude()));
outState.putDouble(KEY_ZOOM_LEVEL, map.getZoomLevelDouble());
}