;

Bookmark Class

  • Bookmark
  • class Esri::ArcGISRuntime::Bookmark

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

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

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    Bookmark(const QString &name, const Esri::ArcGISRuntime::Viewpoint &viewpoint, QObject *parent = nullptr)
    Bookmark(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.

    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(const QString &name, const Esri::ArcGISRuntime::Viewpoint &viewpoint, QObject *parent = nullptr)

    Constructor that takes a name, viewpoint and optional parent.

    Bookmark::Bookmark(QObject *parent = nullptr)

    Default constructor that takes an optional parent.

    [override virtual] 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().

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