You can change the way military symbols are visualized by implementing your own IFeaturePainter.

The IFeaturePainter implementation needs to:

For example, the implementation below paints icon symbols with a surrounding rectangle when they are selected, and also adds an additional label below each symbol.

class MyMilitarySymbolPainter : public IFeaturePainter {
      // Regular symbols are painted with a default style, while selected symbols are painted with a surrounding rectangle.
      : _defaultStyle(MilitarySymbolStyle::newBuilder().build()), _selectedStyle(_defaultStyle->asBuilder().surroundingRectangleEnabled(true).build()) {

  void configureMetadata(FeaturePainterMetadata& /*metadata*/) const override {

  void paint(const Feature& feature, const FeaturePainterContext& context, FeatureCanvas& canvas) const override {
    // Retrieve the geometry from the feature
    auto geometry = feature.findGeometry();
    if (!geometry) {
      std::cerr << "Ignoring feature '" << feature.getId() << "'. It has no geometry." << std::endl;

    // Transform the feature to a military symbol.
    auto symbol = MilitarySymbol::create(feature);

    // Use a MilitarySymbologyCanvas to submit a draw command for the military symbol.
    // The submitted symbol style depends on whether the feature is currently selected or not.
        .style(context.isFeatureStateEnabled(FeatureState::selected()) ? _selectedStyle : _defaultStyle)

    // Paint the symbol code as an additional label, with a fixed offset below the symbol.
    RelativePosition labelPosition;
    labelPosition.offsetY = _defaultStyle->getIconSize() + 50.0;
    labelPosition.verticalAlignment = VerticalAlignment::Above;

  std::shared_ptr<MilitarySymbolStyle> _defaultStyle;
  std::shared_ptr<MilitarySymbolStyle> _selectedStyle;