Häufig gestellte Frage (FAQ)

Können die Beschriftungen in einem Feature-Layer je nach Feature farblich unterschiedlich formatiert sein?

Last Published: September 13, 2023

Antwort

To create labels for different features have different colors in a feature class, it is necessary to create label classes. This can be done using the ESRI.ArcGIS.Carto.IAnnotateLayerProperties interface, as shown in the following example:
Pseudo Code Example:

IAnnotateLayerProperties.Class = "Class1" // Create one or more classes to represent each label color
IAnnotateLayerProperties.WhereClause = "Pop2000 > 4000" // Criteria for selecting the features to label with this color
Cast IAnnotateLayerProperties to ILabelEngineLayerProperties to set Symbol properties for the label
ILabelEngineLayerProperties.Symbol gives an ITextSymbol, which has a Color property. Use this to change the color
ILabelEngineLayerProperties.Expression = " \"State Name: \"[STATENAME] " // Actual label content

Artikel-ID:000016570

Hilfe von ArcGIS-Expert*innen erhalten

Technischen Support kontaktieren

Die Esri Support-App herunterladen

Zu den Download-Optionen

Zugehörige Informationen

Weitere Informationen zu diesem Thema erkunden