GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction (google_api_places v0.11.0)
View SourcePrediction results for a Place Autocomplete prediction.
Attributes
-
distanceMeters(type:integer(), default:nil) - The length of the geodesic in meters fromoriginiforiginis specified. Certain predictions such as routes may not populate this field. -
place(type:String.t, default:nil) - The resource name of the suggested Place. This name can be used in other APIs that accept Place names. -
placeId(type:String.t, default:nil) - The unique identifier of the suggested Place. This identifier can be used in other APIs that accept Place IDs. -
structuredFormat(type:GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat.t, default:nil) - A breakdown of the Place prediction into main text containing the name of the Place and secondary text containing additional disambiguating features (such as a city or region).structured_formatis recommended for developers who wish to show two separate, but related, UI elements. Developers who wish to show a single UI element may want to usetextinstead. They are two different ways to represent a Place prediction. Users should not try to parsestructured_formatintotextor vice versa. -
text(type:GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText.t, default:nil) - Contains the human-readable name for the returned result. For establishment results, this is usually the business name and address.textis recommended for developers who wish to show a single UI element. Developers who wish to show two separate, but related, UI elements may want to usestructured_formatinstead. They are two different ways to represent a Place prediction. Users should not try to parsestructured_formatintotextor vice versa. This text may be different from thedisplay_namereturned by GetPlace. May be in mixed languages if the requestinputandlanguage_codeare in different languages or if the Place does not have a translation from the local language tolanguage_code. -
types(type:list(String.t), default:nil) - List of types that apply to this Place from Table A or Table B in https://developers.google.com/maps/documentation/places/web-service/place-types. A type is a categorization of a Place. Places with shared types will share similar characteristics.
Summary
Functions
Unwrap a decoded JSON object into its complex fields.
Types
@type t() :: %GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction{ distanceMeters: integer() | nil, place: String.t() | nil, placeId: String.t() | nil, structuredFormat: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat.t() | nil, text: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText.t() | nil, types: [String.t()] | nil }