matchWay method

  1. @override
void matchWay(
  1. LayerContainer layerContainer,
  2. WayProperties wayProperties
)
override

Checks the wayProperties and adds itself to the layerContainer if there is something to draw.

Implementation

@override
void matchWay(LayerContainer layerContainer, WayProperties wayProperties) {
  String? caption = textKey!.getValue(wayProperties.getTags());
  if (caption == null || caption.trim().isEmpty) {
    return;
  }

  switch (textTransform) {
    case TextTransform.uppercase:
      caption = caption.toUpperCase();
      break;
    default:
      break;
  }

  layerContainer.addLabel(RenderInfoWay(wayProperties, this, caption: caption.trim()));
}