mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-13 22:06:29 +01:00
22 lines
534 B
C#
22 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();
|
||
|
}
|
||
|
}
|