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


IMap.Barriers Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IM > IMap Interface > IMap.Barriers Property
ArcGIS Developer Help

IMap.Barriers Property

The list of barriers and their weight for labeling.

[Visual Basic .NET]
Public Function get_Barriers ( _
    ByVal pExtent As IEnvelope _
) As IBarrierCollection
[C#]
public IBarrierCollection get_Barriers (
    IEnvelope pExtent
);
[C++]
HRESULT get_Barriers(
  IEnvelope* pExtent,
  IBarrierCollection** Barriers
);
[C++]
Parameters
pExtent 

pExtent is a parameter of type IEnvelope* Barriers [out, retval]
Barriers is a parameter of type IBarrierCollection**

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

Returns a reference to the BarrierCollection object.  The BarrierCollection object contains a collection of geometries used for over posting calculations during labeling.  An item in the BarrierCollection is made up of a GeometryCollection and a Weight.  Each item corresponds to a graphics layer and the geometries of all the graphics in that layer are stored in the GeometryCollection.  The Weight is an esriBasicOverPosterWeight and it stores the level of importance a barrier item has.

A map that has no labels or annotation can still have a IBarrierCollection::Count of one.  This is because every Map has a Basics Graphics Layer which cannot be deleted and this layer has a barrier weight by default.  Each additional graphics layer, feature annotation layer (FDOGraphicsLayer) or a Annotation Group/Target Layer (GraphicsLayer), added to the Map will increase the Count by one.

The Barriers property requires an IEnvelope.  Use IDisplayTransformation::Bounds to get an IEnvelope that represents the Map's full extent.  If you are labelling in just a small area use IDisplayTransformation::FittedBounds which is the current view extent.

 

esriBasicOverposterWeight

0 - esriNoWeight - ok to over post
1 - esriLowWeight
2 - esriMediumWeight
3 - esriHighWeight - do not over post

See Also

IMap Interface