Skip to main content

google_maps/roads/nearest_roads/
mod.rs

1//! The Roads API **Nearest Roads** service returns individual road segments for
2//! a given set of GPS coordinates. This services takes up to 100 GPS points and
3//! returns the closest road segment for each point. The points passed do not
4//! need to be part of a continuous path.
5//!
6//! **If you are working with sequential GPS points, use Nearest Roads.**
7//!
8//! # [Required parameters](https://developers.google.com/maps/documentation/roads/nearest#required-parameters)
9//!
10//! * `points` - The path to be snapped. The path parameter accepts a list of
11//!   latitude/longitude pairs.
12//!
13//! Note: The snapping algorithm works best for points that are not too far
14//! apart. If you observe odd snapping behavior, try creating paths that have
15//! points closer together. To ensure the best snap-to-road quality, you should
16//! aim to provide paths on which consecutive pairs of points are within 300m of
17//! each other. This will also help in handling any isolated, long jumps between
18//! consecutive points caused by GPS signal loss, or noise.
19
20pub mod request;
21pub mod response;
22
23// -----------------------------------------------------------------------------
24
25pub use crate::roads::nearest_roads::{
26    request::Request,
27    response::Response
28};
29
30#[deprecated(note = "use `crate::roads::nearest_roads::Request` instead", since = "3.8.0")]
31pub use crate::roads::nearest_roads::request::Request as NearestRoadsRequest;
32
33#[deprecated(note = "use `crate::roads::nearest_roads::Response` instead", since = "3.8.0")]
34pub use crate::roads::nearest_roads::response::Response as NearestRoadsResponse;