Represents a saved location on a Map. More...
Header | #include <Bookmark.h |
Since | Esri |
Inherits | Esri |
Public Functions
Bookmark( | |
Bookmark(const Q | |
virtual | ~ |
Esri | clone( |
Q | name() const |
void | set |
void | set |
Esri | viewpoint() const |
Detailed Description
A Bookmark stores a Viewpoint and other information regarding a specific location on the Map.
Only BoundingGeometry viewpoints types (those declared with a non-Point Geometry) are supported in the Map. CenterAndScale viewpoints (those declared with a Point Geometry) are not supported.
Example:
Create a bookmark of the Esri campus in Redlands, CA, and add it to the map's bookmarks.
Map* map = new Map(BasemapStyle::ArcGISImageryStandard, this); Envelope esriExtent(-13046614.76, 4036253.06, -13045754.84, 4036767.22, SpatialReference::webMercator()); Viewpoint esriViewpoint(esriExtent); auto* esriBookmark = new Bookmark("Esri Headquarters", esriViewpoint, this); map->bookmarks()->append(esriBookmark);
Relevant samples:
- Manage bookmarks: Access and create bookmarks on a map.
See also BookmarkListModel.
Member Function Documentation
[explicit]
Bookmark::Bookmark(QObject *parent = nullptr)
Default constructor that takes an optional parent.
Bookmark::Bookmark(const QString &name, const Esri::ArcGISRuntime::Viewpoint &viewpoint, QObject *parent = nullptr)
Constructor that takes a name, viewpoint and optional parent.
[override virtual noexcept]
Bookmark::~Bookmark ()
Destructor.
Esri::ArcGISRuntime::Bookmark *Bookmark::clone(QObject *parent = nullptr) const
Clones the bookmark to a new instance with an optional parent.
Returns a new instance of the current bookmark.
QString Bookmark::name() const
Gets the name of the bookmark.
Returns the name of the bookmark.
See also setName().
void Bookmark::setName (const QString &name)
Sets the name of the bookmark to name.
See also name().
void Bookmark::setViewpoint (const Esri::ArcGISRuntime::Viewpoint &viewpoint)
Sets the Viewpoint of the bookmark to viewpoint.
See also viewpoint().
Esri::ArcGISRuntime::Viewpoint Bookmark::viewpoint() const
Gets the Viewpoint of the bookmark.
Returns the Viewpoint of the bookmark.
See also setViewpoint().