This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Display > ESRI.ArcGIS.Display > Interfaces > IM > IMapContext Interface (ArcObjects .NET 10.5 SDK) |
Provides access to the context in which geometric effects and marker placements work.
Description | ||
---|---|---|
FromGeographyToMap | Converts geographic geometry to map context geometry. | |
FromMapToGeography | Converts map context geometry to geographic geometry. | |
FromPoints | Converts a distance expressed in points into a geographic distance. | |
Init | Initializes the map context. | |
InitFromDisplay | Initializes the map context using a display transformation. | |
ReferenceScale | The reference scale of the map. | |
SpatialReference | The spatial reference of the map. | |
ToPoints | Converts a geographic distance into a distance expressed in points. |
CoClasses and Classes | Description |
---|---|
MapContext | The context in which geometric effects and marker placement work. |
Spatial Reference and Reference Scale information is used to define a Map Context.
A Feature Representation has to be initiated with a map context to make itself valid.
'How to initialize mapcontext Dim pMapContext As IMapContext Dim pGFClass As IGeoDataset Set pMapContext=New MapContext Set pGFClass=pFClass pMapContext.Init pGFClass.SpatialReference, 25000, pGFClass.Extent Set pRepresentation=pRepClass.GetRepresentation(pFeat, pMapContext) 'where pFeat is reference to a Feature object and pFClass is reference to a FeatureClass object
'How to Initialize a mapcontext using the DisplayTransformation
Dim pMC As IMapContext
Set pMC=New MapContext
Dim pDisp As IDisplayTransformation
Dim pAV as IActiveView
Set pAV=pMxDoc.ActiveView
Set pDisp=pAV.ScreenDisplay.DisplayTransformation
pMC.InitFromDisplay pDisp