Class: QgsBookmark¶
Represents a spatial bookmark, with a name, CRS and extent.
QgsBookmark objects are typically used alongside the
QgsBookmarkManager class, which handles storage of a set of
bookmarks.
Added in version 3.10.
Methods
Returns the bookmark's spatial extent.  | 
|
Returns the bookmark's group, which is a user-visible string identifying the bookmark's category.  | 
|
Returns the bookmark's unique ID.  | 
|
Returns the bookmark's name, which is a user-visible string identifying the bookmark.  | 
|
Returns the bookmark's map rotation.  | 
|
Sets the bookmark's spatial extent.  | 
|
Sets the bookmark's group, which is a user-visible string identifying the bookmark's category.  | 
|
Sets the bookmark's unique id.  | 
|
Sets the bookmark's name, which is a user-visible string identifying the bookmark.  | 
|
Sets the bookmark's spatial map rotation.  | 
|
Returns a DOM element representing the bookmark's properties.  | 
Static Methods
Creates a bookmark using the properties from a DOM element.  | 
- class qgis.core.QgsBookmark[source]¶
 Bases:
object- __init__()
 Default constructor, creates an empty bookmark.
- __init__(a0: QgsBookmark)
 - Parameters:
 a0 (QgsBookmark)
- extent(self) QgsReferencedRectangle[source]¶
 Returns the bookmark’s spatial extent.
See also
- Return type:
 
- static fromXml(element: QDomElement, doc: QDomDocument) QgsBookmark[source]¶
 Creates a bookmark using the properties from a DOM
element.See also
- Parameters:
 element (QDomElement)
doc (QDomDocument)
- Return type:
 
- group(self) str[source]¶
 Returns the bookmark’s group, which is a user-visible string identifying the bookmark’s category.
See also
- Return type:
 str
- name(self) str[source]¶
 Returns the bookmark’s name, which is a user-visible string identifying the bookmark.
See also
- Return type:
 str
- rotation(self) float[source]¶
 Returns the bookmark’s map rotation.
See also
Added in version 3.32.
- Return type:
 float
- setExtent(self, extent: QgsReferencedRectangle)[source]¶
 Sets the bookmark’s spatial
extent.See also
- Parameters:
 extent (QgsReferencedRectangle)
- setGroup(self, group: str | None)[source]¶
 Sets the bookmark’s
group, which is a user-visible string identifying the bookmark’s category.See also
- Parameters:
 group (Optional[str])
- setId(self, id: str | None)[source]¶
 Sets the bookmark’s unique
id.See also
- Parameters:
 id (Optional[str])
- setName(self, name: str | None)[source]¶
 Sets the bookmark’s
name, which is a user-visible string identifying the bookmark.See also
- Parameters:
 name (Optional[str])