RouteOptions

data class RouteOptions(val lineColor: ColorRgba = ColorRgba(255, 60, 20), val headColor: ColorRgba? = null, val lineWidth: Float = 3.0f, val trailShare: Float = 0.3f, val trailBands: Int = 10, val glow: Float = 1.5f, val vehicle: ShapeStyle? = null, val vehicleSize: Float = 32.0f, val vehicleTurn: Float = 0.0f, val height: Float = 0.15f, val arc: Float = 0.0f, val arcSteps: Int = 32, val lift: Float = 0.0f, val shadow: ShapeStyle? = null, val keepTrail: Boolean = true, val keepVehicle: Boolean = false, val zIndex: Int = 100)

How a vehicle's trip along a route looks, for RouteMotion.

Constructors

Link copied to clipboard
constructor(lineColor: ColorRgba = ColorRgba(255, 60, 20), headColor: ColorRgba? = null, lineWidth: Float = 3.0f, trailShare: Float = 0.3f, trailBands: Int = 10, glow: Float = 1.5f, vehicle: ShapeStyle? = null, vehicleSize: Float = 32.0f, vehicleTurn: Float = 0.0f, height: Float = 0.15f, arc: Float = 0.0f, arcSteps: Int = 32, lift: Float = 0.0f, shadow: ShapeStyle? = null, keepTrail: Boolean = true, keepVehicle: Boolean = false, zIndex: Int = 100)

Properties

Link copied to clipboard
val arc: Float

how much each leg of the route bulges to the side, as a share of the leg's length (0.25: the middle of the leg is a quarter of its length off the straight line); 0 for a straight (great-circle) leg, negative to bulge to the other side.

Link copied to clipboard

how many pieces each arching or bulging leg is drawn in (more is smoother and costs more points).

Link copied to clipboard
val glow: Float

how much the line shines, like a neon tube: 0 for a plain line, 1 for a halo round it and a hot core, more for stronger.

Link copied to clipboard

the colour of the line right behind the vehicle; null for lineColor made lighter.

Link copied to clipboard

how high each leg arches up into the air, as a share of the leg's length (0.15: a leg of 1,000 km goes up to 150 km in the middle, up from the ground at its first point and down to it at the last); 0 for a trip along the ground. It is the altitude of the line and of the vehicle, so it is seen when the map is tilted, and the vehicle is nearer the eye (bigger) up there. Flights are a lot lower than this against their length: the arch is made big to be seen.

Link copied to clipboard

whether the line is still there when the trip is over.

Link copied to clipboard

whether the vehicle is still there, at the end of the route, when the trip is over.

Link copied to clipboard
val lift: Float

how much bigger the vehicle is drawn the higher it is, on top of what being nearer makes it: 0.4 is 40% bigger at the top of an arch; 0 for none.

Link copied to clipboard

the colour of the line left behind the vehicle.

Link copied to clipboard

the width of that line, in screen pixels.

Link copied to clipboard

the look of the vehicle's shadow on the ground, which stays on the ground under it while the vehicle rises, moving off to one side the higher it goes; null for none. It is turned like the vehicle, so it wants the same picture in a dark, see-through colour.

Link copied to clipboard

the number of pieces the cooling part is cut into; more is smoother and costs more shapes.

Link copied to clipboard

how much of the way (0..1 of the route's length) the line behind the vehicle takes to cool from headColor to lineColor; 0 for a line of one colour.

Link copied to clipboard

the look of the vehicle (an ShapeStyle.ImagePattern with a picture of it, usually); null for none, only the line.

Link copied to clipboard

the size of the vehicle, in screen pixels.

Link copied to clipboard

degrees added to the direction the vehicle goes in, for a picture that does not point north (a picture of a car that points to the right has 90 here: pointing east is north turned 90).

Link copied to clipboard
val zIndex: Int

the drawing order of what is made, over the other shapes with a bigger number.