Seek or Avoid Curves
Rank a mountain trip's routes by how winding they are, set what counts as a curve, see its open-road bends, town turns and hairpins, and pick a curvy stretch to see where it runs.
Each route comes back with its curves, and getRouteProgressForSection times each one, so ranking the routes by their share of the drive in curves takes one sum.
calculateRoutefinds the curves and curvy stretches oncesectionTypesnames them, with the thresholds incurveDetection.withCurveSectionsfinds them again when a slider moves, with no new request.getSectionsWithinfinds the turns in towns, the curves in tunnels and the stretches only one route drives.isHairpinkeeps the hairpins.sections.curve: { visible: true }draws each curve in a rose that deepens with itsseverity.
Related examples
Add Stops to Route (Playground)
Dynamically add and remove intermediate stops on a route by clicking the map
Playground
Routing
Utilities
User Interaction Events
Web
React Route Planner
Search, add and drag stops, set how long you stay at each, follow the trip on a timeline of its road sections, then fly over it.
Playground
Routing
Search and Geocoding
Electric Vehicles
User Interaction Events
Utilities
Plugins
Web
React
Route progress playground
Hover and click along the route line to see time and distance progress
Playground
Routing
Utilities
User Interaction Events
Web
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