GlobeControl Transparency FeatureLayer

403
5
07-10-2012 03:48 AM
Highlighted
New Contributor
hi at all,

I'am try to use transparency on FeatureLayer (polygon featureclass) on GlobeControl. The featurelayer must be within a grouplayer, but I've also tried out and does not work. This is my code:

Dim pLayerEffects As ILayerEffects
pLayerEffects = pFLy
pLayerEffects.Transparency = 50

if I apply the transparency to grouplayer it work fine

thanks

fabrizio
Reply
0 Kudos
5 Replies
Highlighted
New Contributor
anyone can help me?

thanks
Reply
0 Kudos
Highlighted
New Contributor
to follow the source code that I used, the transparency on polygon does not work. Some ideas???

        Dim pFLy As IFeatureLayer
        Dim pFeatureClass As IFeatureClass
        Dim pFSelection As IFeatureSelection
        Dim pGlobeLayerProperties As IGlobeLayerProperties = Nothing
        Dim pLayerEffects As ILayerEffects

        pFeatureClass = CreateFeatureClass(esriGeometryType.esriGeometryPolygon)

        pFLy = New FeatureLayer

        With pFLy
            .FeatureClass = pFeatureClass
            .Name = m_NameLayer
            .Cached = My.Settings.UseCachedLayer
            .Selectable = True
            .DisplayField = "ToolTip"
            .ShowTips = True
            .ScaleSymbols = Me.m_SymbolProperties.Symbol_SizeFixed
        End With

        pLayerEffects = pFLy
        pLayerEffects.Transparency = 60

        m_objGlobeControl.Globe.AddLayerType(pFLy, esriGlobeLayerType.esriGlobeLayerTypeDraped, True)

        pGlobeLayerProperties = TryCast(Me.m_objGlobeControl.GlobeDisplay, IGlobeDisplayLayers).FindGlobeProperties(pFLy)
        pGlobeLayerProperties.BaseImageDrawingPriority = 1

          ' ----> Adding feature to feaureclass

         TryCast(m_objGlobeControl.GlobeDisplay, IGlobeDisplayLayers2).RefreshLayer(pFLy)
Reply
0 Kudos
Highlighted
New Contributor
anyone can help me?
Reply
0 Kudos
Highlighted
Occasional Contributor
Hello.

Following code worked for me in ArcMapAddIn.


ILayerEffects m_LayerEffects = ArcMap.Document.FocusMap.get_Layer(0) as ILayerEffects;
m_LayerEffects.Transparency = 50;
ArcMap.Document.ActiveView.Refresh();


I hope that will help you.
Reply
0 Kudos
Highlighted
New Contributor
thanks,

This is the same code that I use with mapcontrol and working properly, but does not work when I work with globecontrol

some advice?

thanks
Reply
0 Kudos