Parameters
- mapView
- The map view used to create the bookmark.
- name
- The name of the new bookmark.
Return Value
The new bookmark added to the map.
Exception | Description |
---|---|
System.ArgumentException | The MapView must contain this Map and the name of the Bookmark must be unique for the Map. |
System.ArgumentNullException | The MapView cannot be null. |
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
public Task<Bookmark> AddBookmarkAsync(string name) { return QueuedTask.Run(() => { //Get the active map view. var mapView = MapView.Active; if (mapView == null) return null; //Adding a new bookmark using the active view. return mapView.Map.AddBookmark(mapView, name); }); }
Target Platforms: Windows 10, Windows 8.1, Windows 7