reviewsGet a Maps Demo Key:Try out select Maps JavaScript API and Places UI Kit features at no cost with a Maps Demo Key—no billing information required.
OverviewStay organized with collectionsSave and categorize content based on your preferences.
European Economic Area (EEA) developers
The Routes Library, Maps JavaScript API includes theRouteandRouteMatrixclasses, which replace the legacyDirectionsServiceandDistanceMatrixServiceobjects.
Routeclass
TheRouteclass provides thecomputeRoutes()method, which returns
the ideal route between two locations. Provide directions with real-time traffic for transit,
biking, driving, 2-wheel motorized vehicles, or walking between multiple locations.
TheRouteMatrixclass returns distances and travel times for a matrix of routes
between different origin and destination locations. Calculate travel times and distances for
multiple destinations for up to 625 route elements.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-04-13 UTC."],[],[]]