GeoView QML Type

  • Esri.ArcGISRuntime
  • GeoView
  • A base type for all views that can display geographic content. More...

    Import Statement: import Esri.ArcGISRuntime
    Since: Esri.ArcGISRuntime 100.0
    Inherited By:

    MapView and SceneView

    Properties

    Signals

    Methods

    Detailed Description

    Note: You cannot declare or create a component of this type in QML code.

    Subclasses can display the content in either 2D (MapView) or 3D (SceneView). In an MVC architecture, this class and its subclasses represent the View tier. The Model tier is represented by GeoModel, which supplies the geographic content as a Map or a (Scene). GeoView contains all the common operations and events that apply to displaying and working with maps and scenes. For example, you can change the viewable area by setting a Viewpoint, work with graphics in the GraphicsOverlay, and identify a GeoElement that displays in the view.

    This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

    TypeDefault Property
    GraphicsOverlaygraphicsOverlays (appends to model)
    ViewLabelPropertieslabeling
    TimeExtenttimeExtent
    SelectionPropertiesselectionProperties (since Esri.ArcGISRuntime 100.4)

    See also Cancelable, Map, MapView, Scene, SceneView, and GraphicsOverlay.

    Property Documentation

    [read-only, since Esri.ArcGISRuntime 100.3] attributionRect : rect

    Returns the attribution bounding rectangle (read-only).

    This property was introduced in Esri.ArcGISRuntime 100.3.


    [read-only, since Esri.ArcGISRuntime 100.1] attributionText : string

    the attribution text for the data that is currently displayed in the GeoView.

    This property was introduced in Esri.ArcGISRuntime 100.1.


    attributionTextVisible : bool

    The visibility of the Esri attribution text, true if attribution text is visible in the GeoView, false otherwise.

    By default the attribution text is visible.

    The Esri attribution text is shown as a semi-transparent view at the bottom of the GeoView spanning its full width.

    Note: Though you can set the Esri attribution text invisible, you may need to leave it visible based on your license agreement. Refer to your license agreement and to https://www.esri.com/legal.


    [read-only, since Esri.ArcGISRuntime 100.1] attributionTop : AnchorLine

    Returns the top anchor line of the attribution bounding rectangle.

    Other QtQuick items can be anchored to this property so that they display above the attribution text.

    This property was introduced in Esri.ArcGISRuntime 100.1.


    [read-only] currentViewpointCenter : ViewpointCenter

    Returns the current viewpoint's center location and scale (read-only).

    See also ViewpointCenter.


    [read-only] currentViewpointExtent : ViewpointExtent

    Returns the current viewpoint's bounding geometry (read-only).

    See also ViewpointExtent.


    [read-only] drawStatus : Enums.DrawStatus

    Returns the Enums.DrawStatus of the GeoView (read-only).

    New content is drawn every time a user pans or zooms the view, or the app programmatically changes its visible area. There is a short delay before this drawing phase completes. You can use GeoView::drawStatus to detect whether this drawing phase is in progress or has completed. For example, you may want to take a screen capture of a view's visible area (GeoView::exportImage) when drawing is completed.


    [read-only] error : Error

    Returns the error property of the GeoView (read-only).


    [read-only] exportImageUrl : url

    Returns the URL to the exported image (read-only).

    See also exportImage.


    [read-only] geoViewType : GeoViewType


    [default] graphicsOverlays : GraphicsOverlayListModel

    Gets the list of GraphicsOverlay objects used to display graphics on top of the view's content.

    To display graphics in the GeoView, add the graphics to a GraphicsOverlay and add the GraphicsOverlay to this collection. The order of the GraphicsOverlay objects in the collection reflects their display order in the view. The first GraphicsOverlay in the collection is drawn beneath all other graphic overlays. This collection may be empty but is never null. You can't add duplicate GraphicsOverlay objects to the collection or use this graphics overlay collection in another GeoView. Use methods such as GeoView::identifyGraphicsOverlays to identify graphics in this collection.


    [read-only, since Esri.ArcGISRuntime 100.2.1] heightInPixels : int

    Gets the height of the GeoView (read-only).

    Device independent pixels are returned when high-DPI scaling is enabled for the application. Otherwise, physical pixels are returned.

    This property was introduced in Esri.ArcGISRuntime 100.2.1.


    [read-only] identifyGraphicsOverlayResult : IdentifyGraphicsOverlayResult

    The identify graphics overlay result returned from an identifyGraphicsOverlay or identifyGraphicsOverlayWithMaxResults operations.

    Obtain this result once the identifyGraphicsOverlayStatusChanged signal emits, and the identifyGraphicsOverlayStatus is complete.


    [read-only] identifyGraphicsOverlayStatus : Enums.TaskStatus

    Returns the Enums.TaskStatus of the identifyGraphicsOverlay or identifyGraphicsOverlayWithMaxResults operations (read-only).

    Check this status when the identifyGraphicsOverlayStatusChanged signal emits to know the current status of the asynchronous operation.


    [read-only] identifyGraphicsOverlaysResults : list<IdentifyGraphicsOverlayResult>

    The identify graphics overlay results returned from an identifyGraphicsOverlays or identifyGraphicsOverlaysWithMaxResults operations.

    Obtain these results once the identifyGraphicsOverlaysStatusChanged signal emits, and the identifyGraphicsOverlaysStatus is complete.


    [read-only] identifyGraphicsOverlaysStatus : Enums.TaskStatus

    Returns the Enums.TaskStatus of the identifyGraphicsOverlays or identifyGraphicsOverlaysWithMaxResults operations (read-only).

    Check this status when the identifyGraphicsOverlaysStatusChanged signal emits to know the current status of the asynchronous operation.


    [read-only] identifyLayerResult : IdentifyLayerResult

    The identified GeoElements returned from an identifyLayer or identifyLayerWithMaxResults operation.

    Obtain these results once the identifyLayerStatusChanged signal emits, and the identifyLayerStatus is complete.


    [read-only] identifyLayerStatus : Enums.TaskStatus

    Returns the Enums.TaskStatus of the identifyLayer or identifyLayerWithMaxResults operation (read-only).

    Check this status when the identifyLayerStatusChanged signal emits to know the current status of the asynchronous operation.


    [read-only] identifyLayersResults : list<IdentifyLayerResult>

    The identified GeoElements returned from an identifyLayers or identifyLayersWithMaxResults operation.

    Obtain these results once the identifyLayersStatusChanged signal emits, and the identifyLayersStatus is complete.


    [read-only] identifyLayersStatus : Enums.TaskStatus

    Returns the Enums.TaskStatus of the identifyLayers or identifyLayersWithMaxResults operation (read-only).

    Check this status when the identifyLayersStatusChanged signal emits to know the current status of the asynchronous operation.


    [since Esri::ArcGISRuntime 100.14] interactionEnabled : bool

    Determines whether user interaction is enabled on the GeoView.

    This includes user interactions that manipulate the display of the GeoView, such as mouse, hover, touch, and keyboard interactions.

    If user interaction is disabled, all user interaction events on the GeoView will be disabled. For example, this will disable user actions such as zooming or panning the GeoView.

    User interaction is enabled by default.

    This property was introduced in Esri::ArcGISRuntime 100.14.


    [since Esri.ArcGISRuntime 100.10] labeling : ViewLabelProperties

    The view label properties.

    This property determines whether labels are created, added and animated for all of the layers and graphic overlays in the view. For example, you can prevent labels displaying in the GeoView if you set ViewLabelProperties::labelingEnabled to false.

    This overrides the labelsEnabled properties set on all layers and graphic overlays in the view. The default value of ViewLabelProperties::labelingEnabled is true.

    Note: Prior to Esri.ArcGISRuntime 100.10, this property was in MapView.

    This property was introduced in Esri.ArcGISRuntime 100.10.

    See also ViewLabelProperties.


    Returns true if the view is currently navigating.

    Indicates if the Viewpoint of a GeoView is currently changing. This can be due to a programmatic animated change to the Viewpoint, or user interaction with the view, such as panning and zooming.


    [read-only] objectType : string

    Returns the type name of this object (read-only).


    [since Esri.ArcGISRuntime 100.4] selectionProperties : SelectionProperties

    The selection properties for all graphic overlays and selectable layers within the GeoView.

    You can use SelectionProperties to define the selection color for all graphic overlays and selectable layers within the GeoView. The default selection color is cyan.

    This property was introduced in Esri.ArcGISRuntime 100.4.


    [read-only] spatialReference : SpatialReference

    The spatial reference defines the coordinate system used by the map or scene in the GeoView (read-only).

    The SpatialReference is used to relate map coordinates to locations in the real world. This property is available when the view's map or scene has been loaded.

    The value is null until the Map::loadStatus or Scene::loadStatus is loaded and the drawStatus is complete.


    [default, since Esri.ArcGISRuntime 100.3] timeExtent : TimeExtent

    Returns the time extent of the GeoView.

    The TimeExtent defines how time-enabled data is displayed in the GeoView. Participating layers filter their data to only show data within the time extent set on the GeoView (see TimeAware for details). The range of the time extent includes the start and end values. For example, a feature at 10/24/2016 would be included in a time extent defined as 10/24/2016 - 11/14/2016). Time filtering is not enabled until a non-null time extent is set on the GeoView. When the time extent is null on the GeoView, no time filtering is applied and all content is rendered.

    This property was introduced in Esri.ArcGISRuntime 100.3.


    [read-only, since Esri.ArcGISRuntime 100.1] viewInsets : ViewInsets

    Defines areas along the edges of a GeoView that may be obscured by some other UI elements.

    View insets reduce the size of the area where it is safe to display callouts, attribution text, location display, and other visual elements on the GeoView when some of the GeoView is obscured by overlaid UI elements such as slide-in panels. The anchoring of the GeoView's visual elements is adjusted to account for the overlaid UI elements.

    Units for left, right, top, and bottom are specified in device-independent pixels (DIPs).

    Ex: mapView.viewInsets.left = sidePanel.width

    If you just want to zoom to a geometry and leave a bit of padding around it, use the MapView::setViewpointGeometryAndPadding method instead.

    The viewInsets property currently only applies to MapView, and is ignored on SceneView.

    Grouped propertyTypeDescription
    viewInsets.leftdoubleThe left inset of the view.
    viewInsets.rightdoubleThe right inset of the view.
    viewInsets.topdoubleThe top inset of the view.
    viewInsets.bottomdoubleThe bottom inset of the view.
    viewInsets.emptyboolWhether the insets are set to default values.

    This property was introduced in Esri.ArcGISRuntime 100.1.


    [read-only, since Esri.ArcGISRuntime 100.2.1] widthInPixels : int

    Gets the height of the GeoView (read-only).

    Device independent pixels are returned when high-DPI scaling is enabled for the application. Otherwise, physical pixels are returned.

    This property was introduced in Esri.ArcGISRuntime 100.2.1.


    [read-only] wrapAroundEnabled : bool

    Returns true if continuous panning across the international date line is enabled in the GeoView, false otherwise.

    By default, a GeoView attempts to wrap the Map or Scene across the international date line for a continuous panning user experience. The eastern and western hemispheres wrap to form a continuous map, giving the impression that the map is endless.

    Wraparound display is always enabled for a SceneView. To disable wraparound behavior for a MapView (or to reenable it), you can set the MapView::wrapAroundMode to the appropriate value. Wraparound can only be applied to a MapView if certain conditions are met, as described in WrapAroundModeEnabledWhenSupported.

    If wraparound is enabled, geometries returned from MapView::visibleArea may have coordinates outside the domain of the spatial reference of the map. Before using such geometries to perform spatial queries, address finding, or as feature geometries in a geodatabase, you must normalize them to lie within the spatial reference domain using GeometryEngine::normalizeCentralMeridian.


    Signal Documentation

    [since Esri.ArcGISRuntime 100.3] attributionRectChanged()

    Emitted when the attributionRect property of this GeoView changes.

    Note: The corresponding handler is onAttributionRectChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.3.


    [since Esri.ArcGISRuntime 100.1] attributionTextChanged()

    Emitted when the attributionText property of this GeoView changes.

    Note: The corresponding handler is onAttributionTextChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.1.


    attributionTextVisibleChanged()

    Emitted when the attributionTextVisible property of this GeoView changes.

    Note: The corresponding handler is onAttributionTextVisibleChanged.


    [since Esri.ArcGISRuntime 100.1] attributionTopChanged()

    Emitted when the attributionTop property of this GeoView changes.

    Note: The corresponding handler is onAttributionTopChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.1.


    drawStatusChanged()

    Emitted when the drawStatus property of this GeoView changes.

    Note: The corresponding handler is onDrawStatusChanged.


    errorChanged()

    Emitted when an error occurs. The error property contains the information regarding the error.

    Note: The corresponding handler is onErrorChanged.


    exportImageUrlChanged()

    Emitted when the exportImageUrl property changes.

    Note: The corresponding handler is onExportImageUrlChanged.


    [since Esri.ArcGISRuntime 100.2] heightInPixelsChanged()

    Emitted when the height of the GeoView changes.

    Note: The corresponding handler is onHeightInPixelsChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.2.


    [since Esri.ArcGISRuntime 200.2] hoverEntered(HoverEvent hover)

    Emitted when a mouse hover enters the GeoView.

    Note: The corresponding handler is onHoverEntered.

    This signal was introduced in Esri.ArcGISRuntime 200.2.


    [since Esri.ArcGISRuntime 200.2] hoverLeft(HoverEvent hover)

    Emitted when a mouse hover leaves the GeoView.

    Note: The corresponding handler is onHoverLeft.

    This signal was introduced in Esri.ArcGISRuntime 200.2.


    [since Esri.ArcGISRuntime 200.2] hoverMoved(HoverEvent hover)

    Emitted when a mouse hover moves in the GeoView.

    Note: The corresponding handler is onHoverMoved.

    This signal was introduced in Esri.ArcGISRuntime 200.2.


    identifyGraphicsOverlayStatusChanged()

    Emitted when the identifyGraphicsOverlayStatus property of this GeoView changes.

    Note: The corresponding handler is onIdentifyGraphicsOverlayStatusChanged.


    identifyGraphicsOverlaysStatusChanged()

    Emitted when the identifyGraphicsOverlaysStatus property of this GeoView changes.

    Note: The corresponding handler is onIdentifyGraphicsOverlaysStatusChanged.


    identifyLayerStatusChanged()

    Emitted when the identifyLayerStatus property of this GeoView changes.

    Note: The corresponding handler is onIdentifyLayerStatusChanged.


    identifyLayersStatusChanged()

    Emitted when the identifyLayersStatus property of this GeoView changes.

    Note: The corresponding handler is onIdentifyLayersStatusChanged.


    [since Esri.ArcGISRuntime 100.14] interactionEnabledChanged()

    Emitted when the interactionEnabled property changes.

    Note: The corresponding handler is onInteractionEnabledChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.14.


    keyPressed(KeyEvent key)

    Emitted when a key press is detected on the GeoView.

    • key - The event information.

    Note: The corresponding handler is onKeyPressed.


    keyReleased(KeyEvent key)

    Emitted when a key release is detected on the GeoView.

    • key - The event information.

    Note: The corresponding handler is onKeyReleased.


    [since Esri.ArcGISRuntime 100.10] labelingChanged()

    Emitted when the labeling property changes.

    Note: The corresponding handler is onLabelingChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.10.


    layerViewStateChanged(Layer layer, LayerViewState layerViewState)

    Emitted when a layer has a state change.

    • layer - The layer that had a state change.
    • layerViewState - The state information of the layer.

    Note: The corresponding handler is onLayerViewStateChanged.


    mouseClicked(MouseEvent mouse)

    Emitted when a mouse click or touch is detected on the GeoView.

    This signal will only emit if a mouse press and a mouse release happen in the same relative location. This is useful when performing tasks like an identify, where you want to know if a user clicked or tapped on a particular feature.

    • mouse - The event information.

    Note: mousePressedAndHeld takes precedence. If the press and hold gesture is active, releasing the mouse/finger in the same location will not emit mouseClicked.

    Note: The corresponding handler is onMouseClicked.


    mouseDoubleClicked(MouseEvent mouse)

    Emitted when a mouse double-click is detected on the GeoView.

    This signal will only emit if two click events happen, one after another. In the event of a double click, only the mouseDoubleClicked signal will emit, and the mouseClicked signal will not also emit.

    • mouse - The event information.

    Note: The corresponding handler is onMouseDoubleClicked.


    mousePositionChanged(MouseEvent mouse)

    Emitted when the mouse is moved over the GeoView.

    • mouse - The event information.

    Note: The corresponding handler is onMousePositionChanged.


    mousePressed(MouseEvent mouse)

    Emitted when a mouse press or touch is detected on the GeoView.

    This signal emits as soon as the mouse press or touch happens, and does not first wait for a release. This is useful in determining the screen or GeoView coordinates of where a user first touched the screen, regardless of where they released.

    • mouse - The event information.

    Note: The corresponding handler is onMousePressed.


    mousePressedAndHeld(MouseEvent mouse)

    Emitted when the mouse is pressed and held over the same position.

    • mouse - The event information.

    Note: The corresponding handler is onMousePressedAndHeld.


    mouseReleased(MouseEvent mouse)

    Emitted when the mouse or touch event is released on the GeoView.

    This signal is useful in determining the screen or GeoView coordinates of where a user released the mouse on the screen.

    • mouse - The event information.

    Note: The corresponding handler is onMouseReleased.


    mouseWheelChanged(WheelEvent wheel)

    Emitted when a mouse wheel event is detected on the GeoView.

    • wheel - The event information.

    Note: The corresponding handler is onMouseWheelChanged.


    Emitted when navigation has started or completed.

    Note: The corresponding handler is onNavigatingChanged.


    [since Esri.ArcGISRuntime 100.4] selectionPropertiesChanged()

    Emitted when the selectionProperties property changes.

    Note: The corresponding handler is onSelectionPropertiesChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.4.


    [since Esri.ArcGISRuntime 100.3] setBookmarkCompleted(bool succeeded)

    Emitted when the setBookmark function has finished.

    • succeeded - Whether the bookmark was successfully set.

    Note: The corresponding handler is onSetBookmarkCompleted.

    This signal was introduced in Esri.ArcGISRuntime 100.3.


    setViewpointCompleted(bool succeeded)

    Emitted when any of the setViewpoint functions have finished.

    • succeeded - Whether the viewpoint was successfully set.

    Note: The corresponding handler is onSetViewpointCompleted.


    spatialReferenceChanged()

    Emitted when the spatialReference property of this GeoView changes.

    Note: The corresponding handler is onSpatialReferenceChanged.


    [since Esri.ArcGISRuntime 100.3] timeExtentChanged()

    Emitted when the time extent of the GeoView changes.

    Note: The corresponding handler is onTimeExtentChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.3.


    viewpointChanged()

    Emitted when the current viewpoint of this GeoView changes.

    Note: The corresponding handler is onViewpointChanged.


    [since Esri.ArcGISRuntime 100.2] widthInPixelsChanged()

    Emitted when the width of the GeoView changes.

    Note: The corresponding handler is onWidthInPixelsChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.2.


    [since Esri.ArcGISRuntime 100.4] wrapAroundEnabledChanged()

    Emitted when the wrapAroundEnabled property changes.

    Note: The corresponding handler is onWrapAroundEnabledChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.4.


    Method Documentation

    bool cancelTask(string taskId)

    Cancel the task with the ID taskId.

    Returns false if the task cannot be canceled or there is no task with the specified id taskId.

    See also Cancelable.


    string exportImage(url fileUrl)

    Exports an image snapshot of the current Geoview to a QImage.

    The exported image contains the currently visible content of the MapView or SceneView. Elements drawn on top of the GeoView, such as callouts or popups, are not exported. You can check GeoView::drawStatus to confirm that drawing is complete before calling this method.

    • fileUrl - The URL to a location on disk to save the exported image (optional).

    You can choose not to specify a fileUrl which will force a Qt Quick image provider URL to be created for the exported image. This can be useful when displaying the exported image in a Qt Quick Image component.

    Returns a task ID that can be used to cancel the exportImage task.

    See also Cancelable.


    string identifyGraphicsOverlay(GraphicsOverlay graphicsOverlay, double screenX, double screenY, double tolerance, bool returnPopupsOnly)

    Identify the topmost graphic in the specified GraphicsOverlay at the specified screen coordinates.

    Because locations from user gestures are not always accurate to the exact pixel, you can define a tolerance for the identify operation. The tolerance parameter sets the radius of a circle, centered at the specified coordinates, in device-independent pixels (DIP). If the tolerance value is 0, identify performs the test at the specified coordinates.

    If it is greater than 0, identify tests inside the circle. For touch displays a value of 22 is recommended to cover an average finger tap. The maximum allowed value is 100 DIPs.

    The returnPopupsOnly parameter controls which properties are populated in the IdentifyGraphicsOverlayResult instance. If true, only IdentifyGraphicsOverlayResult::popups is populated. If the overlay does not have popups an error is returned. If false, both IdentifyGraphicsOverlayResult::graphics and IdentifyGraphicsOverlayResult::popups are populated, if the overlay has popups.

    • graphicsOverlay - The GraphicsOverlay in which to identify graphics.
    • screenX - The screen's x-coordinate at which to identify graphics.
    • screenY - The screen's y-coordinate at which to identify graphics.
    • tolerance - A radius in device-independent pixels (DIP) that specifies how precise the identify operation should be.
    • returnPopupsOnly - True includes only a popup in the identify result. False includes both a graphic and a popup in the result.

    This method will return the topmost visible graphic only.

    Returns a string representing the task ID for the asynchronous task. The identifyGraphicsOverlayStatusChanged signal will emit once complete, giving access to a list of Graphics.


    string identifyGraphicsOverlayWithMaxResults(GraphicsOverlay graphicsOverlay, double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResults)

    Identify which graphics in the specified GraphicsOverlay appear at the specified screen coordinates.

    As locations from user gestures are not always accurate to the exact pixel, you can define a tolerance for the identify operation. The tolerance parameter sets the radius of a circle, centered at the specified coordinates, in device-independent pixels (DIP). If the tolerance value is 0, identify performs the test at the specified coordinates. If it is greater than 0, identify tests inside the circle. For touch displays a value of 22 is recommended to cover an average finger tap. The maximum allowed value is 100 DIPs. The returnPopupsOnly parameter controls which properties are populated in the IdentifyGraphicsOverlayResult instance. If true, only IdentifyGraphicsOverlayResult::popups is populated. If the overlay does not have popups an error is returned. If false, both IdentifyGraphicsOverlayResult::graphics and IdentifyGraphicsOverlayResult::popups are populated, if the overlay has popups.

    • graphicsOverlay - The GraphicsOverlay in which to identify graphics.
    • screenX - The screen's x-coordinate at which to identify graphics.
    • screenY - The screen's y-coordinate at which to identify graphics.
    • tolerance - A radius in device-independent pixels (DIP) that specifies how precise the identify operation should be.
    • returnPopupsOnly - True includes only popups in the identify results. False includes both graphics and popups in the results.
    • maximumResults - The maximum number of graphics and/or popups returned in the IdentifyGraphicsOverlayResult. A value of -1 indicates unlimited results.

    Returns a string representing the task ID for the asynchronous task. The identifyGraphicsOverlayStatusChanged signal will emit once complete, giving access to a list of Graphics.

    Example:

    Identify graphics in a MapView:

    // Signal handler for mouse click event on the map view
    onMouseClicked: mouse => {
        const tolerance = 22;
        const returnPopupsOnly = false;
        const maximumResults = 1000;
        mapView.identifyGraphicsOverlayWithMaxResults(graphicsOverlay, mouse.x, mouse.y, tolerance, returnPopupsOnly, maximumResults);
    }
    
    // Signal handler for identify graphics overlay
    onIdentifyGraphicsOverlayStatusChanged: {
        if (identifyGraphicsOverlayStatus === Enums.TaskStatusCompleted) {
            if (identifyGraphicsOverlayResult.graphics.length > 0) {
                msgDialog.open();
            }
        } else if (identifyGraphicsOverlayStatus === Enums.TaskStatusErrored) {
            console.log("error");
        }
    }

    string identifyGraphicsOverlays(double screenX, double screenY, double tolerance, bool returnPopupsOnly)

    Identify the topmost graphics in all the graphics overlays at the specified screen coordinates.

    As locations from user gestures are not always accurate to the exact pixel, you can define a tolerance for the identify operation. The tolerance parameter sets the radius of a circle, centered at the specified coordinates, in device-independent pixels (DIP). If the tolerance value is 0, identify performs the test at the specified coordinates. If it is greater than 0, identify tests inside the circle. For touch displays a value of 22 is recommended to cover an average finger tap. The maximum allowed value is 100 DIPs.

    The returnPopupsOnly parameter controls which properties are populated in the IdentifyGraphicsOverlayResult instance. If returnPopupsOnly is true, IdentifyGraphicsOverlayResult::popups is populated. If the overlay does not have popups an error is returned. If returnPopupsOnly is false, IdentifyGraphicsOverlayResult::graphics and IdentifyGraphicsOverlayResult::popups is populated, if the overlay has popups.

    • screenX - The screen's x-coordinate at which to identify graphics.
    • screenY - The screen's y-coordinate at which to identify graphics.
    • tolerance - A radius in device-independent pixels (DIP) that specifies how precise the identify operation should be.
    • returnPopupsOnly - True includes only popups in the identify results. False includes both graphics and popups in the results.

    This method will return the topmost visible graphic per overlay.

    Returns a string representing the task ID for the asynchronous task. The identifyGraphicsOverlaysStatusChanged signal will emit once complete, giving access to a list of IdentifyGraphicsOverlayResult.


    string identifyGraphicsOverlaysWithMaxResults(double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResultsPerOverlay)

    Identifies a limited number of graphics in all graphics overlays, at the specified screen coordinates.

    As locations from user gestures are not always accurate to the exact pixel, you can define a tolerance for the identify operation. The tolerance parameter sets the radius of a circle, centered at the specified coordinates, in device-independent pixels (DIP). If the tolerance value is 0, identify performs the test at the specified coordinates. If it is greater than 0, identify tests inside the circle. For touch displays a value of 22 is recommended to cover an average finger tap. The maximum allowed value is 100 DIPs.

    The returnPopupsOnly parameter controls which properties are populated in the IdentifyGraphicsOverlayResult instance. If true, only IdentifyGraphicsOverlayResult::popups is populated. If the overlay does not have popups an error is returned. If false, both IdentifyGraphicsOverlayResult::graphics and IdentifyGraphicsOverlayResult::popups are populated, if the overlay has popups. Results are returned in a top-to-bottom order.

    • screenX - The screen's x-coordinate at which to identify graphics.
    • screenY - The screen's y-coordinate at which to identify graphics.
    • tolerance - A radius in device-independent pixels (DIP) that specifies how precise the identify operation should be.
    • returnPopupsOnly - True includes only popups in the identify results. False includes both graphics and popups in the results.
    • maximumResultsPerOverlay - The maximum number of graphics that should be returned as the result.

    Returns a string representing the task ID for the asynchronous task. The identifyGraphicsOverlaysStatusChanged signal will emit once complete, giving access to a list of IdentifyGraphicsOverlayResult.


    string identifyLayer(Layer layer, double screenX, double screenY, double tolerance, bool returnPopupsOnly)

    Identify the topmost GeoElement in the specified layer at the specified screen coordinates.

    As locations from user gestures are not always accurate to the exact pixel, you can define a tolerance for the identify operation. The tolerance parameter sets the radius of a circle, centered at the specified coordinates, in device-independent pixels (DIP). If the tolerance value is 0, identify performs the test at the specified coordinates. If it is greater than 0, identify tests inside the circle. For touch displays a value of 22 is recommended to cover an average finger tap. The maximum allowed value is 100 DIPs.

    The result is returned in a single IdentifyLayerResult instance. If the returnPopupsOnly parameter is true only IdentifyLayerResult::popups is populated. If the layer does not have popups an error is returned. If the returnPopupsOnly parameter is false, both IdentifyLayerResult::geoElements and IdentifyLayerResult::popups are populated, if the layer has popups.

    • layer - The Layer in which to identify GeoElements.
    • screenX - The screen's x-coordinate at which to identify graphics.
    • screenY - The screen's y-coordinate at which to identify graphics.
    • tolerance - A radius in device-independent pixels (DIP) that specifies how precise the identify operation should be.
    • returnPopupsOnly - True includes only popups in the identify results. False includes both graphics and popups in the results.

    This method will return the topmost visible GeoElement only.

    Returns a string representing the task ID for the asynchronous task. The identifyLayerStatusChanged signal will emit once complete, giving access to a IdentifyLayerResult object.


    string identifyLayerWithMaxResults(Layer layer, double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResults)

    Identifies a limited number of geoelements in the specified layer or sublayer, at the given screen point.

    As locations from user gestures are not always accurate to the exact pixel, you can define a tolerance for the identify operation. The tolerance parameter sets the radius of a circle, centered at the specified coordinates, in device-independent pixels (DIP). If the tolerance value is 0, identify performs the test at the specified coordinates. If it is greater than 0, identify tests inside the circle. For touch displays a value of 22 is recommended to cover an average finger tap. The maximum allowed value is 100 DIPs.

    The result is returned in a single IdentifyLayerResult instance. If the returnPopupsOnly parameter is true only IdentifyLayerResult::popups is populated. If the layer does not have popups an error is returned. If the returnPopupsOnly parameter is false, both IdentifyLayerResult::geoElements and IdentifyLayerResult::popups are populated, if the layer has popups. IdentifyLayerResult::geoElements and IdentifyLayerResult::popups provide the results in a top-to-bottom order.

    • layer - The Layer in which to identify GeoElements.
    • screenX - The screen's x-coordinate at which to identify graphics.
    • screenY - The screen's y-coordinate at which to identify graphics.
    • tolerance - A radius in device-independent pixels (DIP) that specifies how precise the identify operation should be.
    • returnPopupsOnly - True includes only popups in the identify results. False includes both graphics and popups in the results.
    • maximumResults - The maximum number of GeoElements that should be returned as the result.

    Returns a string representing the task ID for the asynchronous task. The identifyLayerStatusChanged signal will emit once complete, giving access to a IdentifyLayerResult object.

    Example:

    Identify and select features in a FeatureLayer:

    onMouseClicked: mouse => {
        const tolerance = 22;
        const returnPopupsOnly = false;
        const maximumResults = 1000;
        mapView.identifyLayerWithMaxResults(featureLayer, mouse.x, mouse.y, tolerance, returnPopupsOnly, maximumResults);
    }
    
    onIdentifyLayerStatusChanged: {
        // When MapView.identifyLayerWithMaxResults completes,
        // it will populate the MapView.identifyLayerResult property
        // with an IdentifyLayerResult object that we can utilize
    
        if (identifyLayerStatus === Enums.TaskStatusCompleted) {
            // clear any previous selections
            featureLayer.clearSelection();
    
            // create an array to store the features
            const identifiedObjects = [];
            for (let i = 0; i < identifyLayerResult.geoElements.length; i++){
                const elem = identifyLayerResult.geoElements[i];
                identifiedObjects.push(elem);
            }
            // cache the number of identifyLayerResult
            const count = identifyLayerResult.geoElements.length;
    
            // select the features in the feature layer
            featureLayer.selectFeatures(identifiedObjects);
            displayText = "%1 %2 selected.".arg(count).arg(count > 1 ? "features" : "feature");
        }
    }

    string identifyLayers(double screenX, double screenY, double tolerance, bool returnPopupsOnly)

    Identifies the topmost geoelements at the given screen point, in each identifiable layer or sublayer in the geoview's Map or Scene.

    As locations from user gestures are not always accurate to the exact pixel, you can define a tolerance for the identify operation. The tolerance parameter sets the radius of a circle, centered at the specified coordinates, in device-independent pixels (DIP). If the tolerance value is 0, identify performs the test at the specified coordinates. If it is greater than 0, identify tests inside the circle. For touch displays a value of 22 is recommended to cover an average finger tap. The maximum allowed value is 100 DIPs.

    The result is returned in a collection of IdentifyLayerResult to match the order of the geo view's GeoModel::operationalLayers collection. If the returnPopupsOnly parameter is true, only IdentifyLayerResult::popups is populated. If the layer does not have popups an error is returned. If the returnPopupsOnly parameter is false, both IdentifyLayerResult::geoElements and IdentifyLayerResult::popups are populated, if the layer has popups.

    • screenX - The screen's x-coordinate at which to identify graphics.
    • screenY - The screen's y-coordinate at which to identify graphics.
    • tolerance - A radius in device-independent pixels (DIP) that specifies how precise the identify operation should be.
    • returnPopupsOnly - True includes only popups in the identify results. False includes both graphics and popups in the results.

    This method will return the topmost visible GeoElement per layer only.

    Returns a string representing the task ID for the asynchronous task. The identifyLayersStatusChanged signal will emit once complete, giving access to a list of IdentifyLayerResult.


    string identifyLayersWithMaxResults(double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResultsPerLayer)

    Identify which GeoElements appear at the specified screen coordinates.

    As locations from user gestures are not always accurate to the exact pixel, you can define a tolerance for the identify operation. The tolerance parameter sets the radius of a circle, centered at the specified coordinates, in device-independent pixels (DIP). If the tolerance value is 0, identify performs the test at the specified coordinates. If it is greater than 0, identify tests inside the circle. For touch displays a value of 22 is recommended to cover an average finger tap. The maximum allowed value is 100 DIPs.

    The result is returned in a collection of IdentifyLayerResult to match the order of the geo view's GeoModel::operationalLayers collection. If the returnPopupsOnly parameter is true only IdentifyLayerResult::popups is populated. If the layer does not have popups an error is returned. If the returnPopupsOnly parameter is false, both IdentifyLayerResult::geoElements and IdentifyLayerResult::popups are populated if the layer has popups. IdentifyLayerResult::geoElements and IdentifyLayerResult::popups provide the results in a top-to-bottom order.

    • screenX - The screen's x-coordinate at which to identify graphics.
    • screenY - The screen's y-coordinate at which to identify graphics.
    • tolerance - A radius in device-independent pixels (DIP) that specifies how precise the identify operation should be.
    • returnPopupsOnly - True includes only popups in the identify results. False includes both graphics and popups in the results.
    • maximumResultsPerLayer - The maximum number of GeoElements that should be returned as the result.

    Returns a string representing the task ID for the asynchronous task. The identifyLayersStatusChanged signal will emit once complete, giving access to a list of IdentifyLayerResult.


    LayerViewState layerViewState(Layer layer)

    Returns the layer's state in the GeoView.

    layer - a layer object to get the view state for.


    [since Esri.ArcGISRuntime 100.3] string setBookmark(Bookmark bookmark)

    Asynchronously applies the viewpoint of a bookmark to the GeoView.

    • bookmark - The Bookmark to set.

    Returns a task ID that can be used to cancel the setBookmark task.

    This method was introduced in Esri.ArcGISRuntime 100.3.

    See also Cancelable.


    string setViewpoint(Viewpoint viewpoint)

    Sets the viewpoint.

    • viewpoint - The viewpoint to set.

    Returns a task ID that can be used to cancel the setViewpoint task.

    See also Cancelable.


    string setViewpointAndSeconds(Viewpoint viewpoint, real durationSeconds)

    Sets the viewpoint with an animation duration.

    • viewpoint - The Viewpoint to set.
    • durationSeconds - The time for the animation to set in seconds.

    Returns a task ID that can be used to cancel the setViewpointAndSeconds task.

    See also Cancelable.


    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.