GeoView Class

(Esri::ArcGISRuntime::GeoView)

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

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

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

Public Functions

virtual ~GeoView()
QRectF attributionRect() const
QString attributionText() const
Viewpoint currentViewpoint(ViewpointType viewpointType) const
DrawStatus drawStatus() const
TaskWatcher exportImage()
GeoViewType geoViewType() const
GraphicsOverlayListModel *graphicsOverlays() const
int heightInPixels() const
TaskWatcher identifyGraphicsOverlay(GraphicsOverlay *graphicsOverlay, double screenX, double screenY, double tolerance, bool returnPopupsOnly)
TaskWatcher identifyGraphicsOverlay(GraphicsOverlay *graphicsOverlay, double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResults)
TaskWatcher identifyGraphicsOverlays(double screenX, double screenY, double tolerance, bool returnPopupsOnly)
TaskWatcher identifyGraphicsOverlays(double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResultsPerOverlay)
TaskWatcher identifyLayer(Layer *layer, double screenX, double screenY, double tolerance, bool returnPopupsOnly)
TaskWatcher identifyLayer(Layer *layer, double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResults)
TaskWatcher identifyLayers(double screenX, double screenY, double tolerance, bool returnPopupsOnly)
TaskWatcher identifyLayers(double screenX, double screenY, double tolerance, bool returnPopupsOnly, int maximumResultsPerLayer)
bool isAttributionTextVisible() const
bool isNavigating() const
bool isWrapAroundEnabled() const
LayerViewState layerViewState(Layer *layer) const
void setAttributionTextVisible(bool visible)
void setViewInsets(ViewInsets *viewInsets)
TaskWatcher setViewpoint(const Viewpoint &viewpoint)
TaskWatcher setViewpoint(const Viewpoint &viewpoint, float durationSeconds)
void setViewpointAndWait(const Viewpoint &viewpoint)
SpatialReference spatialReference() const
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(Error error)
virtual void exportImageCompletedEvent(QUuid taskId, 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, IdentifyGraphicsOverlayResult *identifyResult)
virtual void identifyGraphicsOverlaysCompletedEvent(QUuid taskId, QList<IdentifyGraphicsOverlayResult *> identifyResults)
virtual void identifyLayerCompletedEvent(QUuid taskId, IdentifyLayerResult *identifyResult)
virtual void identifyLayersCompletedEvent(QUuid taskId, QList<IdentifyLayerResult *> identifyResults)
virtual void layerViewStateChangedEvent(Layer *layer, 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 setViewpointCompletedEvent(bool success)
virtual void spatialReferenceChangedEvent()
virtual void viewpointChangedEvent()

Detailed Description

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

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.

Viewpoint GeoView::currentViewpoint(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 geo view.

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

See also isReadyToDraw().

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

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

See also draw.

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(Error error)

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

  • error - The error object.

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, 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 geo view 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 geo view 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 geo view.

  • 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 geo view.

  • 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 geo view.

  • 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 geo view.

  • 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 geo view.

  • 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 geo view.

  • 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 geo view.

  • event - The mouse wheel event.

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

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

  • rect - The new rectangle for the geo view.

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

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

  • event - The geo view touch event.

GeoViewType GeoView::geoViewType() const

Gets the type of GeoView.

GraphicsOverlayListModel *GeoView::graphicsOverlays() const

Gets the list of graphics overlays as a model.

[protected] void GeoView::handleScreenChanged(QScreen *screen)

Updates the geo view 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 in physical pixels.

This function was introduced in Esri::ArcGISRuntime 100.2.1.

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

TaskWatcher GeoView::identifyGraphicsOverlay(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
  double tolerance = 5.0;
  bool returnPopupsOnly = false;
  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* identifyResult)
{
  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, 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.

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.

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, QList<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.

TaskWatcher GeoView::identifyLayer(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.

TaskWatcher GeoView::identifyLayer(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)
{
  double tolerance = 22.0;
  bool returnPopupsOnly = false;
  int maximumResults = 1000;
  m_mapView->identifyLayer(m_featureLayer, mouseEvent.x(), mouseEvent.y(), tolerance, returnPopupsOnly, maximumResults);
});

// once the identify is done
connect(m_mapView, &MapQuickView::identifyLayerCompleted, this, [this](QUuid, Esri::ArcGISRuntime::IdentifyLayerResult* identifyResult)
{
  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 (static_cast<Feature*>(element))
      // add the element to the list
      identifiedFeatures.append(static_cast<Feature*>(element));
  }

  // 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, 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.

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.

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, QList<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::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.

LayerViewState GeoView::layerViewState(Layer *layer) const

Gets the LayerViewState for the specified layer.

[virtual protected] void GeoView::layerViewStateChangedEvent(Layer *layer, 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 geo view 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 geo view, 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 geo view to the given width and height.

[protected] void GeoView::resume()

Resumes the geo view to continue to process and request draw cycles.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instructs the geo view that its rectangle should change to rect.

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

Sends a touch event to the geo view 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 http://www.esri.com/legal.

See also isAttributionTextVisible().

void GeoView::setViewInsets(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().

TaskWatcher GeoView::setViewpoint(const Viewpoint &viewpoint)

Sets the viewpoint asynchronously.

  • viewpoint - The Viewpoint to set.

Returns a TaskWatcher for the asynchronous task.

TaskWatcher GeoView::setViewpoint(const 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 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.

SpatialReference GeoView::spatialReference() const

Gets the SpatialReference.

[virtual protected] void GeoView::spatialReferenceChangedEvent()

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

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 in physical pixels.

This function was introduced in Esri::ArcGISRuntime 100.2.1.


Feedback on this topic?