google_maps2/places/place_autocomplete/mod.rs
1//! The **Place Autocomplete** service is a web service that returns place
2//! predictions. The request specifies a textual search string and optional
3//! geographic bounds. The service can be used to provide autocomplete
4//! functionality for text-based geographic searches, by returning places such
5//! as businesses, addresses and points of interest as a user types.
6//!
7//! ## Note: Server-side and client-side libraries
8//!
9//! * The Places API is also available with the [Java Client, Python Client, Go
10//! Client and Node.js Client for Google Maps Services](https://developers.google.com/maps/documentation/places/web-service/client-library).
11//! The Places API and the client libraries are for use in server applications.
12//!
13//! * If you're building a client-side application, take a look at the [Places
14//! SDK for Android](https://developers.google.com/maps/documentation/places/android-sdk),
15//! the [Places SDK for iOS](https://developers.google.com/maps/documentation/places/ios-sdk),
16//! and the [Places Library, Maps JavaScript API](https://developers.google.com/maps/documentation/javascript/places).
17//!
18//! # [Place Autocomplete requests](https://developers.google.com/maps/documentation/places/web-service/autocomplete#place_autocomplete_requests)
19//!
20//! * The Place Autocomplete service is part of the Places API and shares an
21//! [API key](https://developers.google.com/maps/documentation/places/web-service/get-api-key)
22//! and quotas with the [Places API](https://developers.google.com/maps/documentation/places/web-service/overview).
23//!
24//! * **Note**: You can use Place Autocomplete even without a map. If you do
25//! show a map, it must be a Google map. When you display predictions from the
26//! Place Autocomplete service without a map, you must include the
27//! '[Powered by Google](https://developers.google.com/maps/documentation/places/web-service/policies#logo_requirements)'
28//! logo displayed inline with the search field/results.
29//!
30//! The Place Autocomplete service can match on full words and substrings,
31//! resolving place names, addresses, and [plus codes](https://plus.codes/).
32//! Applications can therefore send queries as the user types, to provide
33//! on-the-fly place predictions.
34//!
35//! The returned predictions are designed to be presented to the user to aid
36//! them in selecting the desired place. You can send a [Place Details
37//! request](https://developers.google.com/maps/documentation/places/web-service/details#PlaceDetailsRequests)
38//! for more information about any of the places which are returned.
39
40pub mod error;
41pub mod request;
42pub mod response;
43
44// -----------------------------------------------------------------------------
45
46const SERVICE_URL: &str = "https://maps.googleapis.com/maps/api/place/autocomplete";
47const OUTPUT_FORMAT: &str = "json"; // json or xml
48
49// -----------------------------------------------------------------------------
50
51pub use crate::places::place_autocomplete::{
52 error::Error,
53 request::{autocomplete_type::AutocompleteType, Request}, // request
54 response::{
55 matched_substring::MatchedSubstring, prediction::Prediction, status::Status,
56 structured_format::StructuredFormat, term::Term, Response,
57 }, // response
58}; // place_autocomplete