Directions
Routes API
Loading the routes library to compute and render routes on the map using the modern Route.computeRoutes service.
Important: This example uses the new Routes API (Recommended) , the modern and current way to calculate directions. If you are using the Directions API (Legacy) Service, switch to this implementation of Routes API.