Get BasicMap from Globe.
[C#]
///<summary>Get BasicMap from Globe.</summary> /// ///<param name="globe">An IGlobe interface.</param> /// ///<returns>An IBasicMap interface.</returns> /// ///<remarks>IBasicMap is a subset of IMap that provides support for ArcScene and ArcGlobe. The Map (2D), Scene (3D), and Globe (3D) coclasses implement this interface. Components used by ArcMap, ArcScene, and ArcGlobe, (such as the IdentifyDialog) utilize IBasicMap rather than IMap.</remarks> public ESRI.ArcGIS.Carto.IBasicMap GetBasicMapFromGlobe(ESRI.ArcGIS.GlobeCore.IGlobe globe) { ESRI.ArcGIS.Carto.IBasicMap basicMap = globe as ESRI.ArcGIS.Carto.IBasicMap; // Dynamic Cast return basicMap; }
[Visual Basic .NET]
'''<summary>Get BasicMap from Globe.</summary> ''' '''<param name="globe">An IGlobe interface.</param> ''' '''<returns>An IBasicMap interface.</returns> ''' '''<remarks>IBasicMap is a subset of IMap that provides support for ArcScene and ArcGlobe. The Map (2D), Scene (3D), and Globe (3D) coclasses implement this interface. Components used by ArcMap, ArcScene, and ArcGlobe, (such as the IdentifyDialog) utilize IBasicMap rather than IMap.</remarks> Public Function GetBasicMapFromGlobe(ByVal globe As ESRI.ArcGIS.GlobeCore.IGlobe) As ESRI.ArcGIS.Carto.IBasicMap Dim basicMap As ESRI.ArcGIS.Carto.IBasicMap = TryCast(globe, ESRI.ArcGIS.Carto.IBasicMap) ' Dynamic Cast Return basicMap End Function