This document is archived and information here might be outdated.  Recommended version.


IARMap.ZoomToBookmark Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (PublisherControls)  

IARMap.ZoomToBookmark Method

Zooms the map display to the bookmark.

[Visual Basic .NET]
Public Sub ZoomToBookmark ( _
    ByVal vBookmarkID As Object _
)
[C#]
public void ZoomToBookmark (
    object vBookmarkID
);

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Description

Zooms to the spatial bookmark to make it visible on the display as the new viewing extent, changing the MapScale.

Specify a BookmarkName or a zero-based index to zoom to a spatial bookmark. For example, to zoom to the first spatial bookmark in the collection, pass an index of 0, and to zoom to the last spatial bookmark in the layer collection, pass an index of (BookmarkCount - 1).

Errors Returned

2042 800A07FA: The specified bookmark index or name is invalid 

2115 800A0843: Unable to change scale when extent type is fixed scale.

2116 800A0844: Unable to change extent when extent type is fixed extent.

See Also

IARMap Interface | IARMap.BookmarkCount Property | IARMap.BookmarkName Property | IARMap.CenterAtBookmark Method