Route planner

A driving route through your points: a line on the map, kilometres, time, alternatives and days on the road.

Rostov-on-Don → Sochi: one alternative and 300 km a day, checked in the preview.
Rostov-on-Don → Sochi: one alternative and 300 km a day, checked in the preview.

The Route planner block (the palette finds it by “route”) lays a driving route between points and shows the kilometres and driving time under the map. Our server calculates it on OpenStreetMap data; Russia, Georgia and Turkey are covered now.

  • From and To take coordinates separated by a comma, “47.2357, 39.7015”, or a substitution like {{selected.lat}}, {{selected.lon}}. Two points, the line, kilometres and time work on every plan.
  • On the canvas the block draws a straight sample line: calculating the road on every edit would spend your calculations. The real route shows in the preview and in the app.
  • Stops come from “Route points — list”. It is a list variable: put an “Add to route” button with the Add to a list action on a place card, and the block drives through the added places in order. “Points list under the map” lets the visitor reorder and remove points; “Tapping the map adds a point” lets them drop their own.
  • Route options: “Alternative routes” finds up to two per leg, and the visitor switches between them with the “Option 1”, “Option 2” buttons. The checkboxes avoid toll roads, ferries and unpaved roads; when there is no way around, the route is still built and a line under the map says so.
  • Distance per day, km (50 to 2000) splits the trip into days, and a “By day” list appears under the map. A day ends at an estimated point on the road, not a checked campsite: the person still picks where to stay.
  • Result to a variable: “Save the result to a variable” on the block, or the Calculate route action on a button. It stores distanceKm, durationMin, durationText, legs and days, so {{route.distanceKm}} goes into a delivery price, a text or a table row.

Calculations are counted per account per month, across all your apps. Asking for the same route again and switching between options are free. If the server refuses, the visitor gets a link to the same route in Yandex Maps instead of an empty map.

Read next