setLabel method

void setLabel(
  1. Route route,
  2. String text
)

Set route bubble text.

Parameters

  • IN route The route whose label should be set.
  • IN label The label.

The route label supports custom icon placement inside the text by using the icon place-mark %icon index%%, e.g. 'My header text %%0%%\n%%1%% my footer'.

The _icon index_ must be a valid integer in images list container, i.e. 0 <= icon index < images.size()

Throws

  • An exception if it fails.

Implementation

void setLabel(final Route route, final String text) {
  objectMethod(
    pointerId,
    'MapViewRouteCollection',
    'setLabel',
    args: <String, dynamic>{'route': route.pointerId, 'label': text},
  );
}