Four New York addresses become one route across the city, with numbered stop pins and a summary bubble on the line.
geocodeOnereturns a singleWaypointper address, whichcalculateRoutetakes as a location unchanged.bboxFromGeoJSONturns those waypoints into map bounds, so the opening view needs no hand-picked centre or zoom.RoutingModule.showRoutesandshowWaypointsrender the line, pins and summary from the response as it arrives, with one call each.
Related examples
Add Stops to Route
Find stops along a route within a one-minute detour and insert them all at optimal positions in a single call.
Getting Started
Routing
Search and Geocoding
Electric Vehicles
Utilities
Web
Along route search
Find the beaches and viewpoints within a one-minute detour of a coastal drive
Getting Started
Routing
Search and Geocoding
Web
Display units
Switch a route's labels and your own text between metric, imperial UK and imperial US units.
Getting Started
Utilities
Routing
Web
Map reachable ranges from multiple locations
Calculate time-based accessibility areas from multiple locations
Getting Started
Routing
User Interaction Events
Web