matchNode method

  1. @override
void matchNode(
  1. LayerContainer layerContainer,
  2. NodeProperties nodeProperties
)
override

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

Implementation

@override
void matchNode(LayerContainer layerContainer, NodeProperties nodeProperties) {
  String? caption = textKey!.getValue(nodeProperties.tags);
  if (caption == null || caption.trim().isEmpty) {
    return;
  }

  layerContainer.addLabel(RenderInfoNode(nodeProperties, this, caption: caption.trim()));
}