Display a composite layer of all the subtype values in a feature class.
This is useful for controlling labeling, visibility, and symbology of a given subtype as though they are distinct layers on the map.
The sample loads with the sublayer visible on the map. Toggle its visibility by clicking the "Show sublayer " checkbox. Toggle between the sublayer's original renderer and an alternate renderer using the radio buttons. Click the "Set sublayer minimum scale" button to set the sublayer's minimum scale to the current map scale.
- Create a
SubtypeFeatureLayer
from aServiceFeatureTable
that defines a subtype, and add it to theArcGISMap
. - Get a
SubtypeSublayer
from the subtype feature layer using its name. - Enable the sublayer's labels and define them with
getLabelDefinitions()
. - Set the sublayer's visibility with
setVisible()
. - Change the sublayer's renderer/symbology with
setRenderer()
. - Update the sublayer's minimum scale value with
setMinScale()
.
- LabelDefinition
- ServiceFeatureTable
- SubtypeFeatureLayer
- SubtypeSublayer
The feature service layer in this sample represents an electric network in Naperville, Illinois, which contains a utility network with asset classification for different devices.
asset group, feature layer, labeling, sublayer, subtype, symbology, utility network, visible scale range