|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMaplexOverposter
Provides access to members that control the Maplex Overposter.
The MaplexOverposter object provides a wrapper around the Maplex placement engine, hiding the details of the text placement algorithms. To use the overposter first initialize it with parameters such as the map extent, spatial reference, display object, track cancel object, and overposter properties. Then call AddFeature() to add the features to the overposter. Call PlaceLabels() to start processing, and when this method returns, retrieve the results using the PlacedLabels and UnplacedLabels enumerators.
Note that MaplexOverposter does not generate events to fire back labels as they are placed, like the BasicOverposter. You retrieve all of the placed labels at the end of a placement run. MaplexOverposter determines the font metrics for you, so you don’t need to supply the label size.
This interface is designed for low level access to the placement algorithms of the MaplexOverposter. The labeling maps and features, use the MaplexAnnotateMap and MaplexAnnoateFeature objects. They wrap calls to the MaplexOverposter into a more general form for use with layers and maps.
Method Summary | |
---|---|
void |
addBarriers(int weight,
IGeometryCollection barriers)
Adds a barrier object that placed objects must avoid. |
int |
addClass(ILabelEngineLayerProperties props)
Adds a class to the overposter and specifies its properties. |
void |
addFeature(int classIndex,
IGeometry featureShape,
ISymbol featureSymbol,
int featureID,
String label,
double labelAngle,
int mapLevel)
Adds a feature with its associated label (optional) to the overposter. |
void |
addSymbol(int classIndex,
ISymbol symbol,
IGeometry geometry,
int featureID)
Adds a symbol to be placed. |
int |
getCapabilities(ILayer layer)
Overposter capabilities for the specified layer. |
int |
getClassCount()
The number of classes. |
int |
getPlacedLabelCount()
The number of unplaced labels. |
IEnumMaplexPlacedLabel |
getPlacedLabels()
Enumeration of placed labels. |
int |
getUnplacedLabelCount()
The number of unplaced labels. |
IEnumMaplexPlacedLabel |
getUnplacedLabels()
Enumeration of unplaced labels. |
void |
initialize(IEnvelope extent,
IDisplay display,
ISpatialReference spatialReference,
IMaplexOverposterProperties overposterProps,
ITrackCancel trackCancel)
Initializes the overposter for drawing into the specified area of the map display. |
void |
placeLabels()
Places labels using the overposter. |
void |
resetClasses()
Removes all classes from the overposter. |
Method Detail |
---|
void initialize(IEnvelope extent, IDisplay display, ISpatialReference spatialReference, IMaplexOverposterProperties overposterProps, ITrackCancel trackCancel) throws IOException, AutomationException
extent
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)display
- A reference to a com.esri.arcgis.display.IDisplay (in)spatialReference
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)overposterProps
- A reference to a com.esri.arcgis.carto.IMaplexOverposterProperties (in)trackCancel
- A reference to a com.esri.arcgis.system.ITrackCancel (in, optional, pass null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getCapabilities(ILayer layer) throws IOException, AutomationException
layer
- A reference to a com.esri.arcgis.carto.ILayer (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getClassCount() throws IOException, AutomationException
The number of labeling classes which have been added to the overposter.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int addClass(ILabelEngineLayerProperties props) throws IOException, AutomationException
props
- A reference to a com.esri.arcgis.carto.ILabelEngineLayerProperties (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void resetClasses() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addFeature(int classIndex, IGeometry featureShape, ISymbol featureSymbol, int featureID, String label, double labelAngle, int mapLevel) throws IOException, AutomationException
classIndex
- The classIndex (in)featureShape
- A reference to a com.esri.arcgis.geometry.IGeometry (in)featureSymbol
- A reference to a com.esri.arcgis.display.ISymbol (in)featureID
- The featureID (in)label
- The label (in)labelAngle
- The labelAngle (in)mapLevel
- The mapLevel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addBarriers(int weight, IGeometryCollection barriers) throws IOException, AutomationException
weight
- A com.esri.arcgis.carto.esriBasicOverposterWeight constant (in)barriers
- A reference to a com.esri.arcgis.geometry.IGeometryCollection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addSymbol(int classIndex, ISymbol symbol, IGeometry geometry, int featureID) throws IOException, AutomationException
classIndex
- The classIndex (in)symbol
- A reference to a com.esri.arcgis.display.ISymbol (in)geometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)featureID
- The featureID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void placeLabels() throws IOException, AutomationException
Tells the MaplexOverposter to place the labels.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getPlacedLabelCount() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getUnplacedLabelCount() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumMaplexPlacedLabel getPlacedLabels() throws IOException, AutomationException
Returns an enumeration containing the labels (as MaplexPlacedLabels) for which Maplex has obtained satisfactory positions.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumMaplexPlacedLabel getUnplacedLabels() throws IOException, AutomationException
Returns an enumeration containing the labels (as MaplexPlacedLabels) for which Maplex could not obtain satisfactory positions. The best possible position is given to each label anyway and its PlacementCode is set to esriPlacementUnplaced.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |