fabpuddu2

Proble with globecontro and grouplayer

Discussion created by fabpuddu2 on Jun 25, 2012
Latest reply on Jul 10, 2012 by fabpuddu2
hi,

I'm using the object globecontrol and I ran into problems adding featurelayer (drapped) within group layers.

1) if I add the featurelayer, not inside group layers, works perfectly
2) if I add a grouplayer, with a first featurelayer associated, it works perfectly
3) If a grouplayer, with featurelayer associated, already present on globe I try to add a second featurelayer is not represented, but is correctly added to the TOC in the grouplayer (but only by doing a refresh on the subject grouplayer)

My code:

m_GroupLayer ---> grouplayer (IgroupLayer)
pFLy --> featurelayer (IFeatureLayer)
m_objGlobeControl --> globecontrol

' ---------------------------------------------------------------------- First time Add FeatureLayer and GroupLayer, and Add GroupLayer to GLobe

m_GroupLayer.Add(pFLy)
m_objGlobeControl.Globe.AddLayerType(m_GroupLayer, esriGlobeLayerType.esriGlobeLayerTypeDraped, True)
TryCast(m_objGlobeControl.GlobeDisplay, IGlobeDisplayLayers).RefreshLayer(m_GroupLayer)

' ---------------------------------------------------------------------- Second time add other FeatureLayer to GroupLayer

m_GroupLayer.Add(pFLy)
TryCast(m_objGlobeControl.GlobeDisplay, IGlobeDisplayLayers).RefreshLayer(m_GroupLayer)





thanks

fabrizio

Outcomes