Module google_maps::places::place_autocomplete

source ·
Expand description

The Place Autocomplete service is a web service that returns place predictions. The request specifies a textual search string and optional geographic bounds. The service can be used to provide autocomplete functionality for text-based geographic searches, by returning places such as businesses, addresses and points of interest as a user types.

§Note: Server-side and client-side libraries

§Place Autocomplete requests

  • The Place Autocomplete service is part of the Places API and shares an API key and quotas with the Places API.

  • Note: You can use Place Autocomplete even without a map. If you do show a map, it must be a Google map. When you display predictions from the Place Autocomplete service without a map, you must include the ‘Powered by Google’ logo displayed inline with the search field/results.

The Place Autocomplete service can match on full words and substrings, resolving place names, addresses, and plus codes. Applications can therefore send queries as the user types, to provide on-the-fly place predictions.

The returned predictions are designed to be presented to the user to aid them in selecting the desired place. You can send a Place Details request for more information about any of the places which are returned.

Re-exports§

  • pub use crate::places::place_autocomplete::error::Error;
  • pub use crate::places::place_autocomplete::request::autocomplete_type::AutocompleteType;
  • pub use crate::places::place_autocomplete::request::Request;
  • pub use crate::places::place_autocomplete::response::matched_substring::MatchedSubstring;
  • pub use crate::places::place_autocomplete::response::prediction::Prediction;
  • pub use crate::places::place_autocomplete::response::status::Status;
  • pub use crate::places::place_autocomplete::response::structured_format::StructuredFormat;
  • pub use crate::places::place_autocomplete::response::term::Term;
  • pub use crate::places::place_autocomplete::response::Response;

Modules§

  • Places API Place Autocomplete error types and error messages.
  • Look in this module for documentation on building your Places API Place Autocomplete query. In particular, look at the Request struct for examples of the builder pattern. This module contains the tools (enums, structs, methods) for building your Google Maps Platform request.
  • Resources (enums, structs) for processing the Places API Place Autocomplete response from the Google Maps Platform. Look in here for more information about the data returned from Google’s server and how to parse it with your program.