UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

89 lines (87 loc) 4.53 kB
import type Viewpoint from "../Viewpoint.js"; import type TimeExtent from "../time/TimeExtent.js"; import type SlideThumbnail from "../webdoc/support/SlideThumbnail.js"; import type { IdentifiableMixin, IdentifiableMixinProperties } from "../core/Identifiable.js"; import type { JSONSupport } from "../core/JSONSupport.js"; import type { SlideThumbnailProperties } from "../webdoc/support/SlideThumbnail.js"; import type { TimeExtentProperties } from "../time/TimeExtent.js"; import type { ViewpointProperties } from "../Viewpoint.js"; export interface BookmarkProperties extends IdentifiableMixinProperties, Partial<Pick<Bookmark, "name">> { /** The URL for a thumbnail image. */ thumbnail?: SlideThumbnailProperties | null; /** * The time extent of the bookmark item. * * @since 4.22 * @example * // create a bookmark with a time extent starting December 10, 1996 * // and ending December 25, 1996 * const bookmark = new Bookmark({ * timeExtent: { * start: new Date(1996, 11, 10), * end: new Date(1996, 11, 25) * } * }) */ timeExtent?: TimeExtentProperties | null; /** * The viewpoint of the bookmark item. Defines the rotation, scale, and target geometry of the bookmark. * * Bookmarks can only be [saved to the WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/#save) when their `viewpoint.targetGeometry` is an [Extent](https://developers.arcgis.com/javascript/latest/references/core/geometry/Extent/). * When defined manually on the [Bookmarks](https://developers.arcgis.com/javascript/latest/references/core/widgets/Bookmarks/) widget, the `targetGeometry` can be a [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/), but `scale` must also be defined. * * @since 4.17 */ viewpoint?: ViewpointProperties; } /** * A bookmark is a saved map extent that allows end users to quickly navigate to a particular area of interest * using the [Bookmarks](https://developers.arcgis.com/javascript/latest/references/core/widgets/Bookmarks/) widget. * They are usually defined part of the [WebMap.bookmarks](https://developers.arcgis.com/javascript/latest/references/core/WebMap/#bookmarks). * * @since 4.8 * @see [Bookmarks](https://developers.arcgis.com/javascript/latest/references/core/widgets/Bookmarks/) widget * @see [Bookmarks](https://developers.arcgis.com/web-map-specification/objects/bookmark/) in the Web Map specification */ export default class Bookmark extends BookmarkSuperclass { constructor(properties?: BookmarkProperties); /** The name of the bookmark item. Used as a label in the [Bookmarks](https://developers.arcgis.com/javascript/latest/references/core/widgets/Bookmarks/) widget. */ accessor name: string; /** The URL for a thumbnail image. */ get thumbnail(): SlideThumbnail | null | undefined; set thumbnail(value: SlideThumbnailProperties | null | undefined); /** * The time extent of the bookmark item. * * @since 4.22 * @example * // create a bookmark with a time extent starting December 10, 1996 * // and ending December 25, 1996 * const bookmark = new Bookmark({ * timeExtent: { * start: new Date(1996, 11, 10), * end: new Date(1996, 11, 25) * } * }) */ get timeExtent(): TimeExtent | null | undefined; set timeExtent(value: TimeExtentProperties | null | undefined); /** * The viewpoint of the bookmark item. Defines the rotation, scale, and target geometry of the bookmark. * * Bookmarks can only be [saved to the WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/#save) when their `viewpoint.targetGeometry` is an [Extent](https://developers.arcgis.com/javascript/latest/references/core/geometry/Extent/). * When defined manually on the [Bookmarks](https://developers.arcgis.com/javascript/latest/references/core/widgets/Bookmarks/) widget, the `targetGeometry` can be a [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/), but `scale` must also be defined. * * @since 4.17 */ get viewpoint(): Viewpoint; set viewpoint(value: ViewpointProperties); /** * Creates a deep clone of the Bookmark. * * @returns A deep clone of the [Bookmark](https://developers.arcgis.com/javascript/latest/references/core/webmap/Bookmark/) instance. * @since 4.12 */ clone(): Bookmark; } declare const BookmarkSuperclass: typeof JSONSupport & typeof IdentifiableMixin