MapPolylineSolidMultiColorRepresentation class abstract
Representation allows map polyline to be colored in multiple specified color segments.
Color segment is defined by color stops. Color stop is specified as a polyline length ratio (0.0 - start of the polyline, 1.0 - end of the polyline). Color stop represents a color change starting at that exact point up until the next color stop.
Progress color MapPolyline.progressColor overrides any of the multiple color.
Examples: The following configuration will color map polyline as follows:
- from the start to the middle of it at the 0.5 point - in Red
- from the middle point 0.5 to the 0.7 point - in Green
- from 0.7 to 1.0 - in Red 'colorStops: {0.0, 0.5, 0.7, 1.0}, colorIndices: {0, 1, 0}, colors: {Red, Green}'
Note: This is a beta release of this feature and may contain bugs or exhibit unexpected behaviour. Related APIs are subject to change without a deprecation process.
- Implemented types
Constructors
-
MapPolylineSolidMultiColorRepresentation(MapMeasureDependentRenderSize lineWidth, LineCap capShape, List<
double> colorStops, List<int> colorIndices, List<Color> colors, double gradientLength) -
Creates a representation for a multicolored line without an outline.
factory
-
MapPolylineSolidMultiColorRepresentation.withOutline(MapMeasureDependentRenderSize lineWidth, MapMeasureDependentRenderSize outlineWidth, Color outlineColor, LineCap capShape, List<
double> colorStops, List<int> colorIndices, List<Color> colors, double gradientLength) -
Creates a representation for a multicolored line with an outline.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setMultiColorGradientLength(
double length) → bool - Sets the multiple color segment gradient length.
-
setMultiColors(
List< double> colorStops, List<int> colorIndices, List<Color> colors) → bool - Sets lists of colors and multiple color segment stops for the polyline to be colored in.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited