Class ArcGISMapServiceSublayerInfo
- All Implemented Interfaces:
JsonSerializable
ArcGISMapServiceSublayerInfo
provides basic information about an individual map image sublayer (or map
service sublayer), such as the description, geometry type, drawing information, fields, extent, capabilities,
and layer type. You can obtain a collection of map image sublayers from ArcGISMapImageLayer.getSublayers()
and obtain the ArcGISMapServiceSublayerInfo
using ArcGISSublayer.getMapServiceSublayerInfo()
.
The getServiceType()
specifies if the map image sublayer is a feature layer, table,
raster layer, or group layer. If the sublayer type is GROUP_LAYER
, it will have
its own collection of sublayers that you can access using ArcGISSublayer.getSublayers()
.
If one of these sublayers is a group layer it will also contain a collection of sublayers, and so on.
Certain properties of a sublayer can be changed programmatically by calling methods on the parent
ArcGISMapImageSublayer class, or the root ArcGISMapImageLayer; for example hasDefaultVisibility()
indicates the initial, default visibility, which can then be changed at runtime using
ArcGISMapImageLayer.setVisible(boolean)
or
ArcGISMapImageSublayer.setVisible(boolean)
, depending on the value of
LayerContent.canChangeVisibility()
.
- Since:
- 100.1.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The type of sublayer in the ArcGIS map service. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether the sublayer supports modifying its renderer and/or its data source.boolean
Returns whether the text and symbols on the sublayer will change as the map scale varies.static ArcGISMapServiceSublayerInfo
Creates an ArcGISMapServiceSublayerInfo instance from a JSON string.Gets the attribution text of the sublayer.Gets the capabilities supported by the sublayer.Gets the sublayer's default subtype code.Gets the definition expression for the sublayer by which data in the layer is filtered.Gets the description of the sublayer.Gets the name of the display field for the sublayer.Gets the drawing information for the sublayer.double
Gets the maximum scale at which the sublayer is visible, taking into account the visible scale range of this sublayer's ancestors.double
Gets the minimum scale at which the sublayer is visible, taking into account the visible scale range of this sublayer's ancestors.Gets the geographic extent that the sublayer covers.Gets an unmodifiable list of FeatureSubtype for this sublayer.Gets an unmodifiable list ofFeatureType
objects representing feature subtypes in the sublayer.Gets the definition of the field with a given name or alias.Gets an unmodifiable list ofField
objects representing the fields in the sublayer.Gets the type of geometry contained by features in the sublayer.long
Gets the maximum record count set on the sublayer.double
Gets the maximum scale at which the sublayer is visible.double
Gets the minimum scale at which the sublayer is visible.Gets the information about ownership-based access control governing who can edit, delete, and query features.Gets information that identifies the sublayer's parent layer.Gets an unmodifiable collection of RelationshipInfo objects that describe this layer/table's relationship with another layer or table in the service.long
Gets the service layer ID of the sublayer.Gets the service layer name of the sublayer.Gets the type of sublayer in the ArcGIS map service.Gets information that identifies the sublayers of this sublayer.Gets the name of the sublayer's subtype field.Gets the time information for the sublayer.Gets the name of the field containing the Type ID.Gets unknown data from the source JSON.Gets unsupported data from the source JSON.getUrl()
Gets the URL of the sublayer.Gets the version of the sublayer.boolean
Indicates whether the features in the sublayer can have attachments.boolean
Indicates whether the sublayer is visible by default.boolean
Indicates whether the sublayer has labels defined on it.boolean
hasM()
Indicates whether the sublayer geometry contains m-values.boolean
hasZ()
Indicates whether the sublayer geometry contains z-values.boolean
Indicates whether data in the sublayer is versioned.boolean
Indicates whether the sublayer supports advanced query operations (such as ordering results, or returning distinct results).boolean
Indicates whether the sublayer supports statistical functions in query operations.boolean
Indicates whether the sublayer requires the use of standardized queries.toJson()
Serializes an ArcGISMapServiceSublayerInfo to a JSON string.
-
Method Details
-
fromJson
Creates an ArcGISMapServiceSublayerInfo instance from a JSON string.- Parameters:
json
- a JSON string that represents an ArcGISMapServiceSublayerInfo- Returns:
- an ArcGISMapServiceSublayerInfo instance
- Throws:
IllegalArgumentException
- if json is null or empty- Since:
- 100.1.0
-
toJson
Serializes an ArcGISMapServiceSublayerInfo to a JSON string.- Specified by:
toJson
in interfaceJsonSerializable
- Returns:
- a JSON string
- Since:
- 100.1.0
-
getUnknownJson
Description copied from interface:JsonSerializable
Gets unknown data from the source JSON.Unknown JSON is a Map of values not defined in the ArcGIS specification used to create this object but found in the source JSON. If the object is written back to JSON, any unknown JSON data is not persisted. The ArcGIS specification may be for a web map, web scene, REST API, and so on.
- Specified by:
getUnknownJson
in interfaceJsonSerializable
- Returns:
- an unmodifiable Map containing unknown data from the source JSON
-
getUnsupportedJson
Description copied from interface:JsonSerializable
Gets unsupported data from the source JSON.Unsupported JSON is a Map of values defined in the ArcGIS specification used to create this object but not currently used in this API. If the object is written back to JSON, any unsupported JSON data is persisted. The ArcGIS specification may be from a web map, web scene, REST API, and so on.
- Specified by:
getUnsupportedJson
in interfaceJsonSerializable
- Returns:
- an unmodifiable Map containing unsupported data from the source JSON
-
getAttribution
Gets the attribution text of the sublayer.- Returns:
- the attribution text
- Since:
- 100.1.0
-
getCapabilities
Gets the capabilities supported by the sublayer.- Returns:
- the capabilities
- Since:
- 100.1.0
-
getDefinitionExpression
Gets the definition expression for the sublayer by which data in the layer is filtered.The definition expression string uses the SQL-92
where
clause syntax. Be sure to escape special characters in the expression string as required for your platform. The DATE keyword expects the date format yyyy-mm-dd and the TIMESTAMP keyword expects the time stamp format yyyy-mm-dd hh:mm:ss. See the ArcGIS Blog article Querying Feature Services Date-Time Queries.- Returns:
- the definition expression
- Since:
- 100.1.0
-
getDescription
Gets the description of the sublayer.- Returns:
- the description
- Since:
- 100.1.0
-
getDisplayFieldName
Gets the name of the display field for the sublayer.- Returns:
- the display field name
- Since:
- 100.1.0
-
getDrawingInfo
Gets the drawing information for the sublayer.- Returns:
- the drawing information
- Since:
- 100.1.0
-
getEffectiveMaxScale
public double getEffectiveMaxScale()Gets the maximum scale at which the sublayer is visible, taking into account the visible scale range of this sublayer's ancestors. If the map is zoomed in beyond this scale (theMapView.getMapScale()
is smaller than this number), the sublayer will not be visible.- Returns:
- the effective maximum scale, or Double.NaN if this is not specified
- Since:
- 100.1.0
-
getEffectiveMinScale
public double getEffectiveMinScale()Gets the minimum scale at which the sublayer is visible, taking into account the visible scale range of this sublayer's ancestors. If the map is zoomed out beyond this scale (theMapView.getMapScale()
is larger than this number) this sublayer will not be visible.- Returns:
- the effective minimum scale, or Double.NaN if this is not specified
- Since:
- 100.1.0
-
getExtent
Gets the geographic extent that the sublayer covers.- Returns:
- the extent
- Since:
- 100.1.0
-
getFeatureTypes
Gets an unmodifiable list ofFeatureType
objects representing feature subtypes in the sublayer. For example, a roads layer may contain 2 feature subtypes: highways and streets.- Returns:
- an unmodifiable list of the feature subtypes
- Since:
- 100.1.0
-
getField
Gets the definition of the field with a given name or alias.- Parameters:
fieldNameOrAlias
- the field name or alias- Returns:
- the field definition
- Throws:
IllegalArgumentException
- if fieldNameOrAlias is null or empty- Since:
- 100.1.0
-
getFields
Gets an unmodifiable list ofField
objects representing the fields in the sublayer.- Returns:
- an unmodifiable list of the fields
- Since:
- 100.1.0
-
getGeometryType
Gets the type of geometry contained by features in the sublayer.- Returns:
- the geometry type
- Since:
- 100.1.0
-
getMaxRecordCount
public long getMaxRecordCount()Gets the maximum record count set on the sublayer. This represents the maximum number of records that can be returned from a query.- Returns:
- the maximum record count, or -1 if this is not specified
- Since:
- 100.1.0
-
getMaxScale
public double getMaxScale()Gets the maximum scale at which the sublayer is visible. If the map is zoomed in beyond this scale, the sublayer will not be visible.- Returns:
- the maximum scale
- Since:
- 100.1.0
- See Also:
-
getMinScale
public double getMinScale()Gets the minimum scale at which the sublayer is visible. If the map is zoomed out beyond this scale, the sublayer will not be visible.- Returns:
- the minimum scale
- Since:
- 100.1.0
- See Also:
-
getOwnershipBasedAccessControl
Gets the information about ownership-based access control governing who can edit, delete, and query features.- Returns:
- the ownership based access control information, or null if not enabled on the service
- Since:
- 100.1.0
-
getParentLayerInfo
Gets information that identifies the sublayer's parent layer.- Returns:
- an IdInfo that identifies the parent layer, or null if there is no parent layer
- Since:
- 100.1.0
-
getServiceLayerId
public long getServiceLayerId()Gets the service layer ID of the sublayer.- Returns:
- the service layer ID
- Since:
- 100.1.0
-
getServiceLayerName
Gets the service layer name of the sublayer.- Returns:
- the service layer name
- Since:
- 100.1.0
-
getServiceType
Gets the type of sublayer in the ArcGIS map service.- Returns:
- the service type
- Since:
- 100.1.0
- See Also:
-
getSublayerInfos
Gets information that identifies the sublayers of this sublayer.- Returns:
- an unmodifiable list of IdInfo objects for the sublayers of this sublayer
- Since:
- 100.1.0
-
getRelationshipInfos
Gets an unmodifiable collection of RelationshipInfo objects that describe this layer/table's relationship with another layer or table in the service.- Returns:
- an unmodifiable list of the relationship infos
- Since:
- 100.1.0
-
getTimeInfo
Gets the time information for the sublayer. Only applicable if the sublayer is time aware.- Returns:
- the time information, or null if the sublayer is not time aware
- Since:
- 100.1.0
-
getTypeIdFieldName
Gets the name of the field containing the Type ID.- Returns:
- the type ID field name
- Since:
- 100.1.0
-
getUrl
Gets the URL of the sublayer.- Returns:
- the URL
- Since:
- 100.1.0
-
getVersion
Gets the version of the sublayer.- Returns:
- the version
- Since:
- 100.1.0
- See Also:
-
canModifyLayer
public boolean canModifyLayer()Indicates whether the sublayer supports modifying its renderer and/or its data source.- Returns:
- true if the sublayer can be modified, false otherwise
- Since:
- 100.1.0
- See Also:
-
canScaleSymbols
public boolean canScaleSymbols()Returns whether the text and symbols on the sublayer will change as the map scale varies.- Returns:
- true if the text and symbols will change as the map scale varies, false otherwise
- Since:
- 100.1.0
-
hasAttachments
public boolean hasAttachments()Indicates whether the features in the sublayer can have attachments.- Returns:
- true if the features can have attachments, false otherwise
- Since:
- 100.1.0
- See Also:
-
hasDefaultVisibility
public boolean hasDefaultVisibility()Indicates whether the sublayer is visible by default.- Returns:
- true if the sublayer is visible by default, false otherwise
- Since:
- 100.1.0
- See Also:
-
hasLabels
public boolean hasLabels()Indicates whether the sublayer has labels defined on it.- Returns:
- true if the sublayer has labels, false otherwise
- Since:
- 100.1.0
-
hasM
public boolean hasM()Indicates whether the sublayer geometry contains m-values.- Returns:
- true if the geometry contains m-values, false otherwise
- Since:
- 100.1.0
- See Also:
-
hasZ
public boolean hasZ()Indicates whether the sublayer geometry contains z-values.- Returns:
- true if the geometry contains z-values, false otherwise
- Since:
- 100.1.0
- See Also:
-
isDataVersioned
public boolean isDataVersioned()Indicates whether data in the sublayer is versioned.- Returns:
- true if the data is versioned, false otherwise
- Since:
- 100.1.0
- See Also:
-
isSupportsAdvancedQueries
public boolean isSupportsAdvancedQueries()Indicates whether the sublayer supports advanced query operations (such as ordering results, or returning distinct results).- Returns:
- true if the sublayer supports advanced queries, false otherwise
- Since:
- 100.1.0
-
isSupportsStatistics
public boolean isSupportsStatistics()Indicates whether the sublayer supports statistical functions in query operations.- Returns:
- true if the sublayer supports statistics, false otherwise
- Since:
- 100.1.0
-
isUseStandardizedQueries
public boolean isUseStandardizedQueries()Indicates whether the sublayer requires the use of standardized queries.- Returns:
- true if standardized queries are required, false otherwise
- Since:
- 100.1.0
-
getSubtypeField
Gets the name of the sublayer's subtype field.- Returns:
- the name of the sublayer's subtype field or an empty string if the feature subtype is not defined
- Since:
- 100.3.0
-
getDefaultSubtypeCode
Gets the sublayer's default subtype code.Subtypes are implemented by coded values, which are integers. Those integer values each represent a feature in the subtype. For example, the following codes in a subtype named RoadClass could represent valid classes in a feature class for streets:
- 0 - Local Streets
- 1 - Secondary Streets
- 2 - Main Streets
- Returns:
- the sublayer's default subtype code or null if no default subtype feature is defined
- Since:
- 100.3.0
-
getFeatureSubtypes
Gets an unmodifiable list of FeatureSubtype for this sublayer.- Returns:
- an unmodifiable list of FeatureSubtype for this sublayer
- Since:
- 100.3.0
-