addColorStop(offset, color)
Adds a color transition point to the gradient.
Declaration
addColorStop(offset: number, color: string): void;Parameters
- offset:
The unit distance at which to add the color.
- color:
The CSS color at the transition point.
Discussion
If offset is less than 0 or greater than 1, MapKit JS logs a warning to the console, but doesn’t change the object.