This document is archived and information here might be outdated. Recommended version. |
Provides access to the context in which geometric effects and marker placements work.
Name | 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. |
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