@arcgis/map-components
Version:
ArcGIS Map Components
68 lines (64 loc) • 2.61 kB
TypeScript
import type Bookmark from "@arcgis/core/webmap/Bookmark.js";
import type { UserSettings } from "@arcgis/core/views/types.js";
/**
* Specifies the state of the Bookmarks component.
*
* @since 5.0
*/
export type BookmarksState = "loading" | "ready";
/**
* Specifies how bookmarks will be created or modified.
*
* @since 5.0
*/
export type BookmarkOptions = {
/**
* Indicates whether the rotation of the current view will be saved in the [Bookmark#viewpoint](https://developers.arcgis.com/javascript/latest/references/core/webmap/Bookmark/#viewpoint) of a newly created or modified bookmark. Default is `true`.
*
* @since 5.0
*/
captureRotation?: boolean;
/**
* Indicates whether the scale of the current view will be saved in the [Bookmark#viewpoint](https://developers.arcgis.com/javascript/latest/references/core/webmap/Bookmark/#viewpoint) of a newly created or modified bookmark. Default is `true`.
*
* @since 5.0
*/
captureScale?: boolean;
/**
* Indicates whether the time extent of the current view will be saved in the [Bookmark#timeExtent](https://developers.arcgis.com/javascript/latest/references/core/webmap/Bookmark/#timeExtent) of a newly created or modified bookmark. Default is `true`.
*
* @since 5.0
*/
captureTimeExtent?: boolean;
/**
* Indicates whether the viewpoint of the current view will become the [Bookmark#viewpoint](https://developers.arcgis.com/javascript/latest/references/core/webmap/Bookmark/#viewpoint) of a newly created or modified bookmark. Default is `true`.
*
* @since 5.0
*/
captureViewpoint?: boolean;
/**
* An object that specifies the settings of the screenshot that will be used to create the bookmark's
* [Bookmark#thumbnail](https://developers.arcgis.com/javascript/latest/references/core/webmap/Bookmark/#thumbnail).
* The default screenshot size is 128px x 128px.
*
* @since 5.0
*/
screenshotSettings?: Partial<UserSettings>;
/**
* Indicates whether a screenshot is taken when a new bookmark is created.
* The screenshot will be set as the [Bookmark#thumbnail](https://developers.arcgis.com/javascript/latest/references/core/webmap/Bookmark/#thumbnail) in the newly created bookmark. Default is `true`.
*
* @since 5.0
*/
takeScreenshot?: boolean;
};
/** Event object for the `bookmark-edit` event. */
export type BookmarkEditEvent = {
/** The edited bookmark. */
bookmark: Bookmark;
};
/** Event object for the `bookmark-select` event. */
export type BookmarkSelectEvent = {
/** The bookmark selected by the user. */
bookmark: Bookmark;
};