Removes the bookmark from the map. This method must be called on the MCT. Use QueuedTask.Run.
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);
});
}
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.