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;
  }

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