setMultiColors abstract method

bool setMultiColors(
  1. List<double> colorStops,
  2. List<int> colorIndices,
  3. List<Color> colors
)

Sets lists of colors and multiple color segment stops for the polyline to be colored in.

When this representation is already set on any MapPolyline, values will be applied on that MapPolyline right away. If this representation is not set on any MapPolyline, values will be applied once representation is set on a MapPolyline.

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.

  • colorStops List containing color stop values indicating a change of color on a polyline. Color stops must be in the range of [0.0, 1.0]. Color stop values must be sorted in ascending order (e.g. 0.0, 0.2, 0.3, 1.0). Duplicate values are not allowed. Color stop list must be of the same size as color indices list. Maximum size is 16384 color stops. An empty list is not allowed. The first color stop value in the list must be 0.0.

  • colorIndices List of color indices (from the color list) corresponding to the color stops. Value range is: [0, (color list size - 1)]. Values outside of the range are not allowed. Color indices list must be of the same size as color stop list. Maximum size is 16384 color indices.

  • colors List of colors. Maximum size is 1024 colors. An empty list is not allowed.

Returns bool. Value indicating whether parameters are valid and can be applied.

Implementation

bool setMultiColors(List<double> colorStops, List<int> colorIndices, List<ui.Color> colors);