Skip To Content ArcGIS for Developers Sign In Dashboard

Bookmark Class

(Esri::ArcGISRuntime::Bookmark)

Represents a saved location on a Map. More...

Header: #include <Bookmark>
Since: Esri::ArcGISRuntime 100.0
Inherits: Object

Public Functions

Bookmark(QObject *parent = nullptr)
Bookmark(const QString &name, const Viewpoint &viewpoint, QObject *parent = nullptr)
~Bookmark()
Bookmark *clone(QObject *parent = nullptr) const
QString name() const
void setName(const QString &name)
void setViewpoint(const Viewpoint &viewpoint)
Viewpoint viewpoint() const
  • 31 public functions inherited from QObject

Additional Inherited Members

Detailed Description

Represents a saved location on a Map.

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(Basemap::imagery(this), this);
Envelope esriExtent(-13046614.76, 4036253.06, -13045754.84, 4036767.22, SpatialReference::webMercator());
Viewpoint esriViewpoint(esriExtent);
Bookmark* esriBookmark = new Bookmark("Esri Headquarters", esriViewpoint, this);
map->bookmarks()->append(esriBookmark);

See also BookmarkListModel.

Member Function Documentation

Bookmark::Bookmark(QObject *parent = nullptr)

Default constructor that takes an optional parent.

Bookmark::Bookmark(const QString &name, const Viewpoint &viewpoint, QObject *parent = nullptr)

Constructor that takes a name, viewpoint and optional parent.

Bookmark::~Bookmark()

Destructor.

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 Viewpoint &viewpoint)

Sets the Viewpoint of the bookmark to viewpoint.

See also viewpoint().

Viewpoint Bookmark::viewpoint() const

Gets the Viewpoint of the bookmark.

Returns the Viewpoint of the bookmark.

See also setViewpoint().


Feedback on this topic?