Sportronics.Utility.WhatThreeWords 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Sportronics.Utility.WhatThreeWords --version 1.0.1                
NuGet\Install-Package Sportronics.Utility.WhatThreeWords -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sportronics.Utility.WhatThreeWords" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Sportronics.Utility.WhatThreeWords --version 1.0.1                
#r "nuget: Sportronics.Utility.WhatThreeWords, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Sportronics.Utility.WhatThreeWords as a Cake Addin
#addin nuget:?package=Sportronics.Utility.WhatThreeWords&version=1.0.1

// Install Sportronics.Utility.WhatThreeWords as a Cake Tool
#tool nuget:?package=Sportronics.Utility.WhatThreeWords&version=1.0.1                

W3W

About

A C# .Net 6 Console app that can generate W3W map tri-word and related json data from GPS coordinates.

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 lattitude and longitude coordinates into Data.cs
      OR
  • Enter lattitude 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
    • WhatThreeWords.GetW3W() Returns W3W class instance
    • Usage:
var w3wjson = await WhatThreeWords.GetW3W(lattitude, longitude, w3wkey);
  • WhatThreeWordsConsole: Console app that calls WhatThreeWords Class
    • Same functionality as W3WProject though.
  • WhatThreeWordsNugetConsole: As previous but uses Nuget Package WhatThreeWords
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last updated
1.3.0 244 11/2/2023
1.2.0 159 11/2/2023
1.1.0 158 10/27/2023
1.0.1 175 10/22/2023

Removed Console.WriteLines