Maps Platform
Product updates, customer stories, and tips and tricks on Google Maps Platform
Predicting the Future with Google Maps APIs
dinsdag 10 november 2015
Planning journeys ahead of time has always been difficult, since traffic conditions vary greatly over time. Developers have used live traffic data from the Google Maps APIs for years to help drivers with this problem, but up to now, this has been available only for journeys starting very close to now, and limited to Google Maps for Work customers only.
Today we’re extending traffic predictions in the Google Maps APIs indefinitely into the future - a feature we call predictive travel times. This will let developers plan journeys hours, days or even weeks in advance, using Google’s model of what the traffic conditions will be like on that day. We’re also making all traffic features in
Directions API
and
Distance Matrix API
available under our Standard Plan (2500 requests/day for free, with pay-as-you-go pricing for extra requests), and increasing the waypoint limit in Directions API for these developers from 8 to 23 waypoints. (Traffic features and higher waypoint limits in the JavaScript Maps API are available to Google Maps for Work customers for now.)
Using these new traffic features is super simple—just add the
departure_time
parameter to Directions API or Distance Matrix API queries, and the results will contain the travel time estimate given the predicted traffic conditions at that time. The route returned may also change depending on traffic conditions, which lets developers recommend the fastest route to their users. For example, the image below shows the fastest route from San Francisco International Airport to the Google campus in Mountain View late at night when there’s no traffic (blue), and during peak hour when an accident on Highway 101 has slowed traffic to a crawl (red).
Since traffic conditions far in the future could vary greatly, developers can set an optional
traffic_model
parameter to choose whether they’d prefer to get an
optimistic
,
pessimistic
or
best_guess
estimate of the travel time. For example, one of our customers,
Redfin
, plan to use the Google Maps APIs to predict how long it will take to drive between homes, so they will use the
pessimistic
traffic model to ensure there’s enough travel time taking traffic into account. On the other hand, a developer building thermostat app wants their user’s house to be warm by the time they get home from work, so they would use the
optimistic
travel time estimate to calculate when their user is likely to get home, and when their thermostat needs to turn on.
The default traffic model,
best_guess
, returns the most likely travel time given everything that’s known about the traffic conditions—both the historical model for the queried time and day of the week, and the actual live traffic conditions right now. This can be used in apps that give drivers an indication of what their travel time will most likely be.
To learn more about the traffic features in the Google Maps APIs, please take a look at our
video
, check out the documentation for the
Directions API
, the
Distance Matrix API
and the JavaScript Maps API
Directions
and
Distance Matrix
services, or download the updated
client libraries
for Java or Python.
Posted by Elena Kelareva, Product Manager, Google Maps APIs
Labels
5 Great Maps
ads
advertising
africa
Andorra
Android
App Engine
art
Australia
Autocomplete
Boston
brazil
Bruce Springsteen
Bulgaria
Campus Map
Chrome
City 24/7
Code for America
COM API
Computerlogy
creative advertising campaigns
Custom Map Types
design
developer
Developer Challenge
Developer stories
Directions API
Drawing Tools
Driving Directions
Earth
Earth API
Elevation API
environment
epungo
Estonia
Europe
Fab Friday
flash
Fusion Tables
GAE
games
GDAL
Gears
geo
Geodesic Lines
Germany
Gibraltar
GIS
Global Economy
gme
Google Analytics
Google App Engine
Google Earth
Google Earth API
Google I/O
Google Maps
Google Maps API
Google Maps Engine
Google Places API
Google Places API Developer Challenge
Google Street View API
government
Hackathon
Hamburg
heat map
heatmap
hiking
Hungary
iOS
JavaScript
jQuery
kenya
KML
Latitude API
Latvia
launch
Lithuania
local search
London
Mac
Map of the Week
maps
Maps API
Maps API for Flash
Maps Data API
Maps Zen
Marker Clusterer
Marketing
Mars
meetup
mobile
moca
modern art
More Than a Map
Morethanamap
Movies
Neighborhoods
New York City
Office Hours
Olympics
Panoramio
photos
Place Summaries
Places API
Plus
polygons
Premier
public transit
public transit layer
Python
real estate
rock
sao paulo
screencast
SketchUp
Slovakia
Slovenia
South Africa
Spain
Spatial Data Files
Static Maps API
street view
Styled Maps
Sydney
Track
traffic layer
Transportation
Tripline
Twitter
UN
United Nations
V3
Vancouver Olympics
visualizations
Volkswagen
VW
web
youtube
Archive
2018
nov
jul
jun
mei
mrt
feb
2017
nov
jun
mei
apr
mrt
feb
jan
2016
dec
nov
okt
sep
aug
jul
jun
mei
apr
feb
2015
dec
nov
okt
sep
aug
jul
jun
mei
apr
mrt
feb
jan
2014
dec
nov
okt
sep
aug
jul
jun
mei
apr
mrt
feb
2013
dec
nov
okt
sep
aug
jul
jun
mei
apr
mrt
feb
jan
2012
dec
nov
okt
sep
aug
jul
jun
mei
apr
mrt
feb
jan
2011
dec
nov
okt
sep
aug
jul
mei
apr
mrt
feb
jan
2010
dec
nov
okt
sep
aug
jul
jun
mei
apr
mrt
feb
jan
2009
dec
nov
okt
sep
aug
jul
jun
mei
apr
mrt
feb
jan
2008
dec
nov
okt
sep
aug
jul
jun
mei
Feed
Follow @GMapsPlatform
Follow
Google Maps Platform Website
Give us feedback in our
Product Forums
.