arc

The great-circle route between two places on a region map.

arcNode
On this page
A world map with a teal great-circle arc from London to Tokyo, the markers at each end drawn over it.A world map with a teal great-circle arc from London to Tokyo, the markers at each end drawn over it.

#Attributes

fromRequiredImplicitAnimatable
One end of the route.
Can be written as shorthand: arc:value
toRequiredAnimatable
The other end of the route.
colourAnimatable
The arc's colour.
paint
Also written: color
Defaultteal
widthAnimatable
The arc's stroke width in pixels.
Default2
opacityAnimatable
How solid the stroke is.
Default1
label
A label set at the arc's midpoint.
hiddenAnimatable
Declared but not drawn.
Defaultfalse

#Derived attributes

Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.

lengthDerived
The great-circle length from from to to, in kilometres.

#Allowed in

#Examples

A world map with the great-circle route from London to Tokyo, labelled with its length in kilometres.A world map with the great-circle route from London to Tokyo, labelled with its length in kilometres.
region:world{
    arc#route(from: 51.47, -0.46; to: 35.55, 139.78; label: {{round(#route.length, 0)}} km)
}
Three frames of the second step: the route from New York to Singapore drawing in across the map.Three frames of the second step: the route from New York to Singapore drawing in across the map.
region:world{
    cue.draw{
        arc(from: 40.64, -73.78; to: 1.36, 103.99)
    }(
        in: 2
        in-duration: 1200ms
    )
}

#Notes

  • On a mercator map the London–Tokyo arc bends far north of the straight line between them.
  • Wrapped in a cue.draw, the route draws itself along its length.

Last updated