Stay organized with collections
Save and categorize content based on your preferences.
The Routes API Compute Routes demo lets you
specify an origin and destination as a latitude/longitude coordinates pair or
as a place ID. To copy the latitude/longitude coordinates, find and click a
location on the map, and then paste the location into the form.
If you have an encoded polyline or a GeoJSON linestring, and you'd like to
view the polyline on map, go to
Interactive polyline decoder utility.
After you select Get route, the demo displays the response from the
computeRoutes method as a route on
the map.
[[["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 2025-08-18 UTC."],[],[],null,["The Routes API Compute Routes demo lets you\nspecify an origin and destination as a latitude/longitude coordinates pair or\nas a place ID. To copy the latitude/longitude coordinates, find and click a\nlocation on the map, and then paste the location into the form.\n\nIf you have an encoded polyline or a GeoJSON linestring, and you'd like to\nview the polyline on map, go to\n[Interactive polyline decoder utility](/maps/documentation/routes/polylinedecoder).\n\nAfter you select **Get route** , the demo displays the response from the\n[computeRoutes](/maps/documentation/routes/reference/rest/v2/TopLevel/computeRoutes) method as a route on\nthe map. \nerror\n[×](#) \n\nInput locations \nOrigin\\* \nHeading \nStopover Side of Road\n\n*** ** * ** ***\n\nDestination\\* \nHeading \nStopover Side of Road\n\nTravel Mode \nDrive Walk Bicycle Two Wheeler (two-wheeled motorized vehicle) Transit \n\nTransit Modes\n\n- [x] Bus\n- [x] Subway\n- [x] Train\n- [x] Light rail\n- [x] Rail \n\nTransit Routing Preference No preference Less walking Fewer transfers\n\nDeparture Time (Your local time)\n\nChoose your **local time** . The selected time will be converted to **UTC format time**.\n\nIf you set the departure time, the routing preference has to be either TRAFFIC_AWARE or TRAFFIC_AWARE_OPTIMAL. TRAFFIC_AWARE_OPTIMAL calculates best routes by factoring in real-time road conditions, including closures. \n\n\u003cbr /\u003e\n\nRoute Options \n\nPolyline Quality High quality Overview \n\nTraffic Awareness Traffic unaware Traffic aware Traffic aware optimal (best routes with accurate ETA) \n\nTraffic Aware Polyline \n\nRoute Modifiers (Optional)\n\n- [ ] Avoid tolls\n- [ ] Avoid highways\n- [ ] Avoid ferries\n- [ ] Avoid indoor\n\nReference routes \n\nAlternative Routes \n\n*** ** * ** ***\n\nEco-friendly Routes \n\nEmission Type Gasoline Electric Hybrid Diesel [Get route](#) \nLat/Lng are copied to clipboard"]]