Sportronics.Utility.WhatThreeWords
1.2.0
See the version list below for details.
dotnet add package Sportronics.Utility.WhatThreeWords --version 1.2.0
NuGet\Install-Package Sportronics.Utility.WhatThreeWords -Version 1.2.0
<PackageReference Include="Sportronics.Utility.WhatThreeWords" Version="1.2.0" />
paket add Sportronics.Utility.WhatThreeWords --version 1.2.0
#r "nuget: Sportronics.Utility.WhatThreeWords, 1.2.0"
// Install Sportronics.Utility.WhatThreeWords as a Cake Addin #addin nuget:?package=Sportronics.Utility.WhatThreeWords&version=1.2.0 // Install Sportronics.Utility.WhatThreeWords as a Cake Tool #tool nuget:?package=Sportronics.Utility.WhatThreeWords&version=1.2.0
W3W
<hr/>
<font color="blue">Latest:</font> Added a .NET MAUI app to action the triword generation. And reverse lookup (to GPS) Console app. And get Bing Static Map. And ... Blazor Map app. And Windows Form app.
<hr/>
About
A C# .Net 6 Console app that can generate W3W map tri-word and related json data from GPS coordinates. Includes lib version and Nuget package enabling reuse of functionality. Also Blazor Server version with UI input. And .NET MAUI app. Reverse lookup Console app added (triwords to GPS).
- W3W: What Three Words
- Three words that uniquley define a square 3mx3m (10'x10') world-wide
- eg Try this: https://what3words.com/adjust.case.trains
Links
- Blog
- Getting Started
- Get API Key
- Can get Free key, 100 lookups per month.
Sample Output
Hi from Word3Word App!
Getting json string using httpClient.GetAsync
=====================================================
json string: {"country":"AU","square":{"southwest":{"lng":144.918576,"lat":-37.751105},"northeast":{"lng":144.91861,"lat":-37.751078}},"nearestPlace":"Essendon, Victoria","coordinates":{"lng":144.918593,"lat":-37.751092},"words":"adjust.case.trains","language":"en","map":"https:\/\/w3w.co\/adjust.case.trains"}
---------------------------
json string parsed OK
Getting json direct using httpClient.GetFromJsonAsync
=====================================================
Country: AU
Nearest Place: Essendon, Victoria
W3W Words: adjust.case.trains
---------------------------
Map Link: https://w3w.co/adjust.case.trains
The map link URL is on the clipboard.
Usage
Get What3Words Tri-words for GPS location.
- Get an API Key (See link above)
- Insert into Data.cs
- Insert latitude and longitude coordinates into Data.cs
OR
- Insert latitude and longitude coordinates into Data.cs
- Enter latitude longitude on command line.
- AND (Optionally) enter API Key as third parameter.
- Run the app.
- Paste the Url generated into a Web Browser.
Update: Projects
- W3WProject: Standalone Console project
- WhatThreeWords: W3W in static class library
- Note: Also available as Nuget package: Sportronics.Utility.WhatThreeWords
- Includes class definition for W3W
WhatThreeWords.GetW3W()
Returns W3W class instance- Usage:
var w3wjson = await WhatThreeWords.GetW3WAsync(latitude, longitude, w3wkey);
- WhatThreeWordsConsole: Console app that calls WhatThreeWords Class
- Same functionality as W3WProject though.
- WhatThreeWordsNugetConsole: As previous but uses Nuget Package Sportronics.Utility.WhatThreeWords
- Note: Original Nuget package WhatThreeWords has been deprecated.
- W3WBlazor: Blazor Server app with form entry of GPS and key.
- Once searched can click on map link.
- NetMauiW3W: A Simple .NET MAUI app to do the same.
- GetGPSNugetConsole: (Reverse) Console app to lookup up GPS from What3Words dotted string
- WhatThreeWords class has added method to do reverse lookup
- In Nuget package as used by this app.
- WhatThreeWords class has added method to do reverse lookup
var w3wjson = await WhatThreeWords.GetGPSAsync(words3, w3wkey);
- GetGPS2BingMaps As per previous app but generates Bing Static Map URL.
- GPSMapfromW3WBlazor Get GPS from W3W and display on Bing Map inapp.
- Requires Telerik License. See previous use of the app at Steps 1..3
- W3WFormApp Windows forms equivalent of GetGPSNugetConsole/W3WBlazor apps.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Added reverse lookup (W3W -->GPS)