[MUSIC PLAYING] MARK SANDUSKY: Every day,
people all over the globe rely on Google's knowledge
of the real world to provide them with
reliable, optimized directions to get them wherever
they're going, whether they're traveling buy
car, bike, public transit, or on foot. And every day, developers rely
on Directions and Distance Matrix APIs of
Google Maps platform to build features that help
their users get things done, whether that it's to
power their business, navigate to the
nearest store location, or explore the
world around them. I'm Mark Sandusky, engineer on
the Google Maps platform team. And I'm very excited to tell you
about the newest improvements we've been building to help
you make these experiences even better in your apps to help your
users get around the real world fast and efficiently,
wherever they roam. Today, we're announcing
the preview release of the new Routes
API which represents the next generation, or
V2, of both the Directions API and the Distance Matrix
API and introduces new features and performance optimizations. Let's take a look. Like the existing Directions
and Distance Matrix APIs, the Routes API is enabled
in the Google Cloud Console and requests to the Routes
API are sent as HTTP request to the Google Maps platform. All you have to do is
send an HTTP request to routes.googleapis.com
and either use the directions/v2:computeRoutes
endpoint for directions requests or the distanceMatrix/v
2:computeRouteMatrix endpoint for Distance Matrix requests. Requests of the Routes API are
sent as an HTTP POST request, where the request parameter
is provided as a JSON object in the body of the request. The Routes API also adds
support for gRPC requests, which means faster response
times and the addition of other performance
optimizations, like streaming responses for
Distance Matrix requests. If you aren't
familiar with gRPC, check out the
documentation link below. It's a great option if high
performance and reduced latency are critical to your app. All right. Let's talk features. For those of you who are already
using the existing Directions and Distance Matrix
APIs, the Routes API will have many familiar
features we've implemented to optimize performance. For example, you
probably already know that with the existing
Directions API you can get comprehensive,
up-to-date directions for biking, driving, and walking
with support for variables, like additional
waypoints, traffic, departure time, and more. In addition to
these, the Routes API introduces a set of
new request options to make your directions even
more flexible, accurate, and useful, like
smarter waypoints, including the ability to specify
whether the user will pass through or stop at a waypoint. This is particularly useful if
one or more of your waypoints is a pick-up or drop-off
point, as it allows Google Maps platform to ensure the
user won't be directed to go to a point where
stopping isn't allowed, such as a tunnel or a highway. The ability to specify the
side of the road you want the user to be
directed to, which can help ensure that events
like pick-ups and drop-offs occur on the desired
side of a road. You can also request
traffic information for individual
segments in or out and use the pylon customization
features of the Maps APIs and STKs to visually represent
that traffic when you render a polyline of the route. We're also introducing
support for getting directions for two-wheeled
motorized vehicles, like motorcycles and scooters,
that are able to route through places that cars aren't. In the case of Distance
Matrix requests, the Routes API makes the route
calculation and optimization capabilities of Google Maps
platform for multiple origin and destination points even
more powerful than ever. It will return a matrix of as
many as 625 total elements. That's more than
six times the number of response elements returned
by the existing Distance Matrix API. This makes the addition of
support for gRPC requests particularly useful since
you can stream the response, meaning no waiting for larger
Distance Matrix calculations to complete in their entirety
before results start returning. You can also request that
navigation instructions be returned in imperial,
as well as metric units. And like the improvements
to waypoints and directions I mentioned earlier, you
can specify the side of road for waypoints and
Distance Matrix requests to improve the accuracy of
duration and arrival times. And last, but not least,
toll calculations. With the Routes API, you can
request the cost of tolls along the route for both
Directions and Distance Matrix requests, allowing you to
show your users an estimate of the cost of a route or take
the cost into consideration in the routes you
choose to display. You can even specify whether the
vehicle is a special emission type, such as an
electric vehicle, and whether the user has
a local toll pass that provides a discounted rate to
make the toll calculation even more accurate. To get started with
the Routes API today, check out the
documentation link below, including our migration
guide for tips and best practices that will
help you start taking advantage of everything the Routes API
has to offer quickly and easily. You can also continue to use
the existing Directions API and Distance Matrix APIs. And as always, let us
know what you think. We can't wait to
see what you build with the next generation of
Directions and Distance Matrix capabilities for the Google Maps
platform using the Routes API. Happy mapping. [MUSIC PLAYING]