MapMarkerTextStyle.make constructor

MapMarkerTextStyle.make(
  1. double textSize,
  2. Color textColor,
  3. double textOutlineSize,
  4. Color textOutlineColor,
  5. List<MapMarkerTextStylePlacement> placements,
)

Creates a set of styling options for the text of a MapMarker.

List of placements is used to specify allowed placement of text relative to the icon. When marker overlapping is allowed as set by MapMarker.isOverlapAllowed, only first placement element is considered. Otherwise the placement value is chosen so that the text does not overlap with other MapMarker instances.

Placement values are prioritized according to the order in which they appear in the list. Lists with duplicate entries as well as empty lists are not supported.

  • textSize The size of the text in pixels. Only positive values are supported.

  • textColor The text color.

  • textOutlineSize The size of the text outline in pixels. Only non-negative values are supported.

  • textOutlineColor The color of the text outline.

  • placements List of allowed placements of the text relative to the icon of a MapMarker.

Throws MapMarkerTextStyleInstantiationException. In case of invalid input parameters.

Implementation

factory MapMarkerTextStyle.make(double textSize, ui.Color textColor, double textOutlineSize, ui.Color textOutlineColor, List<MapMarkerTextStylePlacement> placements) => $prototype.make(textSize, textColor, textOutlineSize, textOutlineColor, placements);