Represents a saved location on a Map. More...
|Bookmark(QObject *parent = nullptr)|
|Bookmark(const QString &name, const Viewpoint &viewpoint, QObject *parent = nullptr)|
|Bookmark *||clone(QObject *parent = nullptr) const|
|void||setName(const QString &name)|
|void||setViewpoint(const Viewpoint &viewpoint)|
- 31 public functions inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 1 signal inherited from Esri::ArcGISRuntime::Object
- 2 signals inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
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.
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.
Constructor that takes a name, viewpoint and optional parent.
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().