ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Map Class / RemoveBookmark Method
The bookmark to remove.
Example

In This Topic
    RemoveBookmark Method
    In This Topic
    Removes the bookmark from the map. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void RemoveBookmark( 
       Bookmark bookmark
    )
    Public Sub RemoveBookmark( _
       ByVal bookmark As Bookmark _
    ) 

    Parameters

    bookmark
    The bookmark to remove.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Remove bookmark with a given name
    public Task RemoveBookmarkAsync(Map map, string name)
    {
      return QueuedTask.Run(() =>
      {
        //Find the first bookmark with the name
        var bookmark = map.GetBookmarks().FirstOrDefault(b => b.Name == name);
        if (bookmark == null)
          return;
    
        //Remove the bookmark
        map.RemoveBookmark(bookmark);
      });
    }
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also