Online Maps v3
Loading...
Searching...
No Matches
OnlineMapsWhat3Words Class Reference

The what3words API gives you programmatic access to convert a 3 word address to coordinates (forward geocoding), to convert coordinates to a 3 word address (reverse geocoding), to obtain suggestions based on a full or partial 3 word address (AutoSuggest and StandardBlend), to obtain a geographically bounded section of the 3m x 3m what3words grid and to determine the languages that the API currently supports. https://docs.what3words.com/api/v3/. More...

Inheritance diagram for OnlineMapsWhat3Words:
OnlineMapsTextWebService OnlineMapsWebServiceAPI

Classes

class  Clip
 Restricts results to those within a geographical area. More...
 

Public Types

enum  Display { full , terse , minimal }
 Display type. More...
 

Static Public Member Functions

static OnlineMapsWhat3Words AutoSuggest (string key, string addr, bool multilingual=false, string lang="en", OnlineMapsVector2d? focus=null, Clip clip=null, int? count=null, Display display=Display.full)
 Returns a list of 3 word addresses based on user input and other parameters.
 
static OnlineMapsWhat3Words Forward (string key, string addr, string lang=null, Display display=Display.full)
 Forward geocodes a 3 word address to a position, expressed as coordinates of latitude and longitude.
 
static OnlineMapsWhat3Words GetLanguages (string key)
 Retrieves a list of the currently loaded and available 3 word address languages.
 
static OnlineMapsWhat3WordsFRResult GetForwardReverseResult (string response)
 Converts the response string from Forward or Reverse geocoding to result object.
 
static OnlineMapsWhat3WordsSBResult GetSuggestionsBlendsResult (string response)
 Converts the response string from AutoSuggest or StandardBlend to result object.
 
static OnlineMapsWhat3WordsGridResult GetGridResult (string response)
 Converts the response string from Grid to result object.
 
static OnlineMapsWhat3WordsLanguagesResult GetLanguagesResult (string response)
 Converts the response string from Get Languages to result object.
 
static OnlineMapsWhat3Words Grid (string key, OnlineMapsGeoRect bbox)
 Returns a section of the 3m x 3m what3words grid for a given area.
 
static OnlineMapsWhat3Words Reverse (string key, OnlineMapsVector2d coords, string lang=null, Display display=Display.full)
 Reverse geocodes coordinates, expressed as latitude and longitude to a 3 word address.
 
static OnlineMapsWhat3Words StandardBlend (string key, string addr, bool multilingual=false, string lang="en", OnlineMapsVector2d? focus=null)
 Returns a blend of the three most relevant 3 word address candidates for a given location, based on a full or partial 3 word address.
The specified 3 word address may either be a full 3 word address or a partial 3 word address containing the first 2 words in full and at least 1 character of the 3rd word.StandardBlend provides the search logic that powers the search box on map.what3words.com and in the what3words mobile apps.
 

Additional Inherited Members

- Public Member Functions inherited from OnlineMapsWebServiceAPI
void Destroy ()
 Destroys the current request to webservice.
 
OnlineMapsWWW GetWWW ()
 Get request instance.
 
- Public Attributes inherited from OnlineMapsTextWebService
Action< string > OnComplete
 Event that occurs when a response is received from webservice.
 
new Action< OnlineMapsTextWebServiceOnFailed
 Event that occurs when an error response is received from webservice.
 
new Action< OnlineMapsTextWebServiceOnFinish
 This event is occurs after other events, before disposing the request.
 
new Action< OnlineMapsTextWebServiceOnSuccess
 Event that occurs when a success response is received from webservice.
 
- Public Attributes inherited from OnlineMapsWebServiceAPI
Action< OnlineMapsWebServiceAPIOnFailed
 Event that occurs when an error response is received from webservice.
 
Action< OnlineMapsWebServiceAPIOnFinish
 Event that occurs after OnComplete, when the response from webservice processed.
 
Action< OnlineMapsWebServiceAPIOnDispose
 Event that occurs when the current request instance is disposed.
 
Action< OnlineMapsWebServiceAPIOnSuccess
 Event that occurs when a success response is received from webservice.
 
object customData
 In this variable you can put any data that you need to work with requests.
 
- Protected Member Functions inherited from OnlineMapsTextWebService
void OnRequestComplete (OnlineMapsWWW www)
 Checks whether the response from webservice.
 
- Protected Attributes inherited from OnlineMapsTextWebService
string _response
 Response string.
 
- Properties inherited from OnlineMapsTextWebService
string response [get]
 Gets a response from webservice.
 
- Properties inherited from OnlineMapsWebServiceAPI
OnlineMapsQueryStatus status [get]
 Gets the current status of the request to webservice.
 

Detailed Description

The what3words API gives you programmatic access to convert a 3 word address to coordinates (forward geocoding), to convert coordinates to a 3 word address (reverse geocoding), to obtain suggestions based on a full or partial 3 word address (AutoSuggest and StandardBlend), to obtain a geographically bounded section of the 3m x 3m what3words grid and to determine the languages that the API currently supports. https://docs.what3words.com/api/v3/.

Member Enumeration Documentation

◆ Display

Display type.

Enumerator
full 

