New pricing changes went into effect on July 16, 2018. For more information, check out the Guide for Existing Users.

Overview

The Roads API identifies the roads a vehicle was traveling along and provides additional metadata about those roads, such as speed limits.

Before you start developing with the Roads API, review the authentication requirements (you need an API key) and the API usage and billing information.

Introduction

Watch this video for some examples of the kinds of apps that will find the Roads API useful.

The Roads API allows you to map GPS coordinates to the geometry of the road, and to determine the speed limit along those road segments. The API is available via a simple HTTPS interface, and exposes the following services:

  • Snap to roads This service returns the best-fit road geometry for a given set of GPS coordinates. This service takes up to 100 GPS points collected along a route, and returns a similar set of data with the points snapped to the most likely roads the vehicle was traveling along. Optionally, you can request that the points be interpolated, resulting in a path that smoothly follows the geometry of the road.
  • Nearest roads This service returns individual road segments for a given set of GPS coordinates. This services takes up to 100 GPS points and returns the closest road segment for each point. The points passed do not need to be part of a continuous path.
  • Speed limits This service returns the posted speed limit for a road segment. The Speed Limit service is only available to Google Maps APIs Premium Plan customers. If you are an existing customer, you can contact your account manager or file a ticket in the Premium Plan support portal to enable the Roads API.

Client library

The Roads API is available with the Java Client, Python Client, Go Client and Node.js Client for Google Maps Services. Client libraries make developing with the Roads API easier by providing simple, native implementations of common tasks, such as authentication, request throttling and automatic retry.

傳送您對下列選項的寶貴意見...

這個網頁
Roads API
需要協助嗎?請前往我們的支援網頁