ArcGIS Pro 3.7 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 Sub RemoveBookmark( _
       ByVal bookmark As Bookmark _
    ) 
    public void RemoveBookmark( 
       Bookmark 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
    {
      // Note: Needs QueuedTask to run
      {
        //Find the first bookmark with the name
        var bookmark = mapView.Map.GetBookmarks().FirstOrDefault(b => b.Name == bookmarkName);
        if (bookmark == null)
        {
          //Bookmark not found
        }
    
        //Remove the bookmark
        mapView.Map.RemoveBookmark(bookmark);
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also