UmbGeo 15.0.3
dotnet add package UmbGeo --version 15.0.3
NuGet\Install-Package UmbGeo -Version 15.0.3
<PackageReference Include="UmbGeo" Version="15.0.3" />
<PackageVersion Include="UmbGeo" Version="15.0.3" />
<PackageReference Include="UmbGeo" />
paket add UmbGeo --version 15.0.3
#r "nuget: UmbGeo, 15.0.3"
#addin nuget:?package=UmbGeo&version=15.0.3
#tool nuget:?package=UmbGeo&version=15.0.3
UmbGeo
A package that gives you a property editor for Geo Coordinates.
Since .net core 3.0, the System.Device.Location
namespace is no longer available. This package provides a property editor for the GeoCoordinate
class.
This package uses a third party library that gives us these classes. The library is called GeoCoordinate.Core
.
For more information about the library, visit the GitHub page for it here.
Installation
To install this package, you can use dotnet add package or find via the NuGet package manager.
dotnet add package UmbGeo
in your console.
Usage
GetDistanceTo()
Displays the distance between the current geolocation and the given coordinate in meters.
@Model.PropertyEditor.GetDistanceTo(new Coordinate(4, 20, 10))
IsWithinDistanceTo()
Returns a bool that checks if the current coordinates are within the given distance to the given coordinate.
@Model.PropertyEditor.IsWithinDistanceTo(new Coordinate(4, 20, 10), 1000)`
ToPrettyString()
Returns a human-readable string of the coordinate in a degrees, minutes, and seconds (DMS) format with N/S and E/W suffixes.
@Model.PropertyEditor.ToPrettyString()
Parse()
Parses a coordinate string in the format "latitude|longitude|elevation" and returns a new <c>Coordinate</c> object.
@{
var coordinateString = "45|90|100";
}
@Coordinate.Parse(coordinateString)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net9.0
- GeoCoordinates.Core (>= 1.1.2)
- Umbraco.Cms.Api.Common (>= 15.3.1)
- Umbraco.Cms.Api.Management (>= 15.3.1)
- Umbraco.Cms.Web.Common (>= 15.3.1)
- Umbraco.Cms.Web.Website (>= 15.3.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.