Пример #1
0
        /// <summary>
        /// This method is called when a response is received.
        /// </summary>
        /// <param name="s">Response string</param>
        private void OnComplete(string s)
        {
            // Trying to get an array of results.
            OnlineMapsGooglePlacesAutocompleteResult[] results = OnlineMapsGooglePlacesAutocomplete.GetResults(s);

            // If there is no result
            if (results == null)
            {
                Debug.Log("Error");
                Debug.Log(s);
                return;
            }

            // Log description of each result.
            foreach (OnlineMapsGooglePlacesAutocompleteResult result in results)
            {
                Debug.Log(result.description);
            }
        }
Пример #2
0
 public new static OnlineMapsFindAutocompleteResult[] GetResults(string response)
 {
     OnlineMapsGooglePlacesAutocompleteResult[] results = OnlineMapsGooglePlacesAutocomplete.GetResults(response);
     return(OnlineMapsUtils.DeepCopy <OnlineMapsFindAutocompleteResult[]>(results));
 }