BookmarksViewModel

require(["esri/widgets/Bookmarks/BookmarksViewModel"], function(BookmarksViewModel) { /* code goes here */ });
Class: esri/widgets/Bookmarks/BookmarksViewModel
Inheritance: BookmarksViewModel Accessor
Since: ArcGIS API for JavaScript 4.8

Provides the logic for the Bookmarks widget.

See also:

Constructors

new BookmarksViewModel(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
Bookmark

The Bookmark that is being navigated to.

more details
more detailsBookmarksViewModel
Collection<Bookmark>

A collection of Bookmarks.

more details
more detailsBookmarksViewModel
String

The name of the class.

more details
more detailsAccessor
GoToOverride

This function provides the ability to override either the MapView goTo() or SceneView goTo() methods.

more details
more detailsBookmarksViewModel
String

The view model's state.

more details
more detailsBookmarksViewModel
MapView

The view from which the widget will operate.

more details
more detailsBookmarksViewModel

Property Details

activeBookmarkBookmarkreadonly
Since: ArcGIS API for JavaScript 4.9

The Bookmark that is being navigated to.

bookmarksCollection<Bookmark>readonly

A collection of Bookmarks.

declaredClassStringreadonly inherited
Since: ArcGIS API for JavaScript 4.7

The name of the class. The declared class name is formatted as esri.folder.className.

goToOverrideGoToOverride

This function provides the ability to override either the MapView goTo() or SceneView goTo() methods.

See also:
Example:
// The following snippet uses the Search widget but can be applied to any
// widgets that support the goToOverride property.
search.goToOverride = function(view, goToParams) {
  goToParams.options.duration = updatedDuration;
  return view.goTo(goToParams.target, goToParams.options);
};
stateStringreadonly

The view model's state.

Possible Values: loading | disabled

Default Value:disabled

The view from which the widget will operate.

Method Overview

NameReturn TypeSummaryClass
Promise

Zoom to a specific bookmark.

more details
more detailsBookmarksViewModel

Method Details

goTo(Bookmark){Promise}

Zoom to a specific bookmark.

Parameter:
Bookmark Bookmark

The bookmark to zoom to.

Returns:
TypeDescription
PromiseResolves after the animation to specified bookmark finishes.

API Reference search results

NameTypeModule
Loading...