Class 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 geo-elements, 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 geo-elements 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 geo-elements.

    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 geo-elements.

    Since:
    100.0.0
    • Method Detail

      • getLayerContent

        public LayerContent getLayerContent()
        Returns the LayerContent of the layer that contains the identified geo-elements. 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 geo-element belongs to.
        Returns:
        the LayerContent of the layer that contains the identified geo-elements
        Since:
        100.0.0
      • getElements

        public List<GeoElement> getElements()
        Returns an unmodifiable List of the identified GeoElements. The list may be empty if no geo-elements were identified for a specific layer. Additionally, the number of identified geo-elements may be limited by either the maxResults parameter of the identify method, or by the service itself.
        Returns:
        an unmodifiable List of GeoElements from a single Layer; may be empty
        Since:
        100.0.0
        See Also:
        GeoElement
      • 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 geo-elements 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 geo-elements 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:
        ArcGISSublayer
      • 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:
        ArcGISRuntimeException