GeoView Class

  • GeoView
  • class Esri::ArcGISRuntime::GeoView

    A base class for all views that can display geographic content. More...

    Header: #include <GeoView.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherited By:

    Esri::ArcGISRuntime::MapView and Esri::ArcGISRuntime::SceneView

    Public Functions

    virtual ~GeoView()
    QRectF attributionRect() const
    QString attributionText() const
    Esri::ArcGISRuntime::Viewpoint currentViewpoint(Esri::ArcGISRuntime::ViewpointType viewpointType) const
    Esri::ArcGISRuntime::DrawStatus drawStatus() const
    QFuture<QImage> exportImageAsync()
    Esri::ArcGISRuntime::GeoViewType geoViewType() const
    Esri::ArcGISRuntime::GraphicsOverlayListModel *graphicsOverlays() const
    Esri::ArcGISRuntime::Grid *grid() const
    int heightInPixels() const
    QFuture<Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult *> identifyGraphicsOverlayAsync(Esri::ArcGISRuntime::GraphicsOverlay *graphicsOverlay, const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, QObject *parent = nullptr)
    QFuture<Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult *> identifyGraphicsOverlayAsync(Esri::ArcGISRuntime::GraphicsOverlay *graphicsOverlay, const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, int maximumResults, QObject *parent = nullptr)
    QFuture<QList<Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult *>> identifyGraphicsOverlaysAsync(const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, QObject *parent = nullptr)
    QFuture<QList<Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult *>> identifyGraphicsOverlaysAsync(const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, int maximumResultsPerOverlay, QObject *parent = nullptr)
    QFuture<Esri::ArcGISRuntime::IdentifyLayerResult *> identifyLayerAsync(Esri::ArcGISRuntime::Layer *layer, const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, QObject *parent = nullptr)
    QFuture<Esri::ArcGISRuntime::IdentifyLayerResult *> identifyLayerAsync(Esri::ArcGISRuntime::Layer *layer, const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, int maximumResults, QObject *parent = nullptr)
    QFuture<QList<Esri::ArcGISRuntime::IdentifyLayerResult *>> identifyLayersAsync(const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, QObject *parent = nullptr)
    QFuture<QList<Esri::ArcGISRuntime::IdentifyLayerResult *>> identifyLayersAsync(const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, int maximumResultsPerLayer, QObject *parent = nullptr)
    bool interactionEnabled() const
    bool isAttributionTextVisible() const
    bool isNavigating() const
    bool isWrapAroundEnabled() const
    Esri::ArcGISRuntime::ViewLabelProperties labeling() const
    Esri::ArcGISRuntime::LayerViewState layerViewState(Esri::ArcGISRuntime::Layer *layer) const
    Esri::ArcGISRuntime::SelectionProperties selectionProperties() const
    void setAttributionTextVisible(bool visible)
    QFuture<bool> setBookmarkAsync(Esri::ArcGISRuntime::Bookmark *bookmark)
    void setGrid(Esri::ArcGISRuntime::Grid *grid)
    void setInteractionEnabled(bool enabled)
    void setLabeling(const Esri::ArcGISRuntime::ViewLabelProperties &viewLabelProperties)
    void setSelectionProperties(const Esri::ArcGISRuntime::SelectionProperties &selectionProperties)
    void setTimeExtent(const Esri::ArcGISRuntime::TimeExtent &timeExtent)
    void setViewInsets(Esri::ArcGISRuntime::ViewInsets *viewInsets)
    void setViewpointAndWait(const Esri::ArcGISRuntime::Viewpoint &viewpoint)
    QFuture<bool> setViewpointAsync(const Esri::ArcGISRuntime::Viewpoint &viewpoint)
    QFuture<bool> setViewpointAsync(const Esri::ArcGISRuntime::Viewpoint &viewpoint, float durationSeconds)
    Esri::ArcGISRuntime::SpatialReference spatialReference() const
    Esri::ArcGISRuntime::TimeExtent timeExtent() const
    Esri::ArcGISRuntime::ViewInsets *viewInsets() const
    int widthInPixels() const

    Protected Functions

    virtual void attributionRectChangedEvent()
    virtual void attributionTextChangedEvent()
    virtual void drawRequestedEvent() = 0
    virtual void drawStatusChangedEvent(Esri::ArcGISRuntime::DrawStatus drawStatus)
    virtual void errorOccurredEvent(const Esri::ArcGISRuntime::Error &error)
    virtual void geoViewHoverEnterEvent(QHoverEvent &event)
    virtual void geoViewHoverLeaveEvent(QHoverEvent &event)
    virtual void geoViewHoverMoveEvent(QHoverEvent &event)
    virtual void geoViewKeyPressEvent(QKeyEvent &event)
    virtual void geoViewKeyReleaseEvent(QKeyEvent &event)
    virtual void geoViewMouseClickEvent(QMouseEvent &event)
    virtual void geoViewMouseDoubleClickEvent(QMouseEvent &event)
    virtual void geoViewMouseMoveEvent(QMouseEvent &event)
    virtual void geoViewMousePressAndHoldEvent(QMouseEvent &event)
    virtual void geoViewMousePressEvent(QMouseEvent &event)
    virtual void geoViewMouseReleaseEvent(QMouseEvent &event)
    virtual void geoViewMouseWheelEvent(QWheelEvent &event)
    virtual void geoViewRectChangedEvent(QRectF rect)
    virtual void geoViewTouchEvent(QTouchEvent &event)
    void handleScreenChanged(QScreen *screen)
    virtual void layerViewStateChangedEvent(Esri::ArcGISRuntime::Layer *layer, const Esri::ArcGISRuntime::LayerViewState &layerViewState)
    virtual void navigatingChangedEvent()
    void pauseAndRecycleResources()
    void pauseAndSaveResources()
    virtual QObject *qObjectPointer() const = 0
    void resizeView(int width, int height)
    void resume()
    void sendGeoViewHoverEnterEvent(QHoverEvent *event, bool accepted)
    void sendGeoViewHoverLeaveEvent(QHoverEvent *event, bool accepted)
    void sendGeoViewHoverMoveEvent(QHoverEvent *event, bool accepted)
    void sendGeoViewKeyPressEvent(QKeyEvent *event, bool accepted)
    void sendGeoViewKeyReleaseEvent(QKeyEvent *event, bool accepted)
    void sendGeoViewMouseDoubleClickEvent(QMouseEvent *event, bool accepted)
    void sendGeoViewMouseMoveEvent(QMouseEvent *event, bool accepted)
    void sendGeoViewMousePressEvent(QMouseEvent *event, bool accepted)
    void sendGeoViewMouseReleaseEvent(QMouseEvent *event, bool accepted)
    void sendGeoViewMouseWheelEvent(QWheelEvent *event, bool accepted)
    void sendGeoViewRectChangedEvent(QRectF rect)
    bool sendGeoViewTouchEvent(QTouchEvent *event, bool accepted)
    virtual void spatialReferenceChangedEvent()
    virtual void timeExtentChangedEvent()
    virtual void viewpointChangedEvent()

    Detailed Description

    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 (Map) or a scene (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.

    Relevant samples:

    See also Map, MapView, MapGraphicsView, MapQuickView, Scene, SceneView, SceneGraphicsView, and SceneQuickView.

    Member Function Documentation

    [virtual] GeoView::~GeoView()

    Destructor.

    [since Esri::ArcGISRuntime 100.1] QRectF GeoView::attributionRect() const

    Gets bounding rectangle of the attribution text.

    This bounding rectangle can be used when calculating where items can be displayed on the screen so they are not overlapping the attribution text.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [virtual protected, since Esri::ArcGISRuntime 100.1] void GeoView::attributionRectChangedEvent()

    Override this method to perform custom logic when the attribution bounding rectangle changes.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [since Esri::ArcGISRuntime 100.1] QString GeoView::attributionText() const

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

    Attribution text includes data providers or sources for layers and copyright text. The full attribution text is concatenated into a single string that is displayed in a banner along the bottom edge of the view.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [virtual protected, since Esri::ArcGISRuntime 100.1] void GeoView::attributionTextChangedEvent()

    Override this method to perform custom logic when the attribution text changes.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    Esri::ArcGISRuntime::Viewpoint GeoView::currentViewpoint(Esri::ArcGISRuntime::ViewpointType viewpointType) const

    Returns the current Viewpoint of the GeoView, based on viewpointType

    Specify viewpointType to request specific Viewpoint attributes to be returned. This takes into account the attribution bar if it is visible. See GeoView::isAttributionTextVisible.

    [pure virtual protected] void GeoView::drawRequestedEvent()

    Reimplement this method in subclasses to redraw or update the view.

    Esri::ArcGISRuntime::DrawStatus GeoView::drawStatus() const

    Returns the current drawing status of the content displayed in the GeoView.

    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 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 (exportImageAsync) when drawing is completed.

    [virtual protected] void GeoView::drawStatusChangedEvent(Esri::ArcGISRuntime::DrawStatus drawStatus)

    Override this method to perform custom logic when the draw status changes.

    • drawStatus - The draw status type.

    [virtual protected] void GeoView::errorOccurredEvent(const Esri::ArcGISRuntime::Error &error)

    Override this method to perform custom logic when an error occurs.

    • error - The error object.

    [since Esri::ArcGISRuntime 200.2] QFuture<QImage> GeoView::exportImageAsync()

    Exports an image snapshot of the current GeoView.

    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 drawStatus to confirm that drawing is complete before calling this method.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [virtual protected, since Esri::ArcGISRuntime 200.2] void GeoView::geoViewHoverEnterEvent(QHoverEvent &event)

    Override this method to perform custom logic when a hover enter occurs on the GeoView.

    • event - The hover enter event.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [virtual protected, since Esri::ArcGISRuntime 200.2] void GeoView::geoViewHoverLeaveEvent(QHoverEvent &event)

    Override this method to perform custom logic when a hover leave occurs on the GeoView.

    • event - The hover leave event.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [virtual protected, since Esri::ArcGISRuntime 200.2] void GeoView::geoViewHoverMoveEvent(QHoverEvent &event)

    Override this method to perform custom logic when a hover move occurs on the GeoView.

    • event - The hover move event.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [virtual protected] void GeoView::geoViewKeyPressEvent(QKeyEvent &event)

    Override this method to perform custom logic when a key press occurs and the GeoView has focus.

    • event - The key press event.

    [virtual protected] void GeoView::geoViewKeyReleaseEvent(QKeyEvent &event)

    Override this method to perform custom logic when a key release occurs and the GeoView has focus.

    • event - The key release event.

    [virtual protected] void GeoView::geoViewMouseClickEvent(QMouseEvent &event)

    Override this method to perform custom logic when a mouse click occurs on the GeoView.

    • event - The mouse click event.

    [virtual protected] void GeoView::geoViewMouseDoubleClickEvent(QMouseEvent &event)

    Override this method to perform custom logic when a mouse double click occurs on the GeoView.

    • event - The mouse double click event.

    [virtual protected] void GeoView::geoViewMouseMoveEvent(QMouseEvent &event)

    Override this method to perform custom logic when a mouse move occurs on the GeoView.

    • event - The mouse move event.

    [virtual protected] void GeoView::geoViewMousePressAndHoldEvent(QMouseEvent &event)

    Override this method to perform custom logic when a mouse press-and-hold occurs on the GeoView.

    • event - The mouse press and hold event.

    [virtual protected] void GeoView::geoViewMousePressEvent(QMouseEvent &event)

    Override this method to perform custom logic when a mouse press occurs on the GeoView.

    • event - The mouse press event.

    [virtual protected] void GeoView::geoViewMouseReleaseEvent(QMouseEvent &event)

    Override this method to perform custom logic when a mouse release occurs on the GeoView.

    • event - The mouse release event.

    [virtual protected] void GeoView::geoViewMouseWheelEvent(QWheelEvent &event)

    Override this method to perform custom logic when a mouse wheel rotation occurs on the GeoView.

    • event - The mouse wheel event.

    [virtual protected] void GeoView::geoViewRectChangedEvent(QRectF rect)

    Override this method to perform custom logic when the GeoView rectangle changes.

    • rect - The new rectangle for the GeoView.

    [virtual protected] void GeoView::geoViewTouchEvent(QTouchEvent &event)

    Override this method to perform custom logic when a touch gesture occurs on the GeoView.

    Esri::ArcGISRuntime::GeoViewType GeoView::geoViewType() const

    Gets the type of GeoView.

    Esri::ArcGISRuntime::GraphicsOverlayListModel *GeoView::graphicsOverlays() const

    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 identifyGraphicsOverlaysAsync(const QPointF&, double, bool, QObject*), to identify graphics in this collection.

    Esri::ArcGISRuntime::Grid *GeoView::grid() const

    Gets the coordinate system grid to display on top of the GeoView.

    The Grid is a collection of horizontal and vertical lines which can be rendered over the top of a GeoView to help show the location of the current Viewpoint. Supported grids include Military Grid Reference System (MGRSGrid), United States National Grid (USNGGrid), Universal Transverse Mercator (UTMGrid), and a grid of latitude and longitude lines (LatitudeLongitudeGrid). You can configure these grids by toggling their visibility and modifying their default layout and appearance. A grid will not display in the GeoView until a MapView::map or SceneView::arcGISScene has been loaded.

    The default value is nullptr.

    See also setGrid().

    [protected, since Esri::ArcGISRuntime 100.2] void GeoView::handleScreenChanged(QScreen *screen)

    Updates the GeoView to handle the resolution of the new screen.

    Call this method when your application moves from one screen to another - for example when the window is dragged between monitors.

    For example, you could connect to the {QWindow::screenChanged}{screenChanged} signal of your app's window and pass the new QScreen object to handleScreenChanged.

    This function was introduced in Esri::ArcGISRuntime 100.2.

    [since Esri::ArcGISRuntime 100.2.1] int GeoView::heightInPixels() const

    Gets the height of the GeoView.

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

    This function was introduced in Esri::ArcGISRuntime 100.2.1.

    [since Esri::ArcGISRuntime 200.2] QFuture<Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult *> GeoView::identifyGraphicsOverlayAsync(Esri::ArcGISRuntime::GraphicsOverlay *graphicsOverlay, const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, QObject *parent = nullptr)

    Identifies the topmost graphic in the specified graphics overlay, at the given screen point.

    • graphicsOverlay - The graphics overlay in which to identify the graphic.
    • screenPoint - The screen coordinates to identify the graphic.
    • 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 geolelement and a popup in the result.
    • parent - The optional parent QObject

    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 are populated, if the overlay has popups.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 200.2] QFuture<Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult *> GeoView::identifyGraphicsOverlayAsync(Esri::ArcGISRuntime::GraphicsOverlay *graphicsOverlay, const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, int maximumResults, QObject *parent = nullptr)

    Identifies a limited number of graphics in the specified graphics overlay, at the given screen point.

    • graphicsOverlay - The graphics overlay in which to identify the graphics.
    • screenPoint - The screen coordinates to identify the 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 geoelements 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.
    • parent - The optional parent QObject

    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.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 200.2] QFuture<QList<Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult *>> GeoView::identifyGraphicsOverlaysAsync(const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, QObject *parent = nullptr)

    Identifies the topmost graphic in each graphics overlay, at the given screen point.

    • screenPoint - The screen coordinates to identify the 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 geoelements and popups in the results.
    • parent - The optional parent QObject

    Results are returned in the same order as the graphic overlays in the graphicsOverlays collection.

    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.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 200.2] QFuture<QList<Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult *>> GeoView::identifyGraphicsOverlaysAsync(const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, int maximumResultsPerOverlay, QObject *parent = nullptr)

    Identifies a limited number of graphics in all graphics overlays, at the given screen point.

    • screenPoint - The screen coordinates to identify the 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 geoelements and popups in the results.
    • maximumResultsPerOverlay - The maximum number of graphics and/or popups returned in the IdentifyGraphicsOverlayResult per graphics overlay. A value of -1 indicates unlimited results.
    • parent - The optional parent QObject

    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.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 200.2] QFuture<Esri::ArcGISRuntime::IdentifyLayerResult *> GeoView::identifyLayerAsync(Esri::ArcGISRuntime::Layer *layer, const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, QObject *parent = nullptr)

    Identifies the topmost geoelement in the specified layer or sublayer, at the given screen point.

    • layer - The layer in which to identify the geoelements.
    • screenPoint - The screen coordinates to identify the geoelements.
    • 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 results. false includes both a geoelement and a popup in the results.
    • parent - The optional parent QObject

    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.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 200.2] QFuture<Esri::ArcGISRuntime::IdentifyLayerResult *> GeoView::identifyLayerAsync(Esri::ArcGISRuntime::Layer *layer, const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, int maximumResults, QObject *parent = nullptr)

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

    • layer - The layer in which to identify the geoelements.
    • screenPoint - The screen coordinates to identify the geoelements.
    • 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 geoelements and popups in the results.
    • maximumResults - The maximum number of geoelements and/or popups returned in the IdentifyLayerResult. A value of -1 indicates unlimited results.
    • parent - The optional parent QObject

    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.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 200.2] QFuture<QList<Esri::ArcGISRuntime::IdentifyLayerResult *>> GeoView::identifyLayersAsync(const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, QObject *parent = nullptr)

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

    • screenPoint - The screen coordinates to identify the geoelements.
    • 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 geoelements and popups in the results.
    • parent - The optional parent QObject

    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 GeoView's Map::operationalLayers or Scene::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.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 200.2] QFuture<QList<Esri::ArcGISRuntime::IdentifyLayerResult *>> GeoView::identifyLayersAsync(const QPointF &screenPoint, double tolerance, bool returnPopupsOnly, int maximumResultsPerLayer, QObject *parent = nullptr)

    Identifies a limited number of geoelements at the given screen point, in each identifiable layer or sublayer in the GeoView's Map or Scene.

    • screenPoint - The screen coordinates to identify the geoelements.
    • 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. An error is returned if the layer does not have popups. false includes both geoelements and popups in the identify results.
    • maximumResultsPerLayer - The maximum number of geoelements and/or popups returned in the IdentifyLayerResult per layer or sublayer. A value of -1 indicates unlimited results.
    • parent - The optional parent QObject

    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 GeoView's Map::operationalLayers or Scene::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. This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 100.14] bool GeoView::interactionEnabled() const

    Returns 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.

    User interaction is enabled by default.

    This function was introduced in Esri::ArcGISRuntime 100.14.

    See also setInteractionEnabled().

    bool GeoView::isAttributionTextVisible() const

    Gets whether the Esri attribution text is visible.

    Returns true if attribution text is visible in the GeoView, false otherwise.

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

    bool GeoView::isNavigating() const

    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.

    bool GeoView::isWrapAroundEnabled() const

    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 WrapAroundMode::EnabledWhenSupported.

    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(const Esri::ArcGISRuntime::Geometry&).

    [since Esri::ArcGISRuntime 100.10] Esri::ArcGISRuntime::ViewLabelProperties GeoView::labeling() const

    Returns 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::isLabelingEnabled to false. This overrides the labelsEnabled properties set on all layers and graphic overlays in the view. The default value of ViewLabelProperties::isLabelingEnabled is true.

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

    This function was introduced in Esri::ArcGISRuntime 100.10.

    See also setLabeling() and ViewLabelProperties.

    Esri::ArcGISRuntime::LayerViewState GeoView::layerViewState(Esri::ArcGISRuntime::Layer *layer) const

    Retrieves the layer's state in the GeoView.

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

    [virtual protected] void GeoView::layerViewStateChangedEvent(Esri::ArcGISRuntime::Layer *layer, const Esri::ArcGISRuntime::LayerViewState &layerViewState)

    Override this method to perform custom logic when the layer view state changes.

    • layer - The source layer.
    • layerViewState - The current view state of the layer.

    Override this method to perform custom logic when navigating starts or completes.

    [protected] void GeoView::pauseAndRecycleResources()

    Pauses and recycles graphic hardware resources.

    Call this method when the GeoView context is being shutdown and needs to release and free up graphic hardware resources.

    [protected] void GeoView::pauseAndSaveResources()

    Pauses and saves the state of the graphic hardware resources.

    Call this method when you want to stop processing draw cycles on the GeoView, for example, when the application is minimized or placed into the background.

    [pure virtual protected] QObject *GeoView::qObjectPointer() const

    Reimplement this method in subclasses to provide a QObject instance to be the parent of returned objects from certain getters.

    Example:

    QObject* MyMapView::qObjectPointer() const
    {
      return const_cast<MyMapView*>(this);
    }

    [protected] void GeoView::resizeView(int width, int height)

    Resizes the GeoView to the given physical width and physical height.

    See also https://doc.qt.io/qt-6/highdpi.html.

    [protected] void GeoView::resume()

    Resumes the GeoView to continue to process and request draw cycles.

    Call this method to begin processing draw events once the GeoView has obtained a valid context.

    [since Esri::ArcGISRuntime 100.4] Esri::ArcGISRuntime::SelectionProperties GeoView::selectionProperties() const

    Returns 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 function was introduced in Esri::ArcGISRuntime 100.4.

    See also setSelectionProperties().

    [protected, since Esri::ArcGISRuntime 200.2] void GeoView::sendGeoViewHoverEnterEvent(QHoverEvent *event, bool accepted)

    Sends a hover enter event to the GeoView specifying if the event has been accepted.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [protected, since Esri::ArcGISRuntime 200.2] void GeoView::sendGeoViewHoverLeaveEvent(QHoverEvent *event, bool accepted)

    Sends a hover move event to the GeoView specifying if the event has been accepted.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [protected, since Esri::ArcGISRuntime 200.2] void GeoView::sendGeoViewHoverMoveEvent(QHoverEvent *event, bool accepted)

    Sends a hover move event to the GeoView specifying if the event has been accepted.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [protected] void GeoView::sendGeoViewKeyPressEvent(QKeyEvent *event, bool accepted)

    Sends a key press event to the GeoView specifying if the event has been accepted.

    [protected] void GeoView::sendGeoViewKeyReleaseEvent(QKeyEvent *event, bool accepted)

    Sends a key release event to the GeoView specifying if the event has been accepted.

    [protected] void GeoView::sendGeoViewMouseDoubleClickEvent(QMouseEvent *event, bool accepted)

    Sends a mouse double click event to the GeoView specifying if the event has been accepted.

    [protected] void GeoView::sendGeoViewMouseMoveEvent(QMouseEvent *event, bool accepted)

    Sends a mouse move event to the GeoView specifying if the event has been accepted.

    [protected] void GeoView::sendGeoViewMousePressEvent(QMouseEvent *event, bool accepted)

    Sends a mouse press event to the GeoView specifying if the event has been accepted.

    [protected] void GeoView::sendGeoViewMouseReleaseEvent(QMouseEvent *event, bool accepted)

    Sends a mouse release event to the GeoView specifying if the event has been accepted.

    [protected] void GeoView::sendGeoViewMouseWheelEvent(QWheelEvent *event, bool accepted)

    Sends a mouse wheel event to the GeoView specifying if the event has been accepted.

    [protected] void GeoView::sendGeoViewRectChangedEvent(QRectF rect)

    Instructs the GeoView that its rectangle should change to rect.

    [protected] bool GeoView::sendGeoViewTouchEvent(QTouchEvent *event, bool accepted)

    Sends a touch event to the GeoView specifying if the event has been accepted and returns true if accepted.

    void GeoView::setAttributionTextVisible(bool visible)

    Sets the visibility of the Esri attribution text.

    • visible true to set attribution text as visible. 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.

    See also isAttributionTextVisible().

    [since Esri::ArcGISRuntime 200.2] QFuture<bool> GeoView::setBookmarkAsync(Esri::ArcGISRuntime::Bookmark *bookmark)

    Sets the Viewpoint of the GeoView to the Bookmark::viewpoint.

    • bookmark - The bookmark.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    void GeoView::setGrid(Esri::ArcGISRuntime::Grid *grid)

    Sets the grid to grid.

    See also grid.

    [since Esri::ArcGISRuntime 100.14] void GeoView::setInteractionEnabled(bool enabled)

    Enables or disables user interaction with the GeoView.

    enabled - determines if user interaction is enabled

    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.

    This function was introduced in Esri::ArcGISRuntime 100.14.

    See also interactionEnabled().

    [since Esri::ArcGISRuntime 100.10] void GeoView::setLabeling(const Esri::ArcGISRuntime::ViewLabelProperties &viewLabelProperties)

    Sets the labeling to viewLabelProperties.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    See also labeling.

    [since Esri::ArcGISRuntime 100.4] void GeoView::setSelectionProperties(const Esri::ArcGISRuntime::SelectionProperties &selectionProperties)

    Sets the selection properties applied to graphic overlays and layers within the view to selectionProperties.

    The selection properties of the GeoView defines how features are rendered when selected.

    This function was introduced in Esri::ArcGISRuntime 100.4.

    See also selectionProperties().

    [since Esri::ArcGISRuntime 100.3] void GeoView::setTimeExtent(const Esri::ArcGISRuntime::TimeExtent &timeExtent)

    Sets the time extent of the GeoView to timeExtent.

    Defines how participating layers display when the time dimension is added to your map. A participating layer is a layer in your map that contains a fullTimeExtent value and has time filtering enabled (isTimeFilteringEnabled is true). A GeoView time extent supersedes each layer's time extent. For example, if a layer has a larger time extent than the GeoView, not all of the layer's time data will display in the map. If you want all time extents of all participating layers to display, calculate the overarching time extent and add it as the GeoView's time extent. If GeoView's time extent is null, all content in the map is rendered (including non-participating layers).

    The range of the time extent includes the start and end values (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 function was introduced in Esri::ArcGISRuntime 100.3.

    See also timeExtent().

    [since Esri::ArcGISRuntime 100.1] void GeoView::setViewInsets(Esri::ArcGISRuntime::ViewInsets *viewInsets)

    Sets the view insets of the view to viewInsets.

    Currently only applies to MapView, and is ignored on SceneView.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also viewInsets().

    void GeoView::setViewpointAndWait(const Esri::ArcGISRuntime::Viewpoint &viewpoint)

    Sets the viewpoint synchronously. This call runs in the same thread as the caller and will block until it finishes.

    viewpoint - the Viewpoint to set.

    [since Esri::ArcGISRuntime 200.2] QFuture<bool> GeoView::setViewpointAsync(const Esri::ArcGISRuntime::Viewpoint &viewpoint)

    Pan or zoom the GeoView using animation to the specified Viewpoint location, asynchronously.

    • viewpoint - The viewpoint.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 200.2] QFuture<bool> GeoView::setViewpointAsync(const Esri::ArcGISRuntime::Viewpoint &viewpoint, float durationSeconds)

    Pan or zoom the GeoView using animation to the specified Viewpoint location. Animation takes place over the specified duration.

    • viewpoint - The viewpoint.
    • durationSeconds - The amount of time in seconds to move to the new viewpoint.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    Esri::ArcGISRuntime::SpatialReference GeoView::spatialReference() const

    Returns the spatial reference defines the coordinate system used by the map or scene in the GeoView.

    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 empty until the GeoModel::loadStatus is loaded and the drawStatus is complete.

    [virtual protected] void GeoView::spatialReferenceChangedEvent()

    Override this method to perform custom logic when the spatial reference changes.

    [since Esri::ArcGISRuntime 100.3] Esri::ArcGISRuntime::TimeExtent GeoView::timeExtent() const

    Returns the current 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-empty time extent is set on the GeoView. When the time extent is empty on the GeoView, no time filtering is applied and all content is rendered.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    See also setTimeExtent().

    [virtual protected] void GeoView::timeExtentChangedEvent()

    Override this method to perform custom logic when the time extent changes.

    [since Esri::ArcGISRuntime 100.1] Esri::ArcGISRuntime::ViewInsets *GeoView::viewInsets() const

    Returns the view insets of the view.

    View insets define the edges, in device independent pixels (DIPs), where the GeoView may be obscured by some other UI.

    Currently only applies to MapView, and is ignored on SceneView.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also setViewInsets().

    [virtual protected] void GeoView::viewpointChangedEvent()

    Override this method to perform custom logic when the viewpoint changes.

    [since Esri::ArcGISRuntime 100.2.1] int GeoView::widthInPixels() const

    Gets the width of the GeoView.

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

    This function was introduced in Esri::ArcGISRuntime 100.2.1.

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