Skip to Content
APIRoutesInterface: GradientStyle

Interface: GradientStyle

Interface for gradient-style route visualization Allows creating routes with color gradients for enhanced visual appeal

Properties

colors

colors: string[];

Array of colors in hexadecimal format for the gradient Colors will be distributed along the route path Example: [“#FF0000”, “#00FF00”, “#0000FF”]


positions?

optional positions: number[];

Optional array of numbers between 0 and 1 indicating the position of each color This array must have the same length as the colors array Example: [0, 0.5, 1] - colors will be positioned at 0%, 50%, and 100% of the route If not provided, colors will be distributed evenly across the route


type

type: "Gradient"

Type identifier for gradient style

Last updated on