An .NET library to use the what3words v3 API.
API methods are grouped into a single service object which can be centrally managed by a What3WordsV3 instance. It will act as a factory for all of the API endpoints and will automatically initialize them with your API key.
The artifact is available through NuGet Package
See the what3words public API documentation
To obtain an API key, please visit https://what3words.com/select-plan and sign up for an account.
var wrapper = new What3WordsV3("YOUR_API_KEY_HERE");
If you run our Enterprise Suite API Server yourself, you may specify the URL to your own server like so:
var wrapper = new What3Words("YOUR_API_KEY_HERE", "https://api.yourserver.com")
- ConvertTo3WA() - Convert a coordinate (latitude and longitude) to a 3 word address:
var result = await wrapper.ConvertTo3WA(new Coordinates(51.222011, 0.152311)).RequestAsync();
- ConvertToCoordinates() - Convert a 3 word address to a coordinate (latitude and longitude):
var result = await wrapper.ConvertToCoordinates("filled.count.soap").RequestAsync();
- Autosuggest() - AutoSuggest can take a slightly incorrect 3 word address, and suggest a list of valid 3 word addresses. For more autosuggest proprieties similar to focus below go to our documentation
var result = await wrapper.Autosuggest("index.home.r", new AutosuggestOptions().SetFocus(51.502,-0.12345)).RequestAsync();
- GridSection() - Returns a section of the 3m x 3m what3words grid for a bounding box (Coordinats SW, Coordinates NE).
var result = await wrapper.GridSection(new Coordinates(51.222011, 0.152311), new Coordinates(51.222609, 0.152898)).RequestAsync();
- AvailableLanguages() - Retrieves a list all available 3 word address languages.
var result = await wrapper.AvailableLanguages().RequestAsync();