mirror of
https://github.com/farcasclaudiu/BlazorDeviceInterop.git
synced 2026-06-22 15:01:08 +03:00
15 lines
412 B
C#
15 lines
412 B
C#
using Darnton.Blazor.Leaflet.LeafletMap;
|
|
using Darnton.Blazor.DeviceInterop.Geolocation;
|
|
|
|
namespace BlazorDeviceTestRig.Geolocation
|
|
{
|
|
public static class GeolocationPositionExtension
|
|
{
|
|
public static LatLng ToLeafletLatLng(this GeolocationPosition position)
|
|
{
|
|
var coords = position.Coords;
|
|
return new LatLng(coords.Latitude, coords.Longitude);
|
|
}
|
|
}
|
|
}
|