public class

LabelingInfo

extends Object
implements Serializable
java.lang.Object
   ↳ com.esri.core.map.LabelingInfo

Class Overview

This class is to be used to specify labeling information, including:

  • label placement,
  • label symbol,
  • label expression,
  • the min and max scale at which to show labels,
  • whether to use code values.
By controling the label expression, you can choose which fields to show the values of as labels, concatenate multiple fields, add a custom String, round numerical values, and more using the syntax outlined in the REST specification at http://resources.arcgis.com/en/help/rest/apiref/label.html

Summary

Public Constructors
LabelingInfo()
Public Methods
boolean equals(Object obj)
static LabelingInfo fromJson(JsonParser parser)
String getLabelExpression()
Gets the label expression.
LabelPlacement getLabelPlacement()
Gets the label placement.
double getMaxScale()
double getMinScale()
Symbol getSymbol()
String getWhere()
int hashCode()
boolean isUseCodedValues()
void setLabelExpression(String labelExpression)
Sets the label expression.
void setLabelPlacement(LabelPlacement labelPlacement)
Sets the label placement with respect to the feature.
void setMaxScale(double maxScale)
Sets the maximum scale at which the labels will be visible.
void setMinScale(double minScale)
Sets the minimum scale at which the labels will be visible.
void setSymbol(Symbol symbol)
This should be a text symbol that will be applied to the labels.
void setUseCodedValues(boolean useCodedValues)
void setWhere(String where)
Sets the where clause.
String toJson()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LabelingInfo ()

Public Methods

public boolean equals (Object obj)

Parameters
obj Object
Returns
boolean

public static LabelingInfo fromJson (JsonParser parser)

Returns
LabelingInfo the labeling info.
Throws
Exception

public String getLabelExpression ()

Gets the label expression.

Returns
String the labelExpression

public LabelPlacement getLabelPlacement ()

Gets the label placement.

Returns
LabelPlacement the labelPlacement

public double getMaxScale ()

Returns
double the maxScale

public double getMinScale ()

Returns
double the minScale

public Symbol getSymbol ()

Returns
Symbol the symbol for the labels

public String getWhere ()

Returns
String the where clause

public int hashCode ()

Returns
int

public boolean isUseCodedValues ()

Returns
boolean the useCodedValues

public void setLabelExpression (String labelExpression)

Sets the label expression. For example, to use field "areaname", specify as "[areaname]". You can also concatenate multiple fields, add a custom String, round values, and more using the syntax outlined in the REST specification at http://resources.arcgis.com/en/help/rest/apiref/label.html.

Parameters
labelExpression String: the labelExpression to set

public void setLabelPlacement (LabelPlacement labelPlacement)

Sets the label placement with respect to the feature.

Parameters
labelPlacement LabelPlacement: the LabelPlacement to set

public void setMaxScale (double maxScale)

Sets the maximum scale at which the labels will be visible.

Parameters
maxScale double: the maxScale to set

public void setMinScale (double minScale)

Sets the minimum scale at which the labels will be visible.

Parameters
minScale double: the minScale to set

public void setSymbol (Symbol symbol)

This should be a text symbol that will be applied to the labels.

Parameters
symbol Symbol: the symbol to set

public void setUseCodedValues (boolean useCodedValues)

Parameters
useCodedValues boolean: the useCodedValues to set

public void setWhere (String where)

Sets the where clause.
Example:
"NAME LIKE 'A%'" //label only those feature where name begins with A

Parameters
where String: the where clause to set

public String toJson ()

Returns
String JSON string for this object.
Throws
Exception