Class IdentifyLayerResult

java.lang.Object
com.esri.arcgisruntime.mapping.view.IdentifyLayerResult

public final class IdentifyLayerResult extends Object
Represents an identify result at a specific screen location within a specific layer, using one of the identifyLayersAsync methods on GeoView.

Dependent upon how the identifyLayerAsync method being called on GeoView, the identified results wrapped in the class can be retrieved by calling getElements() to get a List containing the identified geoelements, or calling getPopups() to get a list of Popups.

For layers that have sublayers, results for each sublayer are returned from getSublayerResults(), and the parent IdentifyLayerResult may not contain any identified geoelements or popups itself.

Some identify methods work against all layers currently in the GeoView, returning a List of IdentifyLayerResults; use the getLayerContent() method to find the Layer that contains the identified geoelements.

Identify methods only find features that are visible; features that are not displayed because the associated layer is outside of its scale range will not be identified. You can use the FeatureTable.queryFeaturesAsync(com.esri.arcgisruntime.data.QueryParameters) method on a FeatureLayer to find features without these limitations. The Symbol of a Feature is accounted for; for example, if a SimpleMarkerSymbol is at least partially drawn on screen, that Feature can be included in identify results, even if the actual Point geometry is off screen.

See the 'Identify features' topic in the Guide for more information about identifying geoelements.

Since:
100.0.0
  • Method Details

    • getLayerContent

      public LayerContent getLayerContent()
      Returns the LayerContent of the layer that contains the identified geoelements. When using the identify methods that work against all layers in the map, this LayerContent can be used to work out which layer each identified geoelement belongs to.
      Returns:
      the LayerContent of the layer that contains the identified geoelements
      Since:
      100.0.0
    • getElements

      public List<GeoElement> getElements()
      Returns an unmodifiable list of the identified geoelements. The list may be empty if no geoelements were identified for a specific layer. Additionally, the number of identified geoelements may be limited by either the maxResults parameter of the identify method, or by the service itself. The list type depends on the type of objects contained in the layer and whether AggregationFeatureReduction is enabled on the layer. When AggregationFeatureReduction is enabled on the layer, list type will be either AggregateGeoElement or the GeoElement type contained in the layer. The function will always return a list containing objects that implement GeoElement.
      Returns:
      an unmodifiable List of geoelements from a single Layer; may be empty
      Since:
      100.0.0
      See Also:
    • getPopups

      public List<Popup> getPopups()
      Returns an unmodifiable List of the identified Popups. The list may be empty if no pop-ups were identified for a specific layer. Additionally, the number of identified geoelements may be limited by either the maxResults parameter of the identify method, or by the service itself.
      Returns:
      an unmodifiable List of Popups from a single Layer; may be empty
      Since:
      100.0.0
    • getSublayerResults

      public List<IdentifyLayerResult> getSublayerResults()
      Returns an unmodifiable List of IdentifyLayerResults for each sublayer that contains identified results. The list may be empty if no geoelements were identified within sublayers, or if the identified layer does not have sublayers.
      Returns:
      an unmodifiable List of IdentifyLayerResults for sublayers of the Layer of this IdentifyLayerResult
      Since:
      100.0.0
      See Also:
    • isTransferLimitExceeded

      public boolean isTransferLimitExceeded()
      Returns true if the number of the identify results exceeds the transfer limit set on the service; false if the limit was not exceeded or if there was an error.
      Returns:
      true if the number of the identify results exceeds the transfer limit set on the service; false if the limit was not exceeded or if there was an error
      Since:
      100.0.0
    • getError

      public ArcGISRuntimeException getError()
      Returns the runtime error that occurred during the identify operation if there was one, otherwise null is returned.
      Returns:
      the runtime error that occurred during the identify operation if there was one, otherwise null is returned
      Since:
      100.0.0
      See Also: