Topic: FindLocationNameExample and OnlineMapsGoogleGeocodingResult
In this example you have a string as the argument for OnQueryComplete. I've tried changing it to use an OnlineMapsGoogleGeocodingResult instead, but it tells me "No overload for 'OnQueryComplete' matches delegate 'Action<string>'".
private void OnMapClick()
{
// Get the coordinates where the user clicked.
Vector2 mouseCoords = OnlineMapsControlBase.instance.GetCoords();
// Try find location name by coordinates.
OnlineMapsGoogleGeocoding query = OnlineMapsGoogleGeocoding.Find(null, mouseCoords.y + "," + mouseCoords.x);
query.OnComplete += OnQueryComplete;
}
private void OnQueryComplete(OnlineMapsGoogleGeocodingResult s)
{
// Show response in console.
Debug.Log(s.formatted_address);
}How can I get access to the OnlineMapsGoogleGeocodingResult in OnQueryComplete so I have easier access to its members and such?
Thanks!