
public class CIMBookmark : CIMObject, System.ComponentModel.INotifyPropertyChanged, System.Xml.Serialization.IXmlSerializable
Public Class CIMBookmark Inherits CIMObject Implements System.ComponentModel.INotifyPropertyChanged, System.Xml.Serialization.IXmlSerializable
public Task<Bookmark> AddBookmarkFromCameraAsync(Camera camera, string name) { return QueuedTask.Run(() => { //Set properties for Camera CIMViewCamera cimCamera = new CIMViewCamera() { 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 = name, ThumbnailImagePath = "" }; //Get the active map view. var mapView = MapView.Active; if (mapView == null) return null; //Add a new bookmark for the active map. return mapView.Map.AddBookmark(cimBookmark); }); }
public Task UpdateBookmarkExtentAsync(Bookmark bookmark, ArcGIS.Core.Geometry.Envelope envelope) { return QueuedTask.Run(() => { //Get the bookmark's definition var bookmarkDef = bookmark.GetDefinition(); //Modify the bookmark's location bookmarkDef.Location = envelope; //Clear the camera as it is no longer valid. bookmarkDef.Camera = null; //Set the bookmark definition bookmark.SetDefinition(bookmarkDef); }); }
System.Object
ArcGIS.Core.CIM.CIMObject
ArcGIS.Core.CIM.CIMBookmark
Target Platforms: Windows 11, Windows 10