mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-04 18:26:25 +01:00
21 lines
534 B
C#
21 lines
534 B
C#
using Xamarin.Essentials;
|
|
|
|
namespace TINK.Services.Geolocation
|
|
{
|
|
public static class LocationHelper
|
|
{
|
|
/// <summary>
|
|
/// Converts Xamarin.Essentials Location object to Geolocatin object.
|
|
/// </summary>
|
|
/// <param name="location"></param>
|
|
/// <returns></returns>
|
|
public static IGeolocation ToGeolocation(this Location location)
|
|
=> new Geolocation.Builder
|
|
{
|
|
Latitude = location.Latitude,
|
|
Longitude = location.Longitude,
|
|
Accuracy = location.Accuracy,
|
|
Timestamp = location.Timestamp,
|
|
}.Build();
|
|
}
|
|
}
|