public void OnShowPlaceAutocompleterPicker() { // Mode in which to show autocomplete: fullscreen or overlay const PlaceAutocomplete.Mode mode = PlaceAutocomplete.Mode.Fullscreen; // Filter places to cities only const PlaceAutocomplete.AutocompleteFilter filter = PlaceAutocomplete.AutocompleteFilter.Cities; // limit results to Australia const string countryCode = "AU"; // limit search results in Sydney area var boundsBias = new LatLngBounds( new LatLng(-33.880490, 151.184363), new LatLng(-33.858754, 151.229596)); PlaceAutocomplete.ShowPlaceAutocomplete(place => { placeText.text = place.ToString(); }, error => { var message = "Picking place failed, message: " + error; placeText.text = message; Debug.Log(message); }, mode, filter, countryCode, boundsBias); }
public static void LaunchPlaceAutocomplete(PlaceAutocomplete.Mode mode, PlaceAutocomplete.AutocompleteFilter filter, string countryCode, LatLngBounds boundsBias) { Launch(AUTOCOMPLETE_PICKER_REQUEST, intent => { intent.CallAJO(PutExtraMethod, EXTRAS_MODE, (int)mode); intent.CallAJO(PutExtraMethod, EXTRAS_FILTER, (int)filter); if (countryCode != null) { intent.CallAJO(PutExtraMethod, EXTRAS_COUNTRY_CODE, countryCode); } if (boundsBias != null) { intent.CallAJO(PutExtraMethod, EXTRAS_BOUNDS_BIAS, boundsBias.ToAJO()); } }); }