fabpuddu2

MOLE on MapControl and GlobeControl at same time

Discussion created by fabpuddu2 on May 16, 2013
Hi,

my application uses two forms the first 2D (mapcontrol) and the second 3D (globecontrol). within each one must display MOLE symbology.
After correctly displaing MOLE symbology on globecontrol, I can create MOLE layer on mapcontrol but it doesn't display.
raising no exception.

I'm using VB.NET - VISUAL STUDIO 8 - ARCENGINE 10 SP5 - MOLE 10 Sp3

------------------------------------------------- CREATE LAYER ON MAPCONTROL

pGeoFeatureLayer.FeatureClass = pFeatureClass

m_CachedGraphicFLyr = New ForceElementLayer
m_CachedGraphicFLyr.FeatureLayer = pGeoFeatureLayer
m_CachedGraphicFLyr.IsLiveUpdateEnabled = False
m_CachedGraphicFLyr.LiveUpdateInterval = 1

pForceElementLayer = TryCast(m_CachedGraphicFLyr, IForceElementLayer)
pForceElementLayer.Size = m_MoleSymbolSize
pForceElementLayer.SizeIsRatio = m_MoleSymbolSizeIsRatio

pLyr = TryCast(m_CachedGraphicFLyr, ILayer)
pLyr.Name = m_NameLayer
pLyr.Cached = Me.m_UseCache

m_objMapControl.AddLayer(pLyr, 0)

------------------------------------------------- CREATE LAYER ON GLOBECONTROL

pGeoFeatureLayer.FeatureClass = pFeatureClass

m_CachedGraphicFLyr = New ForceElementLayer

m_CachedGraphicFLyr.FeatureLayer = pGeoFeatureLayer
m_CachedGraphicFLyr.IsLiveUpdateEnabled = False
m_CachedGraphicFLyr.LiveUpdateInterval = 1

pForceElementLayer = TryCast(m_CachedGraphicFLyr, IForceElementLayer)
pForceElementLayer.Size = m_MoleSymbolSize
pForceElementLayer.SizeIsRatio = m_MoleSymbolSizeIsRatio

pLineSymbol.Width = MoleDisplayOptions.BillboardCalloutWidth

p3DSettings = TryCast(pForceElementLayer, I3DSettings)
p3DSettings.DisplayOption = MoleDisplayOptions.DisplayOptions
p3DSettings.EnableCallouts = m_MoleDisplayOptions.BillboardCallaout
p3DSettings.DefaultElevationMeters = m_MoleDisplayOptions.BillboardHeight
p3DSettings.CalloutLineSymbol = pLineSymbol
p3DSettings.MoleImageSize = m_MoleSymbolSizeImage

pLyr = TryCast(m_CachedGraphicFLyr, ILayer)
pLyr.Name = m_NameLayer
pLyr.Cached = Me.m_UseCache

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

-------------------------------------------------

thanks

fabrizio

Outcomes