A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-viewpoint.html below:

Viewpoint Class | ArcGIS Maps SDK for Qt

Defines the visible area of a GeoModel that is displayed in a GeoView on a user's screen. More...

Detailed Description

In a MapView, the bounding extent of a geometry or the map's center point and scale can define the map view's two-dimensional Viewpoint.

In a SceneView, a Camera represents the observer's position and perspective within three dimensions and defines the scene view's three-dimensional Viewpoint. Each camera has the following properties:

When you publish or save a map or scene, as a web map, web scene, mobile map package, or mobile scene package, you define its initial Viewpoint. When you load a map or scene into your app, you can access and change the value of this GeoModel::initialViewpoint. If you add the map or scene to a GeoView, any change you make to the GeoModel::initialViewpoint is ignored. To change the Viewpoint of a displayed map or scene, use view methods such as:

To determine the current visible area, call GeoView::currentViewpoint(Esri::ArcGISRuntime::ViewpointType). Make sure that any user-initiated or programmatic navigation is complete before getting the current Viewpoint by calling GeoView::isNavigating.

Example:

Create a Viewpoint on a MapView based on an extent and zoom to the extent with animation:

constexpr double xMin = -12338668.348591767;
constexpr double yMin = 5546908.424239618;
constexpr double xMax = -12338247.594362013;
constexpr double yMax = 5547223.989911933;
constexpr int wkid = 102100;
Viewpoint vpSpring(Envelope(xMin, yMin, xMax, yMax, SpatialReference(wkid)));
constexpr float duration = 4.0f;
m_mapView->setViewpointAsync(vpSpring, duration, AnimationCurve::EaseInOutCubic);

Note: This class is not default constructible internally, but a default constructor is provided for convenience. If the default constructor is used, the object will be empty. Calling any method on an empty object is undefined behavior and any values returned should not be relied upon.

Relevant samples:

Member Function Documentation Viewpoint::Viewpoint()

Default constructor.

Note: This is provided for convenience and produces an empty object.

See also isEmpty.

Viewpoint::Viewpoint(const Esri::ArcGISRuntime::Geometry &targetExtent)

A constructor that creates a Viewpoint with a bounding extent.

The spatial reference will be that same as the extent.

Viewpoint::Viewpoint(const Esri::ArcGISRuntime::Geometry &targetExtent, const Esri::ArcGISRuntime::Camera &camera)

A constructor that creates a Viewpoint with a bounding extent and Camera.

The spatial reference will be that same as the extent.

Viewpoint::Viewpoint(const Esri::ArcGISRuntime::Geometry &targetExtent, double rotation)

A constructor that creates a Viewpoint with a bounding extent and rotation.

Viewpoint::Viewpoint(const Esri::ArcGISRuntime::Point &center, double scale)

A constructor that creates a Viewpoint with center point and scale.

Viewpoint::Viewpoint(const Esri::ArcGISRuntime::Geometry &targetExtent, double rotation, const Esri::ArcGISRuntime::Camera &camera)

A constructor that creates a Viewpoint with a bounding extent, rotation, and Camera.

Viewpoint::Viewpoint(const Esri::ArcGISRuntime::Point &center, double scale, const Esri::ArcGISRuntime::Camera &camera)

A constructor that creates a Viewpoint with center point, scale, and Camera.

Viewpoint::Viewpoint(const Esri::ArcGISRuntime::Point &center, double scale, double rotation)

A constructor that creates a Viewpoint with center point, scale, and rotation.

Viewpoint::Viewpoint(double latitude, double longitude, double scale)

A constructor that creates a Viewpoint with latitude, longitude, and scale.

The spatial reference for the defined point is WGS84.

Viewpoint::Viewpoint(const Esri::ArcGISRuntime::Point &center, double scale, double rotation, const Esri::ArcGISRuntime::Camera &camera)

A constructor that creates a Viewpoint with center point, scale, rotation, and Camera.

Viewpoint::Viewpoint(double latitude, double longitude, double scale, const Esri::ArcGISRuntime::Camera &camera)

A constructor that creates a Viewpoint using a map center expressed as latitude and longitude, map scale, and camera.

The spatial reference for the defined point is WGS84.

Viewpoint::Viewpoint(const Esri::ArcGISRuntime::Viewpoint &other)

Copy constructor from other Viewpoint.

[noexcept] Viewpoint::Viewpoint(Esri::ArcGISRuntime::Viewpoint &&other)

Move constructor from other Viewpoint.

[override virtual noexcept] Viewpoint::~Viewpoint()

Destructor.

Esri::ArcGISRuntime::Camera Viewpoint::camera() const

Returns the viewpoint's Camera.

[static] Esri::ArcGISRuntime::Viewpoint Viewpoint::fromJson(const QString &json)

Creates a Viewpoint from its JSON string representation.

Returns a Viewpoint created using the data in the json parameter.

See also JsonSerializable.

bool Viewpoint::isEmpty() const

Returns true if this Viewpoint is empty.

double Viewpoint::rotation() const

Gets the viewpoint rotation angle in degrees between 0 and 360.

See also Viewpoint.

Esri::ArcGISRuntime::Geometry Viewpoint::targetGeometry() const

Returns the viewpoint target geometry, if the viewpointType is ViewpointType::BoundingGeometry.

See also Viewpoint and viewpointType.

double Viewpoint::targetScale() const

Returns the viewpoint's target scale, if the viewpointType is ViewpointType::CenterAndScale.

See also Viewpoint.

[override virtual] QString Viewpoint::toJson() const

Reimplements: JsonSerializable::toJson() const.

Returns the Viewpoint as its JSON string representation.

See also JsonSerializable.

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

Returns the viewpoint's type.

This will be defined by a geometry or a Point geometry and scale.

See also Viewpoint.

[since Esri::ArcGISRuntime 200.2] bool Viewpoint::operator!=(const Esri::ArcGISRuntime::Viewpoint &other) const

Inequality operator. Returns true if this object and other are not equal.

This function was introduced in Esri::ArcGISRuntime 200.2.

See also Viewpoint::operator==.

[noexcept] Esri::ArcGISRuntime::Viewpoint &Viewpoint::operator=(Esri::ArcGISRuntime::Viewpoint &&other)

Move operator from other Viewpoint.

Esri::ArcGISRuntime::Viewpoint &Viewpoint::operator=(const Esri::ArcGISRuntime::Viewpoint &other)

Assignment operator from other Viewpoint.

[since Esri::ArcGISRuntime 200.1] bool Viewpoint::operator==(const Esri::ArcGISRuntime::Viewpoint &other) const

Tests and returns true if this object is equal to a second Viewpoint object.

This function was introduced in Esri::ArcGISRuntime 200.1.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4