GeoView Class

  • GeoView
  • class Esri::ArcGISRuntime::GeoView

    The base class for working with views in an MVC architecture for Maps and Scenes. More...

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

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

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    virtual ~GeoView()
    QRectF attributionRect() const
    QString attributionText() const
    Esri::ArcGISRuntime::Viewpoint currentViewpoint(Esri::ArcGISRuntime::ViewpointType viewpointType) const
    Esri::ArcGISRuntime::DrawStatus drawStatus() const
    Esri::ArcGISRuntime::TaskWatcher exportImage()
    Esri::ArcGISRuntime::GeoViewType geoViewType() const
    Esri::ArcGISRuntime::GraphicsOverlayListModel *graphicsOverlays() const
    int heightInPixels() const
    Esri::ArcGISRuntime::TaskWatcher identifyGraphicsOverlay(Esri::ArcGISRuntime::GraphicsOverlay *graphicsOverlay, double screenX, double screenY, double tolerance, bool returnPopupsOnly)
    Esri::ArcGISRuntime::TaskWatcher identifyGraphicsOverlay(Esri::ArcGISRuntime::GraphicsOverlay *graphicsOverlay, double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResults)
    Esri::ArcGISRuntime::TaskWatcher identifyGraphicsOverlays(double screenX, double screenY, double tolerance, bool returnPopupsOnly)
    Esri::ArcGISRuntime::TaskWatcher identifyGraphicsOverlays(double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResultsPerOverlay)
    Esri::ArcGISRuntime::TaskWatcher identifyLayer(Esri::ArcGISRuntime::Layer *layer, double screenX, double screenY, double tolerance, bool returnPopupsOnly)
    Esri::ArcGISRuntime::TaskWatcher identifyLayer(Esri::ArcGISRuntime::Layer *layer, double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResults)
    Esri::ArcGISRuntime::TaskWatcher identifyLayers(double screenX, double screenY, double tolerance, bool returnPopupsOnly)
    Esri::ArcGISRuntime::TaskWatcher identifyLayers(double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResultsPerLayer)
    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)
    Esri::ArcGISRuntime::TaskWatcher setBookmark(Esri::ArcGISRuntime::Bookmark *bookmark)
    void setInteractionEnabled(bool enabled)
    void setLabeling(const Esri::ArcGISRuntime::ViewLabelProperties &labeling)
    void setSelectionProperties(const Esri::ArcGISRuntime::SelectionProperties &selectionProperties)
    void setTimeExtent(const Esri::ArcGISRuntime::TimeExtent &timeExtent)
    void setViewInsets(Esri::ArcGISRuntime::ViewInsets *viewInsets)
    Esri::ArcGISRuntime::TaskWatcher setViewpoint(const Esri::ArcGISRuntime::Viewpoint &viewpoint)
    Esri::ArcGISRuntime::TaskWatcher setViewpoint(const Esri::ArcGISRuntime::Viewpoint &viewpoint, float durationSeconds)
    void setViewpointAndWait(const Esri::ArcGISRuntime::Viewpoint &viewpoint)
    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 draw()
    virtual void drawRequestedEvent() = 0
    virtual void drawStatusChangedEvent(Esri::ArcGISRuntime::DrawStatus drawStatus)
    virtual void errorOccurredEvent(const Esri::ArcGISRuntime::Error &error)
    virtual void exportImageCompletedEvent(QUuid taskId, const QImage &image)
    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 identifyGraphicsOverlayCompletedEvent(QUuid taskId, Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult *identifyResult)
    virtual void identifyGraphicsOverlaysCompletedEvent(QUuid taskId, const QList<Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult *> &identifyResults)
    virtual void identifyLayerCompletedEvent(QUuid taskId, Esri::ArcGISRuntime::IdentifyLayerResult *identifyResult)
    virtual void identifyLayersCompletedEvent(QUuid taskId, const QList<Esri::ArcGISRuntime::IdentifyLayerResult *> &identifyResults)
    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 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 setBookmarkCompletedEvent(bool success)
    virtual void setViewpointCompletedEvent(bool success)
    virtual void spatialReferenceChangedEvent()
    virtual void timeExtentChangedEvent()
    virtual void viewpointChangedEvent()

    Detailed Description

    Map and Scene are the models and the GeoView is the view. A GeoView provides a subset of functionality that works with a MapView and a SceneView.

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

    Member Function Documentation

    [virtual] GeoView::~GeoView()

    Destructor.

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

    QString GeoView::attributionText() const

    Gets a concatenated string with attribution text for all layers.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [virtual protected] 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

    Gets the current Viewpoint.

    Specify viewpointType to request specifiy Viewpoint attributes to be returned.

    Returns the current Viewpoint.

    [virtual protected] void GeoView::draw()

    Issues a draw request for the GeoView.

    Call this method each time the viewport needs to be redrawn or updated to reflect the current state of the GeoView.

    See also isReadyToDraw().

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

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

    See also draw.

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

    Gets the current DrawStatus.

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

    Esri::ArcGISRuntime::TaskWatcher GeoView::exportImage()

    Exports the contents of the display to a QImage.

    Returns a TaskWatcher for the asynchronous task.

    [virtual protected] void GeoView::exportImageCompletedEvent(QUuid taskId, const QImage &image)

    Override this method to perform custom logic when an exportImage operation completes.

    • taskId - The task ID of the operation.
    • image - The exported map image.

    [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 graphics overlays as a model.

    [protected] 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.

    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.

    Esri::ArcGISRuntime::TaskWatcher GeoView::identifyGraphicsOverlay(Esri::ArcGISRuntime::GraphicsOverlay *graphicsOverlay, double screenX, double screenY, double tolerance, bool returnPopupsOnly)

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

    • 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 - How precise the identify operation should be. The value is in device independent pixels (DIPs). A value of 0 means that it should be extremely precise - only those graphics appearing at the exact coordinates should be returned. A value of 10 means graphics appearing within a 10 DIP buffer can also be returned.
    • returnPopupsOnly - Whether the identify results should contain only popups.

    This overload will return the topmost visible graphic only.

    signal will emit once complete, giving access to a list of Graphics.

    See also MapQuickView::identifyGraphicsOverlayCompleted, MapGraphicsView::identifyGraphicsOverlayCompleted, SceneQuickView::identifyGraphicsOverlayCompleted, and SceneGraphicsView::identifyGraphicsOverlayCompleted.

    Esri::ArcGISRuntime::TaskWatcher GeoView::identifyGraphicsOverlay(Esri::ArcGISRuntime::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.

    • 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 - How precise the identify operation should be. The value is in device independent pixels (DIPs). A value of 0 means that it should be extremely precise - only those graphics appearing at the exact coordinates should be returned. A value of 10 means graphics appearing within a 10 DIP buffer can also be returned.
    • returnPopupsOnly - Whether the identify results should contain only popups.
    • maximumResults - The maximum number of graphics that should be returned as the result.

    Returns a TaskWatcher for the asynchronous task. For MapQuickView, MapGraphicsView, SceneQuickView, and SceneGraphicsView, the identifyGraphicsOverlayCompleted signal will emit once complete, giving access to a list of Graphics.

    Example:

    Identify graphics in a MapView:

    // connect to the mouse clicked signal on the MapQuickView
    connect(m_mapView, &MapQuickView::mouseClicked, this, [this](QMouseEvent& mouseEvent)
    {
      // call identify on the map view
      constexpr double tolerance = 5.0;
      constexpr bool returnPopupsOnly = false;
      constexpr int maximumResults = 1;
    
      m_mapView->identifyGraphicsOverlay(m_graphicsOverlay, mouseEvent.x(), mouseEvent.y(), tolerance, returnPopupsOnly, maximumResults);
    });
    
    // connect to the identifyLayerCompleted signal on the map view
    connect(m_mapView, &MapQuickView::identifyGraphicsOverlayCompleted, this, [this](QUuid, IdentifyGraphicsOverlayResult* rawIdentifyResult)
    {
      // Delete rawIdentifyResult on leaving scope.
      auto identifyResult = std::unique_ptr<IdentifyGraphicsOverlayResult>(rawIdentifyResult);
    
      if (identifyResult)
      {
        m_identifiedGraphicsCount = identifyResult->graphics().size();
        emit identifiedGraphicsCountChanged();
      }
    });

    See also MapQuickView::identifyGraphicsOverlayCompleted, MapGraphicsView::identifyGraphicsOverlayCompleted, SceneQuickView::identifyGraphicsOverlayCompleted, and SceneGraphicsView::identifyGraphicsOverlayCompleted.

    [virtual protected] void GeoView::identifyGraphicsOverlayCompletedEvent(QUuid taskId, Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult *identifyResult)

    Override this method to perform custom logic when an identifyGraphicsOverlay operation completes.

    • taskId - The task ID of the operation.
    • identifyResult - The identify graphics overlay result object.

    Esri::ArcGISRuntime::TaskWatcher GeoView::identifyGraphicsOverlays(double screenX, double screenY, double tolerance, bool returnPopupsOnly)

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

    • screenX - The screen's x-coordinate at which to identify graphics.
    • screenY - The screen's y-coordinate at which to identify graphics.
    • tolerance - How precise the identify operation should be. The value is in device independent pixels (DIPs). A value of 0 means that it should be extremely precise - only those graphics appearing at the exact coordinates should be returned. A value of 10 means graphics appearing within a 10 DIP buffer can also be returned.
    • returnPopupsOnly - Whether the identify results should contain only popups.

    This overload will return the topmost visible graphic per overlay.

    Returns a TaskWatcher for the asynchronous task. For MapQuickView, MapGraphicsView, SceneQuickView, and SceneGraphicsView, the identifyGraphicsOverlaysCompleted signal will emit once complete, giving access to a list of IdentifyGraphicsOverlayResult.

    See also MapQuickView::identifyGraphicsOverlaysCompleted, MapGraphicsView::identifyGraphicsOverlaysCompleted, SceneQuickView::identifyGraphicsOverlaysCompleted, and SceneGraphicsView::identifyGraphicsOverlaysCompleted.

    Esri::ArcGISRuntime::TaskWatcher GeoView::identifyGraphicsOverlays(double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResultsPerOverlay)

    Identify which graphics in all the graphics overlays appear at the specified screen coordinates.

    • screenX - The screen's x-coordinate at which to identify graphics.
    • screenY - The screen's y-coordinate at which to identify graphics.
    • tolerance - How precise the identify operation should be. The value is in device independent pixels (DIPs). A value of 0 means that it should be extremely precise - only those graphics appearing at the exact coordinates should be returned. A value of 10 means graphics appearing within a 10 DIP buffer can also be returned.
    • returnPopupsOnly - Whether the identify results should contain only popups.
    • maximumResultsPerOverlay - The maximum number of graphics that should be returned as the result.

    Returns a TaskWatcher for the asynchronous task. For MapQuickView, MapGraphicsView, SceneQuickView, and SceneGraphicsView, the identifyGraphicsOverlaysCompleted signal will emit once complete, giving access to a list of IdentifyGraphicsOverlayResult.

    See also MapQuickView::identifyGraphicsOverlaysCompleted, MapGraphicsView::identifyGraphicsOverlaysCompleted, SceneQuickView::identifyGraphicsOverlaysCompleted, and SceneGraphicsView::identifyGraphicsOverlaysCompleted.

    [virtual protected] void GeoView::identifyGraphicsOverlaysCompletedEvent(QUuid taskId, const QList<Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult *> &identifyResults)

    Override this method to perform custom logic when an identifyGraphicsOverlays operation completes.

    • taskId - The task ID of the operation.
    • identifyResults - The list of identify results.

    Esri::ArcGISRuntime::TaskWatcher GeoView::identifyLayer(Esri::ArcGISRuntime::Layer *layer, double screenX, double screenY, double tolerance, bool returnPopupsOnly)

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

    • layer - The Layer in which to identify GeoElements.
    • screenX - The screen's x-coordinate at which to identify GeoElements.
    • screenY - The screen's y-coordinate at which to identify GeoElements.
    • tolerance - How precise the identify operation should be. The value is in device independent pixels (DIPs). A value of 0 means that it should be extremely precise - only those GeoElements appearing at the exact coordinates should be returned. A value of 10 means GeoElements appearing within a 10 DIP buffer can also be returned.
    • returnPopupsOnly - Whether the identify results should contain only popups.

    This overload will return the topmost visible GeoElement only.

    Returns a TaskWatcher for the asynchronous task. For MapQuickView, MapGraphicsView, SceneQuickView, and SceneGraphicsView, the identifyLayerCompleted signal will emit once complete, giving access to an IdentifyLayerResult object.

    See also MapQuickView::identifyLayerCompleted, MapGraphicsView::identifyLayerCompleted, SceneGraphicsView::identifyLayerCompleted, and SceneQuickView::identifyLayerCompleted.

    Esri::ArcGISRuntime::TaskWatcher GeoView::identifyLayer(Esri::ArcGISRuntime::Layer *layer, double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResults)

    Identify which GeoElements in the specified layer appear at the specified screen coordinates.

    • layer - The Layer in which to identify GeoElements.
    • screenX - The screen's x-coordinate at which to identify GeoElements.
    • screenY - The screen's y-coordinate at which to identify GeoElements.
    • tolerance - How precise the identify operation should be. The value is in device independent pixels (DIPs). A value of 0 means that it should be extremely precise - only those GeoElements appearing at the exact coordinates should be returned. A value of 10 means GeoElements appearing within a 10 DIP buffer can also be returned.
    • returnPopupsOnly - Whether the identify results should contain only popups.
    • maximumResults - The maximum number of GeoElements that should be returned as the result.

    Returns a TaskWatcher for the asynchronous task. For MapQuickView and MapGraphicsView, the identifyLayerCompleted signal will emit once complete, giving access to an IdentifyLayerResult object.

    Example:

    Identify and select features in a FeatureLayer:

    // lambda expression for the mouse press event on the mapview... do an identify operation
    connect(m_mapView, &MapQuickView::mouseClicked, this, [this](QMouseEvent& mouseEvent)
    {
      constexpr double tolerance = 22.0;
      constexpr bool returnPopupsOnly = false;
      constexpr int maximumResults = 1000;
      const double screenX = mouseEvent.x();
      const double screenY = mouseEvent.y();
      m_mapView->identifyLayer(m_featureLayer, screenX, screenY, tolerance, returnPopupsOnly, maximumResults);
    });
    
    // once the identify is done
    connect(m_mapView, &MapQuickView::identifyLayerCompleted, this, [this](QUuid, Esri::ArcGISRuntime::IdentifyLayerResult* rawIdentifyResult)
    {
      auto identifyResult = std::unique_ptr<IdentifyLayerResult>(rawIdentifyResult);
    
      if (!identifyResult)
        return;
    
      // clear any existing selection
      m_featureLayer->clearSelection();
    
      // create a list to store the identified elements
      QList<Feature*> identifiedFeatures;
      for (int i = 0; i < identifyResult->geoElements().size(); i++)
      {
        GeoElement* element = identifyResult->geoElements().at(i);
        if (nullptr != element)
        {
          // add the element to the list and take ownership of it.
          Feature* feature = static_cast<Feature*>(element);
          feature->setParent(this);
          identifiedFeatures.append(feature);
        }
      }
    
      // select the identified features
      m_featureLayer->selectFeatures(identifiedFeatures);
      // update the member with the number of selected features
      int count = identifiedFeatures.length();
      m_selectedFeatureText = count > 1 ? QString::number(count) + " features selected." : QString::number(count) + " feature selected.";
      emit selectedFeatureTextChanged();
    });

    See also MapQuickView::identifyLayerCompleted, MapGraphicsView::identifyLayerCompleted, SceneQuickView::identifyLayerCompleted, and SceneGraphicsView::identifyLayerCompleted.

    [virtual protected] void GeoView::identifyLayerCompletedEvent(QUuid taskId, Esri::ArcGISRuntime::IdentifyLayerResult *identifyResult)

    Override this method to perform custom logic when an identifyLayer operation completes.

    • taskId - The task ID of the operation.
    • identifyResult - The identify layer result object.

    Esri::ArcGISRuntime::TaskWatcher GeoView::identifyLayers(double screenX, double screenY, double tolerance, bool returnPopupsOnly)

    Identify the topmost GeoElement in all of the map's layers at the specified screen coordinates.

    • screenX - The screen's x-coordinate at which to identify GeoElements.
    • screenY - The screen's y-coordinate at which to identify GeoElements.
    • tolerance - How precise the identify operation should be. The value is in device independent pixels (DIPs). A value of 0 means that it should be extremely precise - only those GeoElements appearing at the exact coordinates should be returned. A value of 10 means GeoElements appearing within a 10 DIP buffer can also be returned.
    • returnPopupsOnly - Whether the identify results should contain only popups.

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

    Returns a TaskWatcher for the asynchronous task. For MapQuickView, MapGraphicsView, SceneQuickView, and SceneGraphicsView, the identifyLayersCompleted signal will emit once complete, giving access to a list of IdentifyLayerResult.

    See also MapQuickView::identifyLayersCompleted, MapGraphicsView::identifyLayersCompleted, SceneQuickView::identifyLayersCompleted, and SceneGraphicsView::identifyLayersCompleted.

    Esri::ArcGISRuntime::TaskWatcher GeoView::identifyLayers(double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResultsPerLayer)

    Identify which GeoElements in all of the map's layers appear at the specified screen coordinates.

    • screenX - The screen's x-coordinate at which to identify GeoElements.
    • screenY - The screen's y-coordinate at which to identify GeoElements.
    • tolerance - How precise the identify operation should be. The value is in device independent pixels (DIPs). A value of 0 means that it should be extremely precise - only those GeoElements appearing at the exact coordinates should be returned. A value of 10 means GeoElements appearing within a 10 DIP buffer can also be returned.
    • returnPopupsOnly - Whether the identify results should contain only popups.
    • maximumResultsPerLayer - The maximum number of GeoElements that should be returned as the result.

    Returns a TaskWatcher for the asynchronous task. For MapQuickView and MapGraphicsView, the identifyLayersCompleted signal will emit once complete, giving access to a list of IdentifyLayerResult.

    See also MapQuickView::identifyLayersCompleted, MapGraphicsView::identifyLayersCompleted, SceneQuickView::identifyLayersCompleted, and SceneGraphicsView::identifyLayersCompleted.

    [virtual protected] void GeoView::identifyLayersCompletedEvent(QUuid taskId, const QList<Esri::ArcGISRuntime::IdentifyLayerResult *> &identifyResults)

    Override this method to perform custom logic when an identifyLayers operation completes.

    • taskId - The task ID of the operation.
    • identifyResults - The list of identify results.

    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, 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 the Esri 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.

    bool GeoView::isNavigating() const

    Gets whether the GeoView is navigating.

    Returns true if the view is currently navigating.

    bool GeoView::isWrapAroundEnabled() const

    Gets whether wrap around is enabled.

    Returns true if wrap around is enabled.

    Esri::ArcGISRuntime::ViewLabelProperties GeoView::labeling() const

    Returns the view label properties.

    The view label properties are an overall control for whether labels will be created and displayed for layers added to the view. Individual layers can also control whether labels should be displayed for their features. Labels need to be enabled both in the view and in the layer. The labeling for a view is enabled by default. The view label properties also control global aspects of the label appearance, for example, animation effects.

    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

    Gets the LayerViewState for the specified layer.

    [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 width and height.

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

    Esri::ArcGISRuntime::SelectionProperties GeoView::selectionProperties() const

    Returns the selection properties that are applied to graphic overlays and layers within the view.

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

    This function was introduced in Esri::ArcGISRuntime 100.4.

    See also setSelectionProperties().

    [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().

    Esri::ArcGISRuntime::TaskWatcher GeoView::setBookmark(Esri::ArcGISRuntime::Bookmark *bookmark)

    Asynchronously applies the viewpoint of a bookmark to the GeoView.

    bookmark - the Bookmark to set.

    Returns a TaskWatcher for the asynchronous task.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    [virtual protected] void GeoView::setBookmarkCompletedEvent(bool success)

    Override this method to perform custom logic when a setBookmark operation completes.

    • success True if setting the bookmark completed successfully.

    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().

    void GeoView::setLabeling(const Esri::ArcGISRuntime::ViewLabelProperties &labeling)

    Sets the labeling to labeling.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    See also labeling.

    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().

    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().

    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().

    Esri::ArcGISRuntime::TaskWatcher GeoView::setViewpoint(const Esri::ArcGISRuntime::Viewpoint &viewpoint)

    Sets the viewpoint asynchronously.

    • viewpoint - The Viewpoint to set.

    Returns a TaskWatcher for the asynchronous task.

    Esri::ArcGISRuntime::TaskWatcher GeoView::setViewpoint(const Esri::ArcGISRuntime::Viewpoint &viewpoint, float durationSeconds)

    Sets the viewpoint asynchronously.

    • viewpoint - The Viewpoint to set.
    • durationSeconds - The duration of the animation in seconds.

    Returns a TaskWatcher for the asynchronous task.

    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.

    [virtual protected] void GeoView::setViewpointCompletedEvent(bool success)

    Override this method to perform custom logic when a setViewpoint operation completes.

    • success True if setting the viewport completed successfully.

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

    Gets the SpatialReference.

    [virtual protected] void GeoView::spatialReferenceChangedEvent()

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

    Esri::ArcGISRuntime::TimeExtent GeoView::timeExtent() const

    Returns the current time extent of the GeoView.

    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.

    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.

    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.