Pricing Docs About
Get Started
Ready to start creating map animations? Get Started Free →

Multi-Route Mode

Shows multiple routes from a single origin to multiple destinations. Perfect for trade networks, distribution maps, and route comparisons.

Basic Example

{
  "mode": "multi_route",
  "multi_route": {
    "origin": {
      "lat": 31.2304,
      "lng": 121.4737,
      "label": "Shanghai"
    },
    "routes": [
      { "lat": 51.5074, "lng": -0.1278, "label": "London", "data_label": "35 days" },
      { "lat": 40.7128, "lng": -74.0060, "label": "New York", "data_label": "28 days" },
      { "lat": -33.8688, "lng": 151.2093, "label": "Sydney", "data_label": "14 days" }
    ]
  },
  "style": "standard",
  "duration": 20
}

Origin Properties

PropertyTypeRequiredDescription
latnumberrequiredOrigin latitude
lngnumberrequiredOrigin longitude
labelstringoptionalOrigin label

Route Destination Properties

PropertyTypeDescription
latnumberDestination latitude
lngnumberDestination longitude
labelstringDestination name
data_labelstringData annotation (e.g., "35 days", "$2.5M")
colorstringRoute line color (hex)
label_offsetobject{ x, y } pixel offset for label

Multi-Route Settings

{
  "multi_route": {
    "origin": {...},
    "routes": [...],
    "show_all_routes_at_start": true,
    "animate_labels": true,
    "camera_rotation_degrees": 10,
    "start_zoom": 2,
    "end_zoom": 3,
    "label_collision": "auto-offset",
    "routes_start_at": 4,
    "routes_duration": 5,
    "route_style": {
      "width": 2,
      "opacity": 0.8,
      "use_great_circle": true
    }
  }
}
PropertyTypeDefaultDescription
show_all_routes_at_startbooleantrueShow all routes initially
animate_labelsbooleantrueAnimate label appearance
camera_rotation_degreesnumber0Camera rotation angle
start_zoomnumberAutoStarting zoom level
end_zoomnumberAutoEnding zoom level
label_collisionenumnonenone or auto-offset
routes_start_atnumber0When routes start drawing (seconds)
routes_durationnumberAutoRoute drawing duration

Cinematic Camera Path

For complex camera choreography, define keyframes:

{
  "multi_route": {
    "origin": {...},
    "routes": [...],
    "camera_path": [
      { "time": 0, "center": [121.47, 31.23], "zoom": 4, "pitch": 0, "bearing": 0 },
      { "time": 4, "center": [0, 30], "zoom": 1.8, "pitch": 20, "bearing": 0 },
      { "time": null, "center": [0, 30], "zoom": 2.2, "pitch": 20, "bearing": 10 }
    ],
    "routes_start_at": 3,
    "routes_duration": 6
  }
}

Keyframe Properties

PropertyTypeDescription
timenumber/nullTime in seconds (null = end of video)
center[lng, lat]Camera center
zoomnumberZoom level
pitchnumberTilt angle (0-85)
bearingnumberRotation angle

Custom Route Colors

{
  "routes": [
    { "lat": 51.5074, "lng": -0.1278, "label": "London", "color": "#E63946" },
    { "lat": 40.7128, "lng": -74.0060, "label": "New York", "color": "#1D3557" },
    { "lat": -33.8688, "lng": 151.2093, "label": "Sydney", "color": "#457B9D" }
  ]
}

Use Cases

Complete Example

{
  "mode": "multi_route",
  "multi_route": {
    "origin": {
      "lat": 31.2304,
      "lng": 121.4737,
      "label": "Shanghai"
    },
    "routes": [
      { "lat": 51.5074, "lng": -0.1278, "label": "London", "data_label": "35 days", "color": "#E63946" },
      { "lat": 40.7128, "lng": -74.0060, "label": "New York", "data_label": "28 days", "color": "#1D3557" },
      { "lat": -33.8688, "lng": 151.2093, "label": "Sydney", "data_label": "14 days", "color": "#457B9D" },
      { "lat": 1.3521, "lng": 103.8198, "label": "Singapore", "data_label": "5 days", "color": "#2A9D8F" }
    ],
    "camera_path": [
      { "time": 0, "center": [121.47, 31.23], "zoom": 4, "pitch": 0, "bearing": 0 },
      { "time": 5, "center": [50, 25], "zoom": 1.5, "pitch": 25, "bearing": 0 },
      { "time": null, "center": [50, 25], "zoom": 1.8, "pitch": 25, "bearing": 15 }
    ],
    "routes_start_at": 4,
    "routes_duration": 8,
    "animate_labels": true
  },
  "style": "standard",
  "duration": 20,
  "text_overlays": [
    {
      "text": "China's Global Trade Routes",
      "position": "top-center",
      "start_time": 0,
      "end_time": 5,
      "font_size": 36
    }
  ]
}