Public Overloads Function AddBookmark( _ ByVal bookmark As CIMBookmark _ ) As Bookmark
public Bookmark AddBookmark( CIMBookmark bookmark )
Parameters
- bookmark
- The definition of the new bookmark.
Return Value
The new bookmark added to the map.
Public Overloads Function AddBookmark( _ ByVal bookmark As CIMBookmark _ ) As Bookmark
public Bookmark AddBookmark( CIMBookmark bookmark )
| Exception | Description |
|---|---|
| System.ArgumentException | Bookmark name must not be null or empty and must be unique for the map. |
| System.ArgumentNullException | Bookmark definition cannot be null. |
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
{
// Note: Needs QueuedTask to run
{
//Set properties for Camera
CIMViewCamera cimCamera = new()
{
X = camera.X,
Y = camera.Y,
Z = camera.Z,
Scale = camera.Scale,
Pitch = camera.Pitch,
Heading = camera.Heading,
Roll = camera.Roll
};
//Create new CIM bookmark and populate its properties
var cimBookmark = new CIMBookmark() { Camera = cimCamera, Name = cameraName, ThumbnailImagePath = "" };
//Add a new bookmark for the active map.
mapView.Map.AddBookmark(cimBookmark);
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)