This document is archived and information here might be outdated.  Recommended version.


Get BasicMap from Globe Snippet (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference

Get BasicMap from Globe Snippet

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

Additional Requirements
  • The code in this document requires the following References added to the Visual Studio project:
  • ESRI.ArcGIS.Carto
  • ESRI.ArcGIS.GlobeCore
  • ESRI.ArcGIS.System