Full output.

terse 

Less output.

minimal 

The bare minimum.

Member Function Documentation

◆ AutoSuggest()

static OnlineMapsWhat3Words OnlineMapsWhat3Words.AutoSuggest ( string key,
string addr,
bool multilingual = false,
string lang = "en",
OnlineMapsVector2d? focus = null,
Clip clip = null,
int? count = null,
Display display = Display::full )
static

Returns a list of 3 word addresses based on user input and other parameters.

Parameters
keyA valid API key
addrThe full or partial 3 word address to obtain suggestions for. At minimum this must be the first two complete words plus at least one character from the third word.
multilingualAutoSuggest is provided via 2 variant resources; single language and multilingual.
langFor single language the lang parameter is required; for multilingual, the lang parameter is optional. If specified, this parameter must be a supported 3 word address language as an ISO 639-1 2 letter code.
focusA location, used to refine the results. If specified, the results will be weighted to give preference to those near the specified location in addition to considering similarity to the addr string. If omitted the default behaviour is to weight results for similarity to the addr string only.
clipRestricts results to those within a geographical area.
countThe number of AutoSuggest results to return. A maximum of 100 results can be specified, if a number greater than this is requested, this will be truncated to the maximum. The default is 3.
displayDisplay type.
Returns
Query instance.

◆ Forward()

static OnlineMapsWhat3Words OnlineMapsWhat3Words.Forward ( string key,
string addr,
string lang = null,
Display display = Display::full )
static

Forward geocodes a 3 word address to a position, expressed as coordinates of latitude and longitude.

Parameters
keyA valid API key
addrA 3 word address as a string
langA supported 3 word address language as an ISO 639-1 2 letter code.
displayDisplay type
Returns
Query instance.

◆ GetForwardReverseResult()

static OnlineMapsWhat3WordsFRResult OnlineMapsWhat3Words.GetForwardReverseResult ( string response)
static

Converts the response string from Forward or Reverse geocoding to result object.

Parameters
responseResponse string.
Returns
Result object

◆ GetGridResult()

static OnlineMapsWhat3WordsGridResult OnlineMapsWhat3Words.GetGridResult ( string response)
static

Converts the response string from Grid to result object.

Parameters
responseResponse string
Returns
Result object

◆ GetLanguages()

static OnlineMapsWhat3Words OnlineMapsWhat3Words.GetLanguages ( string key)
static

Retrieves a list of the currently loaded and available 3 word address languages.

Parameters
keyA valid API key
Returns
Query instance.

◆ GetLanguagesResult()

static OnlineMapsWhat3WordsLanguagesResult OnlineMapsWhat3Words.GetLanguagesResult ( string response)
static

Converts the response string from Get Languages to result object.

Parameters
responseResponse string
Returns
Result object

◆ GetSuggestionsBlendsResult()

static OnlineMapsWhat3WordsSBResult OnlineMapsWhat3Words.GetSuggestionsBlendsResult ( string response)
static

Converts the response string from AutoSuggest or StandardBlend to result object.

Parameters
responseResponse string
Returns
Result object

◆ Grid()

static OnlineMapsWhat3Words OnlineMapsWhat3Words.Grid ( string key,
OnlineMapsGeoRect bbox )
static

Returns a section of the 3m x 3m what3words grid for a given area.

Parameters
keyA valid API key
bboxBounding box, for which the grid should be returned.
Returns
Query instance.

◆ Reverse()

static OnlineMapsWhat3Words OnlineMapsWhat3Words.Reverse ( string key,
OnlineMapsVector2d coords,
string lang = null,
Display display = Display::full )
static

Reverse geocodes coordinates, expressed as latitude and longitude to a 3 word address.

Parameters
keyA valid API key
coordsCoordinates
langA supported 3 word address language as an ISO 639-1 2 letter code.
displayDisplay type
Returns
Query instance.

◆ StandardBlend()

static OnlineMapsWhat3Words OnlineMapsWhat3Words.StandardBlend ( string key,
string addr,
bool multilingual = false,
string lang = "en",
OnlineMapsVector2d? focus = null )
static

Returns a blend of the three most relevant 3 word address candidates for a given location, based on a full or partial 3 word address.
The specified 3 word address may either be a full 3 word address or a partial 3 word address containing the first 2 words in full and at least 1 character of the 3rd word.StandardBlend provides the search logic that powers the search box on map.what3words.com and in the what3words mobile apps.

Parameters
keyA valid API key
addrThe full or partial 3 word address to obtain blended candidates for. At minimum this must be the first two complete words plus at least one character from the third word
multilingualStandardBlend is provided via 2 variant resources; single language and multilingual.
The single language standardblend resource requires a language to be specified.The input full or partial 3 word address will be interpreted as being in the specified language and all results will be in this language.
The multilingual standardblend-ml resource can accept an optional language. If specified, this will ensure that the standardblend-ml resource will look for results in this language, in addition to any other languages that yield relevant results.
langIf specified, this parameter must be a supported 3 word address language as an ISO 639-1 2 letter code.
focusA location, specified as a latitude,longitude used to refine the results. If specified, the results will be weighted to give preference to those near the specified location.
Returns
Query instance.