Bookmark Class

  • Bookmark
  • class Esri::ArcGISRuntime::Bookmark

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

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

    Public Functions

    Bookmark(QObject *parent = nullptr)
    Bookmark(const QString &name, const Esri::ArcGISRuntime::Viewpoint &viewpoint, QObject *parent = nullptr)
    virtual ~Bookmark() override
    Esri::ArcGISRuntime::Bookmark *clone(QObject *parent = nullptr) const
    QString name() const
    void setName(const QString &name)
    void setViewpoint(const Esri::ArcGISRuntime::Viewpoint &viewpoint)
    Esri::ArcGISRuntime::Viewpoint 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.


    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);
    Bookmark* esriBookmark = new Bookmark("Esri Headquarters", esriViewpoint, this);

    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] Bookmark::~Bookmark()


    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().

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.