iho-ohi / S-101_Portrayal-Catalogue

Space to discuss and review IHO S-101 Portrayal Catalogue
33 stars 12 forks source link

Vertical clearance not displayed #449

Closed DavidGrant-NIWC closed 1 month ago

DavidGrant-NIWC commented 2 months ago

As reported by @TDYCarHugh, the following features will not depict vertical clearance values unless either the featureName attribute or a horizontal clearance attribute is present:

Relevant code:

    local featureName = GetFeatureName(feature, contextParameters)
    if featureName or HasHorizontalClearance(feature) then
        featurePortrayal:AddInstructions('LocalOffset:0,0;TextAlignHorizontal:Center;TextAlignVertical:Center;FontColor:CHBLK')
        if featureName then
            featurePortrayal:AddTextInstruction(EncodeString(featureName), 26, 24, viewingGroup, 9)
            PortrayClearances(feature, featurePortrayal, contextParameters, viewingGroup, 0, -3.51)
        else
            PortrayClearances(feature, featurePortrayal, contextParameters, viewingGroup, 0, 0)
        end
    end