Arc

arcNode

The great-circle path between two coordinates, drawn the way the earth actually is: on a mercator pane the London–Tokyo arc bends far north of the straight line between them, and that single element is the projection-distortion lesson. Wrap it in cue.draw and the route traces itself across the earth.

#Attributes

fromRequiredImplicit
geo-coordinate
One end, latitude first. Parametised and animatable.Can be written as shorthand: arc:value
toRequired
geo-coordinate
The other end.
colour
colour
Also written: colorThe arc's hue.
neutralredorangeyellowgreentealbluepurplepinkgreywhiteblack
Defaultteal
width
number
Stroke width in pixels.
Default2
opacity
number
0 to 1.
Default1
label
string
Rich inline label at the arc's midpoint.
hidden
boolean
Declared but not drawn. Animatable.
Defaultfalse

#Derived attributes

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

distanceDerived
The great-circle length in kilometres — the number the arc IS. Cite it with !value:#id.distance().

#Allowed in

#Examples

arc#route(from: 51.47, -0.46; to: 35.55, 139.78; label: !value:#route.distance(digits: 0) km)
cue.draw{
    arc(from: 40.64, -73.78; to: 1.36, 103.99)
}(in: 2; in-duration: 1200ms)