UmbGeo 17.0.0
dotnet add package UmbGeo --version 17.0.0
NuGet\Install-Package UmbGeo -Version 17.0.0
<PackageReference Include="UmbGeo" Version="17.0.0" />
<PackageVersion Include="UmbGeo" Version="17.0.0" />
<PackageReference Include="UmbGeo" />
paket add UmbGeo --version 17.0.0
#r "nuget: UmbGeo, 17.0.0"
#:package UmbGeo@17.0.0
#addin nuget:?package=UmbGeo&version=17.0.0
#tool nuget:?package=UmbGeo&version=17.0.0
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))
If you are using this helper method, you will need to import the library GeoCoordinates.Core
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)`
If you are using this helper method, you will need to import the library GeoCoordinates.Core
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 | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- GeoCoordinates.Core (>= 1.1.2)
- Umbraco.Cms.Api.Common (>= 17.0.0)
- Umbraco.Cms.Api.Management (>= 17.0.0)
- Umbraco.Cms.Web.Common (>= 17.0.0)
- Umbraco.Cms.Web.Website (>= 17.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.