This class is used to search for a location by address.
https://developers.google.com/maps/documentation/geocoding/intro.
More...
|
| | OnlineMapsGoogleGeocoding (string address, string key=null) |
| | Creates a new request for a location search by title (geocoding).
|
| |
| | OnlineMapsGoogleGeocoding (Vector2 coords, string key=null) |
| | Creates a new request for a location search by coordinates (reverse geocoding).
|
| |
| | OnlineMapsGoogleGeocoding (double longitude, double latitude, string key=null) |
| | Creates a new request for a location search by coordinates (reverse geocoding).
|
| |
|
void | Destroy () |
| | Destroys the current request to webservice.
|
| |
| OnlineMapsWWW | GetWWW () |
| | Get request instance.
|
| |
|
|
Action< string > | OnComplete |
| | Event that occurs when a response is received from webservice.
|
| |
|
new Action< OnlineMapsTextWebService > | OnFailed |
| | Event that occurs when an error response is received from webservice.
|
| |
|
new Action< OnlineMapsTextWebService > | OnFinish |
| | This event is occurs after other events, before disposing the request.
|
| |
|
new Action< OnlineMapsTextWebService > | OnSuccess |
| | Event that occurs when a success response is received from webservice.
|
| |
|
Action< OnlineMapsWebServiceAPI > | OnFailed |
| | Event that occurs when an error response is received from webservice.
|
| |
|
Action< OnlineMapsWebServiceAPI > | OnFinish |
| | Event that occurs after OnComplete, when the response from webservice processed.
|
| |
|
Action< OnlineMapsWebServiceAPI > | OnDispose |
| | Event that occurs when the current request instance is disposed.
|
| |
|
Action< OnlineMapsWebServiceAPI > | OnSuccess |
| | 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.
|
| |
|
string | _response |
| | Response string.
|
| |
| string | response [get] |
| | Gets a response from webservice.
|
| |
| OnlineMapsQueryStatus | status [get] |
| | Gets the current status of the request to webservice.
|
| |
◆ OnlineMapsGoogleGeocoding() [1/4]
| OnlineMapsGoogleGeocoding.OnlineMapsGoogleGeocoding |
( |
string | address, |
|
|
string | key = null ) |
Creates a new request for a location search by title (geocoding).
- Parameters
-
| address | Location title |
| key | Google API key |
◆ OnlineMapsGoogleGeocoding() [2/4]
| OnlineMapsGoogleGeocoding.OnlineMapsGoogleGeocoding |
( |
Vector2 | coords, |
|
|
string | key = null ) |
Creates a new request for a location search by coordinates (reverse geocoding).
- Parameters
-
| coords | Location coordinates (X - longitude, Y - latitude) |
| key | Google API key |
◆ OnlineMapsGoogleGeocoding() [3/4]
| OnlineMapsGoogleGeocoding.OnlineMapsGoogleGeocoding |
( |
double | longitude, |
|
|
double | latitude, |
|
|
string | key = null ) |
Creates a new request for a location search by coordinates (reverse geocoding).
- Parameters
-
| longitude | Longitude |
| latitude | Latitude |
| key | Google API key |
◆ OnlineMapsGoogleGeocoding() [4/4]
| OnlineMapsGoogleGeocoding.OnlineMapsGoogleGeocoding |
( |
string | address = null, |
|
|
string | latlng = null, |
|
|
string | lang = null ) |
|
protected |
Constructor.
- Parameters
-
| address | Location title |
| latlng | Location coordinates (latitude,longitude). Example: 40.714224,-73.961452. |
| lang | Language of result |
◆ Find()
Creates a new request for a location search using object with parameters.
- Parameters
-
- Returns
- Instance of the search query.
◆ GetCoordinatesFromResult()
| static Vector2 OnlineMapsGoogleGeocoding.GetCoordinatesFromResult |
( |
string | response | ) |
|
|
static |
Gets the coordinates of the first results from OnlineMapsFindLocation result.
- Parameters
-
| response | XML string. The result of the search location. |
- Returns
- Coordinates - if successful, Vector2.zero - if failed.
◆ GetResults()
Converts response into an array of results.
- Parameters
-
| response | Response of Google API. |
- Returns
- Array of result.
◆ MovePositionToResult()
| static void OnlineMapsGoogleGeocoding.MovePositionToResult |
( |
string | response | ) |
|
|
static |
Centers the map on the result of the search location.
- Parameters
-
| response | XML string. The result of the search location. |