@arcgis/map-components 5.1.0-next.89 → 5.1.0-next.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{BOMPCJ77.js → 2LNLB4XY.js} +1 -1
- package/dist/cdn/{25LLGDTO.js → 2YB6S64G.js} +1 -1
- package/dist/cdn/3A4SIMPX.js +2 -0
- package/dist/cdn/3N5NYUQ4.js +2 -0
- package/dist/cdn/{K6FLTE5C.js → 3YVU66DR.js} +1 -1
- package/dist/cdn/4GX6K4QV.js +2 -0
- package/dist/cdn/{UMATWIWL.js → 5BKXAZGJ.js} +1 -1
- package/dist/cdn/{6352EDBR.js → 64Q47BWH.js} +1 -1
- package/dist/cdn/{XQ5BV7DL.js → 6BESCJK6.js} +1 -1
- package/dist/cdn/{TUY46VJP.js → 7GN54I5I.js} +1 -1
- package/dist/cdn/A35RPLAM.js +2 -0
- package/dist/cdn/AOKQLNNK.js +2 -0
- package/dist/cdn/{MAVNZR2L.js → BLH76V4B.js} +1 -1
- package/dist/cdn/D4ZQOMOH.js +2 -0
- package/dist/cdn/{ZSG6TJPR.js → FJY5EA2S.js} +1 -1
- package/dist/cdn/{HU4V2LGL.js → GDHU6FB7.js} +1 -1
- package/dist/cdn/{5GEYGYVM.js → GFNS6DWD.js} +1 -1
- package/dist/cdn/{ACT4QKSO.js → GPMDFKYC.js} +1 -1
- package/dist/cdn/{24VXNB37.js → IWGEVWTS.js} +1 -1
- package/dist/cdn/{FDNFARSM.js → JHRFJTE4.js} +1 -1
- package/dist/cdn/{3BUCNQ3Q.js → JWYAOQXS.js} +1 -1
- package/dist/cdn/{HTNECFCQ.js → K2RCQ3S4.js} +1 -1
- package/dist/cdn/{MAILZU6P.js → MAFF3ZL7.js} +1 -1
- package/dist/cdn/{FQY55PPT.js → MVULTZL6.js} +1 -1
- package/dist/cdn/{GCPE7SKR.js → NJP6OBBN.js} +1 -1
- package/dist/cdn/{ST5DXIZ6.js → NVRFQSZB.js} +1 -1
- package/dist/cdn/{WJWYFM4K.js → PSIEACM5.js} +1 -1
- package/dist/cdn/{F5RARHY3.js → Q6IMZMFI.js} +1 -1
- package/dist/cdn/{MQ4W6OKL.js → QHSIMKPK.js} +1 -1
- package/dist/cdn/QMR3YL46.js +2 -0
- package/dist/cdn/{C6DEM2XB.js → RCLKTOCN.js} +1 -1
- package/dist/cdn/{ZIV7S3DE.js → THXCDBHG.js} +1 -1
- package/dist/cdn/V4RMKJUW.js +2 -0
- package/dist/cdn/WRWNOEUN.js +2 -0
- package/dist/cdn/{PFHHH6X2.js → XF7T7NTL.js} +1 -1
- package/dist/cdn/{R2EXDY7E.js → XHYVTSLE.js} +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/oriented-imagery-viewer-image-viewer/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/async-utils.js +51 -63
- package/dist/chunks/urlUtils.js +17 -0
- package/dist/components/arcgis-aggregated-features/customElement.js +69 -46
- package/dist/components/arcgis-daylight/customElement.js +2 -2
- package/dist/components/arcgis-directions/customElement.js +1 -1
- package/dist/components/arcgis-feature-table/customElement.js +1 -1
- package/dist/components/arcgis-features/customElement.d.ts +7 -0
- package/dist/components/arcgis-features/customElement.js +68 -51
- package/dist/components/arcgis-grid-controls/customElement.js +26 -26
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +1 -1
- package/dist/components/arcgis-oriented-imagery-viewer-image-viewer/customElement.d.ts +41 -0
- package/dist/components/arcgis-oriented-imagery-viewer-image-viewer/customElement.js +299 -0
- package/dist/components/arcgis-oriented-imagery-viewer-image-viewer/index.d.ts +1 -0
- package/dist/components/arcgis-oriented-imagery-viewer-image-viewer/index.js +4 -0
- package/dist/components/arcgis-oriented-imagery-viewer-image-viewer/support/NonPanoramicMedia.d.ts +25 -0
- package/dist/components/arcgis-search/customElement.js +1 -1
- package/dist/components/arcgis-time-of-day-slider/customElement.js +47 -47
- package/dist/components/arcgis-time-slider/customElement.d.ts +353 -688
- package/dist/components/arcgis-time-slider/customElement.js +26 -678
- package/dist/components/arcgis-time-slider/index.js +0 -7
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/loader.js +3 -2
- package/dist/types/lumina.d.ts +9 -2
- package/dist/types/preact.d.ts +10 -2
- package/dist/types/react.d.ts +11 -2
- package/dist/types/stencil.d.ts +9 -2
- package/package.json +5 -5
- package/dist/cdn/AFAQWPXY.js +0 -2
- package/dist/cdn/DWADIUIX.js +0 -2
- package/dist/cdn/F2UYN7PY.js +0 -2
- package/dist/cdn/F74DKJP5.js +0 -2
- package/dist/cdn/JE5PV6KP.js +0 -2
- package/dist/cdn/MDC6LZQV.js +0 -2
- package/dist/cdn/Z33HF7ZE.js +0 -2
- package/dist/cdn/assets/time-slider/t9n/messages.ar.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.bg.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.bs.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.ca.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.cs.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.da.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.de.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.el.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.en.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.es.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.et.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.fi.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.fr.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.he.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.hr.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.hu.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.id.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.it.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.ja.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.ko.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.lt.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.lv.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.nl.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.no.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.pl.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.pt-BR.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.pt-PT.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.ro.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.ru.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.sk.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.sl.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.sr.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.sv.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.th.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.tr.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.uk.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.vi.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.zh-CN.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.zh-HK.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.zh-TW.json +0 -1
- package/dist/components/arcgis-time-slider/types.d.ts +0 -147
|
@@ -1,103 +1,83 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
|
-
import type TimeExtent from "@arcgis/core/time/TimeExtent.js";
|
|
3
|
-
import type Collection from "@arcgis/core/core/Collection.js";
|
|
4
2
|
import type WebMap from "@arcgis/core/WebMap.js";
|
|
5
|
-
import type
|
|
6
|
-
import type
|
|
7
|
-
import type SceneView from "@arcgis/core/views/SceneView.js";
|
|
3
|
+
import type Collection from "@arcgis/core/core/Collection.js";
|
|
4
|
+
import type TimeExtent from "@arcgis/core/time/TimeExtent.js";
|
|
8
5
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
9
6
|
import type { ArcgisReferenceElement, IconName } from "../types.js";
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
7
|
+
import type { TimeSliderViewModelTriggerActionEvent } from "@arcgis/core/widgets/TimeSlider/TimeSliderViewModel.js";
|
|
8
|
+
import type { TimeSliderSettings, Action, TimeSliderMode, TimeSliderState, Stops } from "@arcgis/core/widgets/TimeSlider/types.js";
|
|
9
|
+
import type { MapViewOrSceneView } from "@arcgis/core/views/MapViewOrSceneView.js";
|
|
10
|
+
import type { Icon } from "@esri/calcite-components/components/calcite-icon";
|
|
11
|
+
import type { TimeSliderLayout } from "@arcgis/core/widgets/TimeSlider.js";
|
|
12
|
+
import type { TickConfig } from "@arcgis/core/widgets/Slider/types.js";
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
|
-
* The
|
|
15
|
+
* The Time Slider component simplifies visualization of temporal data in your application.
|
|
15
16
|
*
|
|
16
17
|
* @since 4.28
|
|
17
18
|
*/
|
|
18
19
|
export abstract class ArcgisTimeSlider extends LitElement {
|
|
19
|
-
/** @internal */
|
|
20
|
-
protected readonly _messages: {
|
|
21
|
-
componentLabel: string;
|
|
22
|
-
control: {
|
|
23
|
-
play: string;
|
|
24
|
-
stop: string;
|
|
25
|
-
};
|
|
26
|
-
emptyTimeExtent: string;
|
|
27
|
-
noTimeExtent: string;
|
|
28
|
-
options: string;
|
|
29
|
-
pagination: {
|
|
30
|
-
next: string;
|
|
31
|
-
previous: string;
|
|
32
|
-
};
|
|
33
|
-
} & T9nMeta<{
|
|
34
|
-
componentLabel: string;
|
|
35
|
-
control: {
|
|
36
|
-
play: string;
|
|
37
|
-
stop: string;
|
|
38
|
-
};
|
|
39
|
-
emptyTimeExtent: string;
|
|
40
|
-
noTimeExtent: string;
|
|
41
|
-
options: string;
|
|
42
|
-
pagination: {
|
|
43
|
-
next: string;
|
|
44
|
-
previous: string;
|
|
45
|
-
};
|
|
46
|
-
}>;
|
|
47
20
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
21
|
+
* Defines actions that will appear in a menu when the user clicks the ellipsis button
|
|
22
|
+
*  in the component. The
|
|
23
|
+
* ellipsis button will not display if this property is `null` or if the collection is empty.
|
|
24
|
+
* Each [Action](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/types/#Action) is defined with a unique id, a title,
|
|
25
|
+
* and an icon.
|
|
51
26
|
*
|
|
52
|
-
*
|
|
27
|
+
* The [@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#event-trigger-action) event fires each time an action in the menu is clicked. This event
|
|
28
|
+
* can be used to execute custom code such as setting the [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) to a specific date or copying the
|
|
29
|
+
* timeExtent to the browser's clipboard.
|
|
53
30
|
*
|
|
54
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=widgets-timeslider-offset)
|
|
55
32
|
*
|
|
33
|
+
* @since 4.21
|
|
34
|
+
* @see [Sample - TimeSlider with offset](https://developers.arcgis.com/javascript/latest/sample-code/widgets-timeslider-offset/)
|
|
56
35
|
* @example
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* await timeSliderElement.componentOnReady();
|
|
72
|
-
*
|
|
73
|
-
* timeSliderElement.fullTimeExtent = new TimeExtent({
|
|
74
|
-
* start: new Date(2000, 0, 1),
|
|
75
|
-
* end: new Date(2010, 0, 1),
|
|
76
|
-
* });
|
|
77
|
-
* timeSliderElement.actions = new Collection([
|
|
78
|
-
* { id: "quake", icon: "exclamation-mark-triangle", title: "Jump to Earthquake" },
|
|
79
|
-
* { id: "quake-plus-one-month", icon: "organization", title: "One month later" },
|
|
80
|
-
* ]);
|
|
81
|
-
*
|
|
82
|
-
* reactiveUtils.on(
|
|
83
|
-
* () => timeSliderElement,
|
|
84
|
-
* "arcgisTriggerAction",
|
|
85
|
-
* (event) => {
|
|
86
|
-
* const id = event.detail.action.id;
|
|
87
|
-
* switch (id) {
|
|
88
|
-
* case "quake":
|
|
89
|
-
* console.log("Jump to Earthquake action triggered");
|
|
90
|
-
* break;
|
|
91
|
-
* case "quake-plus-one-month":
|
|
92
|
-
* console.log("One month later action triggered");
|
|
93
|
-
* break;
|
|
94
|
-
* }
|
|
36
|
+
* // Create a TimeSlider with two actions to snap the thumb to
|
|
37
|
+
* // two specific time extents.
|
|
38
|
+
* const timeSlider = new TimeSlider({
|
|
39
|
+
* container: "timeSliderDiv",
|
|
40
|
+
* fullTimeExtent: {
|
|
41
|
+
* start: new Date(2011, 0, 1),
|
|
42
|
+
* end: new Date(2012, 0, 1)
|
|
43
|
+
* },
|
|
44
|
+
* mode: "instant",
|
|
45
|
+
* actions: [
|
|
46
|
+
* {
|
|
47
|
+
* id: "quake",
|
|
48
|
+
* icon: "exclamation-mark-triangle",
|
|
49
|
+
* title: "Jump to Earthquake"
|
|
95
50
|
* },
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
51
|
+
* {
|
|
52
|
+
* id: "quake-plus-one-month",
|
|
53
|
+
* icon: "organization",
|
|
54
|
+
* title: "One month later"
|
|
55
|
+
* }
|
|
56
|
+
* ]
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* // listen to timeSlider's trigger-action event
|
|
60
|
+
* // check what action user clicked on and respond accordingly.
|
|
61
|
+
* timeSlider.on("trigger-action", (event) => {
|
|
62
|
+
* const quake = new Date(Date.UTC(2011, 3, 11, 8, 16, 12));
|
|
63
|
+
* const oneMonthLater = new Date(quake.getTime()).setMonth(quake.getMonth() + 1);
|
|
64
|
+
* switch(event.action.id) {
|
|
65
|
+
* case "quake":
|
|
66
|
+
* timeSlider.timeExtent = {
|
|
67
|
+
* start: quake,
|
|
68
|
+
* end: quake
|
|
69
|
+
* };
|
|
70
|
+
* break;
|
|
71
|
+
* case "quake-plus-one-month":
|
|
72
|
+
* timeSlider.timeExtent = {
|
|
73
|
+
* start: oneMonthLater,
|
|
74
|
+
* end: oneMonthLater
|
|
75
|
+
* };
|
|
76
|
+
* break;
|
|
77
|
+
* }
|
|
78
|
+
* });
|
|
99
79
|
*/
|
|
100
|
-
accessor actions: Collection<Action
|
|
80
|
+
accessor actions: Collection<Action>;
|
|
101
81
|
/**
|
|
102
82
|
* If true, the component will not be destroyed automatically when it is
|
|
103
83
|
* disconnected from the document. This is useful when you want to move the
|
|
@@ -113,94 +93,46 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
113
93
|
*
|
|
114
94
|
* @default false
|
|
115
95
|
* @example
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* ]);
|
|
126
|
-
*
|
|
127
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
128
|
-
* await timeSliderElement.componentOnReady();
|
|
129
|
-
*
|
|
130
|
-
* timeSliderElement.fullTimeExtent = new TimeExtent({
|
|
131
|
-
* start: new Date(2000, 0, 1),
|
|
132
|
-
* end: new Date(2010, 0, 1),
|
|
133
|
-
* });
|
|
134
|
-
*
|
|
135
|
-
* console.log("Time slider disabled:", timeSliderElement.disabled); // true
|
|
136
|
-
* </script>
|
|
137
|
-
* ```
|
|
96
|
+
* // Create a timeslider widget that is initially disabled.
|
|
97
|
+
* const timeSlider = new TimeSlider({
|
|
98
|
+
* container: "timeSliderDiv",
|
|
99
|
+
* fullTimeExtent: {
|
|
100
|
+
* start: new Date(2000, 5, 1),
|
|
101
|
+
* end: new Date(2010, 0, 1)
|
|
102
|
+
* },
|
|
103
|
+
* disabled: true
|
|
104
|
+
* });
|
|
138
105
|
*/
|
|
139
106
|
accessor disabled: boolean;
|
|
140
107
|
/**
|
|
141
|
-
*
|
|
108
|
+
* Lists the specific locations on the timeline where handle(s) will snap to when manipulated.
|
|
142
109
|
*
|
|
143
110
|
* @example
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* </arcgis-map>
|
|
148
|
-
* ```
|
|
149
|
-
* ```js
|
|
150
|
-
* <script type="module">
|
|
151
|
-
* const [TimeExtent] = await $arcgis.import([
|
|
152
|
-
* "@arcgis/core/time/TimeExtent.js",
|
|
153
|
-
* ]);
|
|
154
|
-
*
|
|
155
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
156
|
-
* await timeSliderElement.componentOnReady();
|
|
157
|
-
*
|
|
158
|
-
* // The time-slider will span the first five days of 2000.
|
|
159
|
-
* timeSliderElement.fullTimeExtent = new TimeExtent({
|
|
160
|
-
* start: new Date(2000, 0, 1),
|
|
161
|
-
* end: new Date(2000, 0, 6),
|
|
162
|
-
* });
|
|
163
|
-
*
|
|
164
|
-
* // Specify stops at five evenly spaced intervals.
|
|
165
|
-
* timeSliderElement.stops = {
|
|
166
|
-
* count: 5,
|
|
167
|
-
* };
|
|
168
|
-
*
|
|
169
|
-
* // Display the effective stops to the console.
|
|
170
|
-
* console.log(timeSliderElement.effectiveStops.map(
|
|
171
|
-
* (date) => new Intl.DateTimeFormat("en-US", { dateStyle: "short" }).format(date)
|
|
172
|
-
* ).join(", "));
|
|
173
|
-
* // Output: "1/1/00", "1/2/00", "1/3/00", "1/4/00", "1/6/00"
|
|
174
|
-
* </script>
|
|
175
|
-
* ```
|
|
111
|
+
* timeSlider.effectiveStops.forEach((stop) => {
|
|
112
|
+
* console.log(stop);
|
|
113
|
+
* });
|
|
176
114
|
*/
|
|
177
|
-
get effectiveStops(): Date
|
|
115
|
+
get effectiveStops(): Array<Date> | null | undefined;
|
|
178
116
|
/**
|
|
179
|
-
* The temporal extent of the entire slider.
|
|
180
|
-
* within which
|
|
117
|
+
* The temporal extent of the entire slider.
|
|
118
|
+
* It defines the entire time period within which you can visualize
|
|
119
|
+
* your time aware data using the time slider component.
|
|
181
120
|
*
|
|
182
121
|
* @example
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
* // The time-slider will span ten years from 2000 to 2010.
|
|
198
|
-
* timeSliderElement.fullTimeExtent = new TimeExtent({
|
|
199
|
-
* start: new Date(2000, 0, 1),
|
|
200
|
-
* end: new Date(2010, 0, 1),
|
|
201
|
-
* });
|
|
202
|
-
* </script>
|
|
203
|
-
* ```
|
|
122
|
+
* // Create a new TimeSlider with set dates
|
|
123
|
+
* const timeSlider = new TimeSlider({
|
|
124
|
+
* container: "timeSliderDiv",
|
|
125
|
+
* view: view
|
|
126
|
+
* });
|
|
127
|
+
*
|
|
128
|
+
* // wait for the time-aware layer to load
|
|
129
|
+
* layer.when(() => {
|
|
130
|
+
* // set up time slider properties based on layer timeInfo
|
|
131
|
+
* timeSlider.fullTimeExtent = layer.timeInfo.fullTimeExtent;
|
|
132
|
+
* timeSlider.stops = {
|
|
133
|
+
* interval: layer.timeInfo.interval
|
|
134
|
+
* };
|
|
135
|
+
* });
|
|
204
136
|
*/
|
|
205
137
|
accessor fullTimeExtent: TimeExtent | null | undefined;
|
|
206
138
|
/**
|
|
@@ -208,139 +140,95 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
208
140
|
* Typically used when the component is controlled by another component (e.g. by the Expand component).
|
|
209
141
|
*
|
|
210
142
|
* @default "clock"
|
|
143
|
+
* @since 4.27
|
|
211
144
|
* @see [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/)
|
|
212
145
|
*/
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
accessor label: string | undefined;
|
|
146
|
+
get icon(): Icon["icon"];
|
|
147
|
+
set icon(value: IconName);
|
|
216
148
|
/**
|
|
217
|
-
*
|
|
218
|
-
* The function receives the date(s) to be formatted, the type of label to format, the HTML element in which the
|
|
219
|
-
* formatted string will be placed, and the layout of the component as arguments.
|
|
149
|
+
* The component's default label.
|
|
220
150
|
*
|
|
221
|
-
* @
|
|
222
|
-
* The following snippet will display the day of the week (e.g. Monday, Tuesday, etc.) rather than the default
|
|
223
|
-
* date format for the min, max, and extent labels.
|
|
224
|
-
* ```html
|
|
225
|
-
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
226
|
-
* <arcgis-time-slider slot="top-right" mode="instant"></arcgis-time-slider>
|
|
227
|
-
* </arcgis-map>
|
|
228
|
-
* ```
|
|
229
|
-
* ```js
|
|
230
|
-
* <script type="module">
|
|
231
|
-
* const [TimeExtent, TimeInterval] = await $arcgis.import([
|
|
232
|
-
* "@arcgis/core/time/TimeExtent.js",
|
|
233
|
-
* "@arcgis/core/time/TimeInterval.js",
|
|
234
|
-
* ]);
|
|
235
|
-
*
|
|
236
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
237
|
-
* await timeSliderElement.componentOnReady();
|
|
238
|
-
*
|
|
239
|
-
* timeSliderElement.fullTimeExtent = new TimeExtent({
|
|
240
|
-
* start: new Date(2026, 3, 6),
|
|
241
|
-
* end: new Date(2026, 3, 10),
|
|
242
|
-
* });
|
|
243
|
-
* timeSliderElement.stops = {
|
|
244
|
-
* interval: new TimeInterval({
|
|
245
|
-
* unit: "days",
|
|
246
|
-
* value: 1,
|
|
247
|
-
* }),
|
|
248
|
-
* };
|
|
249
|
-
*
|
|
250
|
-
* function getDayOfTheWeek(date: Date): string {
|
|
251
|
-
* return date.toLocaleDateString("en-US", { weekday: "long" });
|
|
252
|
-
* }
|
|
253
|
-
*
|
|
254
|
-
* timeSliderElement.labelFormatFunction = (value, type, element, layout) => {
|
|
255
|
-
* element.innerHTML =
|
|
256
|
-
* type === "extent"
|
|
257
|
-
* ? getDayOfTheWeek(date[0]) // Format the start date of the time-slider's current time extent.
|
|
258
|
-
* : getDayOfTheWeek(date); // Format the min/max of the time-slider's full time extent.
|
|
259
|
-
* };
|
|
260
|
-
* </script>
|
|
261
|
-
* ```
|
|
151
|
+
* @since 4.11
|
|
262
152
|
*/
|
|
263
|
-
accessor
|
|
153
|
+
accessor label: string;
|
|
264
154
|
/**
|
|
265
|
-
*
|
|
155
|
+
* Determines the layout used by the TimeSlider component.
|
|
266
156
|
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
157
|
+
* Possible values are listed below:
|
|
158
|
+
* | Value | Description |
|
|
159
|
+
* | --- | --- |
|
|
160
|
+
* | auto | Automatically uses the "compact" layout when the component width is less than 858 pixels. Otherwise the "wide" layout it used. |
|
|
161
|
+
* | compact | Component elements are oriented vertically. This layout is better suited to narrower widths. |
|
|
162
|
+
* | wide | Component elements are oriented laterally. This thinner design is better suited to wide applications. |
|
|
270
163
|
*
|
|
271
164
|
* @default "auto"
|
|
272
|
-
* @
|
|
273
|
-
*
|
|
274
|
-
* ```html
|
|
275
|
-
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
276
|
-
* <arcgis-time-slider slot="top-right" layout="wide"></arcgis-time-slider>
|
|
277
|
-
* </arcgis-map>
|
|
278
|
-
* ```
|
|
165
|
+
* @since 4.16
|
|
166
|
+
* @example timeSlider.layout = "compact";
|
|
279
167
|
*/
|
|
280
|
-
accessor layout:
|
|
168
|
+
accessor layout: TimeSliderLayout;
|
|
281
169
|
/**
|
|
282
|
-
* When `true`, time slider will
|
|
170
|
+
* When `true`, the time slider will play its animation in a loop.
|
|
283
171
|
*
|
|
284
172
|
* @default false
|
|
285
173
|
* @example
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
174
|
+
* // Start a time slider animation that advances every second
|
|
175
|
+
* // and restarts when it reaches the end.
|
|
176
|
+
* timeSlider.set({
|
|
177
|
+
* loop: true,
|
|
178
|
+
* playRate: 1000
|
|
179
|
+
* });
|
|
180
|
+
* timeSlider.play();
|
|
292
181
|
*/
|
|
293
182
|
accessor loop: boolean;
|
|
294
183
|
/**
|
|
295
|
-
*
|
|
184
|
+
* The time slider mode. This property is used for defining if the temporal data will be displayed
|
|
185
|
+
* cumulatively up to a point in time, a single instant in time, or within a time range. See
|
|
186
|
+
* the following table for possible values.
|
|
296
187
|
*
|
|
297
|
-
*
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
stop?: string | undefined;
|
|
304
|
-
} | undefined;
|
|
305
|
-
emptyTimeExtent?: string | undefined;
|
|
306
|
-
noTimeExtent?: string | undefined;
|
|
307
|
-
options?: string | undefined;
|
|
308
|
-
pagination?: {
|
|
309
|
-
next?: string | undefined;
|
|
310
|
-
previous?: string | undefined;
|
|
311
|
-
} | undefined;
|
|
312
|
-
};
|
|
313
|
-
/**
|
|
314
|
-
* The time slider mode. The mode determines how the time extent is calculated based on the position of the thumb(s)
|
|
315
|
-
* and the behavior of the component when the thumbs are manipulated.
|
|
188
|
+
* Possible Values | Description | Example |
|
|
189
|
+
* ----------------------|-------------- | ------- |
|
|
190
|
+
* instant | The slider will show temporal data that falls on a single instance in time. Set the [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property's `start` and `end` dates to same date: `{start: sameDate, end: sameDate}` | <img alt="mode-instance" src="https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/timeslider/mode-instance.png"> |
|
|
191
|
+
* time-window | The slider will show temporal data that falls within a given time range. This is the default. Set [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property's `start` and `date` properties to desired dates. | <img alt="mode-instance" src="https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/timeslider/mode-time-window.png"> |
|
|
192
|
+
* cumulative-from-start | Similar to `time-window` with the start time is always pinned to the start of the slider. Set the [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property's `start` date to `null` and set `end` date to a desired date: `{start: null, end: date}` | <img alt="mode-instance" src="https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/timeslider/mode-from-start.png"> |
|
|
193
|
+
* cumulative-from-end | Also, similar to the `time-window` with the end time pinned to the end of the slider. Set the [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property's `start` date to a desired date and set `end` date to `null`: `{start: date, end: null}` | <img alt="mode-instance" src="https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/timeslider/mode-from-end.png"> |
|
|
316
194
|
*
|
|
317
195
|
* @default "time-window"
|
|
196
|
+
* @see [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent)
|
|
318
197
|
* @example
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
198
|
+
* // Create a single thumbed time slider that includes all historic content.
|
|
199
|
+
* const timeSlider = new TimeSlider({
|
|
200
|
+
* container: "timeSliderDiv",
|
|
201
|
+
* view: view,
|
|
202
|
+
* mode: "cumulative-from-start",
|
|
203
|
+
* fullTimeExtent: {
|
|
204
|
+
* start: new Date(2000, 0, 1),
|
|
205
|
+
* end: new Date(2010, 0, 1)
|
|
206
|
+
* },
|
|
207
|
+
* timeExtent: {
|
|
208
|
+
* start: null,
|
|
209
|
+
* end: new Date(2001, 0, 1) //end date
|
|
210
|
+
* }
|
|
211
|
+
* });
|
|
325
212
|
*/
|
|
326
|
-
accessor mode:
|
|
213
|
+
accessor mode: TimeSliderMode;
|
|
327
214
|
/**
|
|
328
|
-
*
|
|
215
|
+
* The time (in milliseconds) between animation steps.
|
|
329
216
|
*
|
|
330
217
|
* > [!WARNING]
|
|
331
218
|
* >
|
|
332
|
-
* > When
|
|
333
|
-
* >
|
|
334
|
-
* >
|
|
219
|
+
* > When a [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/) is associated with a TimeSlider and the TimeSlider is playing, the playback will pause before advancing if the View is still updating.
|
|
220
|
+
* > For example, if the `playRate` is set to 1,000 (one second) and the `View` takes 1.5 seconds to render then the TimeSlider thumb(s) will advance every
|
|
221
|
+
* > 1.5 seconds rather than every second.
|
|
335
222
|
*
|
|
336
223
|
* @default 1000
|
|
337
224
|
* @example
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
*
|
|
225
|
+
* // Start a time slider animation that advances
|
|
226
|
+
* // ten times a second and stops when it reaches the end.
|
|
227
|
+
* timeSlider.set({
|
|
228
|
+
* loop: false,
|
|
229
|
+
* playRate: 100
|
|
230
|
+
* });
|
|
231
|
+
* timeSlider.play();
|
|
344
232
|
*/
|
|
345
233
|
accessor playRate: number;
|
|
346
234
|
/**
|
|
@@ -354,483 +242,260 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
354
242
|
*
|
|
355
243
|
* @default "disabled"
|
|
356
244
|
* @example
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
*
|
|
361
|
-
*
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
* "
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
371
|
-
* await timeSliderElement.componentOnReady();
|
|
372
|
-
*
|
|
373
|
-
* timeSliderElement.fullTimeExtent = new TimeExtent({
|
|
374
|
-
* start: new Date(2026, 3, 6),
|
|
375
|
-
* end: new Date(2026, 3, 10),
|
|
376
|
-
* });
|
|
377
|
-
* reactiveUtils.watch(
|
|
378
|
-
* () => timeSliderElement.state,
|
|
379
|
-
* (state) => {
|
|
380
|
-
* console.log("Time slider state:", state);
|
|
381
|
-
* },
|
|
382
|
-
* );
|
|
383
|
-
* </script>
|
|
384
|
-
* ```
|
|
245
|
+
* // Display the current state of the view model.
|
|
246
|
+
* switch (timeSlider.viewModel.state) {
|
|
247
|
+
* case "disabled":
|
|
248
|
+
* console.log("The view is not ready or some property are not set.");
|
|
249
|
+
* break;
|
|
250
|
+
* case "ready":
|
|
251
|
+
* console.log("The time slider is ready for use.");
|
|
252
|
+
* break;
|
|
253
|
+
* case "playing":
|
|
254
|
+
* console.log("The time slider is currently animating.");
|
|
255
|
+
* break;
|
|
256
|
+
* }
|
|
385
257
|
*/
|
|
386
|
-
get state():
|
|
258
|
+
get state(): TimeSliderState;
|
|
387
259
|
/**
|
|
388
|
-
* Defines
|
|
260
|
+
* Defines specific locations on the time slider where thumbs will snap to when manipulated.
|
|
261
|
+
* If unspecified, ten evenly spaced stops will be added.
|
|
389
262
|
*
|
|
390
|
-
*
|
|
391
|
-
* @example
|
|
392
|
-
* To allow thumbs to snap to evenly spaced intervals, assign an object with a `count` property as shown below.
|
|
393
|
-
* The default value for stops is ten evenly spaced intervals across the full time extent.
|
|
263
|
+
* For continuous sliding, set `stops` to `null`:
|
|
394
264
|
* ```js
|
|
395
|
-
*
|
|
396
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
397
|
-
* await timeSliderElement.componentOnReady();
|
|
398
|
-
*
|
|
399
|
-
* timeSliderElement.stops = {
|
|
400
|
-
* count: 10,
|
|
401
|
-
* };
|
|
402
|
-
* </script>
|
|
265
|
+
* timeSlider.stops = null;
|
|
403
266
|
* ```
|
|
404
|
-
* @example
|
|
405
|
-
* To allow thumbs to be manipulated continuously without snapping to specific dates, set `stops` to `null`:
|
|
406
|
-
* ```js
|
|
407
|
-
* <script type="module">
|
|
408
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
409
|
-
* await timeSliderElement.componentOnReady();
|
|
410
267
|
*
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
*
|
|
414
|
-
*
|
|
415
|
-
*
|
|
268
|
+
* To define regularly spaced stops, parse an object with `interval` and `timeExtent` properties
|
|
269
|
+
* with types [TimeInterval](https://developers.arcgis.com/javascript/latest/references/core/time/TimeInterval/) and [TimeExtent](https://developers.arcgis.com/javascript/latest/references/core/time/TimeExtent/) respectively.
|
|
270
|
+
* The [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property is optional and used to confine stops to a certain date range.
|
|
271
|
+
* This property is useful to commence stops on a specific day of the week or month.
|
|
272
|
+
* If a stop definition by interval results in excess of 10,000 stops, then the view model
|
|
273
|
+
* will default to ten evenly spaced stops.
|
|
274
|
+
*
|
|
416
275
|
* ```js
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
* new Date(2003, 12, 8), new Date(2004, 2, 19), new Date(2005, 7, 5),
|
|
425
|
-
* new Date(2006, 9, 11), new Date(2007, 11, 21), new Date(2008, 1, 10)
|
|
426
|
-
* ],
|
|
427
|
-
* };
|
|
428
|
-
* </script>
|
|
276
|
+
* // Add yearly intervals starting from the beginning of the TimeSlider.
|
|
277
|
+
* timeSlider.stops = {
|
|
278
|
+
* interval: {
|
|
279
|
+
* value: 1,
|
|
280
|
+
* unit: "years"
|
|
281
|
+
* }
|
|
282
|
+
* };
|
|
429
283
|
* ```
|
|
430
|
-
*
|
|
431
|
-
*
|
|
284
|
+
* Rather than setting the stops as time intervals, the TimeSlider can be divided into evenly spaced
|
|
285
|
+
* stops using the `count` property. Similar to the previous method, divisions can be confined to a specific date range
|
|
286
|
+
* using the optional timeExtent property.
|
|
432
287
|
* ```js
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
439
|
-
* await timeSliderElement.componentOnReady();
|
|
440
|
-
*
|
|
441
|
-
* timeSliderElement.stops = {
|
|
442
|
-
* interval: new TimeInterval({
|
|
443
|
-
* value: 1,
|
|
444
|
-
* unit: "years"
|
|
445
|
-
* }),
|
|
446
|
-
* };
|
|
447
|
-
* </script>
|
|
288
|
+
* // Add stops at 15 evenly spaced intervals.
|
|
289
|
+
* timeSlider.stops = {
|
|
290
|
+
* count: 15
|
|
291
|
+
* };
|
|
448
292
|
* ```
|
|
449
|
-
*
|
|
450
|
-
* Lastly, both the interval and count stop definitions can optionally use a `timeExtent` property to confine the definitions to a specific range.
|
|
451
|
-
* For example, the following defines a time slider with a full time extent of the year 2026. However, daily stops only exist in the month of April.
|
|
293
|
+
* For irregularly spaced stops, simply assign an array of dates as demonstrated below.
|
|
452
294
|
* ```js
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
*
|
|
477
|
-
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
295
|
+
* // Add nine irregular stops.
|
|
296
|
+
* timeSlider.stops = {
|
|
297
|
+
* dates: [
|
|
298
|
+
* new Date(2000, 0, 1), new Date(2001, 3, 8), new Date(2002, 0, 10),
|
|
299
|
+
* new Date(2003, 12, 8), new Date(2004, 2, 19), new Date(2005, 7, 5),
|
|
300
|
+
* new Date(2006, 9, 11), new Date(2007, 11, 21), new Date(2008, 1, 10)
|
|
301
|
+
* ]
|
|
302
|
+
* };
|
|
303
|
+
* ```
|
|
304
|
+
* Lastly, to constrain or offset division by count or interval use the optional timeExtent property.
|
|
305
|
+
* ```js
|
|
306
|
+
* // Add yearly stops from Christmas 2019 to Christmas 2029 only
|
|
307
|
+
* timeSlider.stops = {
|
|
308
|
+
* interval: {
|
|
309
|
+
* value: 1,
|
|
310
|
+
* unit: "years"
|
|
311
|
+
* },
|
|
312
|
+
* timeExtent: {
|
|
313
|
+
* start: new Date(2019, 11, 25),
|
|
314
|
+
* end: new Date(2029, 11, 25)
|
|
315
|
+
* }
|
|
316
|
+
* };
|
|
317
|
+
*
|
|
318
|
+
* // Likewise, add stops that represent quarters of 2019 only.
|
|
319
|
+
* timeSlider.stops = {
|
|
320
|
+
* count: 4,
|
|
321
|
+
* timeExtent: {
|
|
322
|
+
* start: new Date(2019, 0, 1),
|
|
323
|
+
* end: new Date(2020, 0, 1)
|
|
324
|
+
* }
|
|
325
|
+
* };
|
|
480
326
|
* ```
|
|
327
|
+
*
|
|
328
|
+
* @default { count : 10 }
|
|
481
329
|
*/
|
|
482
330
|
accessor stops: Stops | null | undefined;
|
|
483
331
|
/**
|
|
484
|
-
*
|
|
485
|
-
*
|
|
332
|
+
* When set, overrides the default TimeSlider ticks labelling system.
|
|
333
|
+
* Please refer to [TickConfig](https://developers.arcgis.com/javascript/latest/references/core/widgets/Slider/types/#TickConfig) for detailed documentation
|
|
334
|
+
* on how to configure tick placement, style, and behavior.
|
|
486
335
|
*
|
|
336
|
+
* @since 4.16
|
|
487
337
|
* @example
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
* "
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
504
|
-
*
|
|
505
|
-
*
|
|
506
|
-
* { label: "Winter", date: new Date(2026, 0, 1) },
|
|
507
|
-
* { label: "Spring", date: new Date(2026, 2, 20) },
|
|
508
|
-
* { label: "Summer", date: new Date(2026, 5, 21) },
|
|
509
|
-
* { label: "Fall", date: new Date(2026, 8, 22) },
|
|
510
|
-
* { label: "Winter", date: new Date(2027, 0, 1) },
|
|
511
|
-
* ];
|
|
512
|
-
*
|
|
513
|
-
* // Convenience function to match the tick's date to the corresponding label.
|
|
514
|
-
* function getLabelForEpoch(epoch: number): string {
|
|
515
|
-
* const tick = ticks.find(({ date }) => date.getTime() === epoch);
|
|
516
|
-
* return tick?.label ?? "";
|
|
517
|
-
* }
|
|
518
|
-
*
|
|
519
|
-
* // Obtain a reference to the time slider element.
|
|
520
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
521
|
-
* await timeSliderElement.componentOnReady();
|
|
522
|
-
*
|
|
523
|
-
* // Set the time slider's full time extent to span the year 2026.
|
|
524
|
-
* timeSliderElement.fullTimeExtent = new TimeExtent({
|
|
525
|
-
* start: new Date(2026, 0, 1),
|
|
526
|
-
* end: new Date(2027, 0, 1),
|
|
527
|
-
* });
|
|
528
|
-
*
|
|
529
|
-
* // Set the time slider's stops to the custom ticks.
|
|
530
|
-
* const dates = ticks.map(({ date }) => date);
|
|
531
|
-
* timeSliderElement.stops = { dates };
|
|
532
|
-
*
|
|
533
|
-
* // Set the time slider's tick configurations to the custom ticks.
|
|
534
|
-
* const values = dates.map((date) => date.getTime());
|
|
535
|
-
* timeSliderElement.tickConfigs = [
|
|
536
|
-
* {
|
|
537
|
-
* // Position ticks absolutely based on the date, rather than at regular intervals.
|
|
538
|
-
* mode: "position",
|
|
539
|
-
* // Show labels for the ticks.
|
|
540
|
-
* labelsVisible: true,
|
|
541
|
-
* // Match the tick's date to the corresponding label.
|
|
542
|
-
* labelFormatFunction: (epoch) => getLabelForEpoch(epoch),
|
|
543
|
-
* // Location of the ticks based on the date.
|
|
544
|
-
* values,
|
|
338
|
+
* // By default in "en-US" the TimeSlider will display ticks with "2010, 2011, 2012, etc".
|
|
339
|
+
* // Overwrite TimeSlider tick configuration so that labels display "'10, '12, '14, etc" in red.
|
|
340
|
+
* const timeSlider = new TimeSlider({
|
|
341
|
+
* container: "timeSliderDiv",
|
|
342
|
+
* fullTimeExtent: {
|
|
343
|
+
* start: new Date(2010, 0, 1),
|
|
344
|
+
* end: new Date(2020, 0, 1)
|
|
345
|
+
* },
|
|
346
|
+
* tickConfigs: [{
|
|
347
|
+
* mode: "position",
|
|
348
|
+
* values: [
|
|
349
|
+
* new Date(2010, 0, 1), new Date(2012, 0, 1), new Date(2014, 0, 1),
|
|
350
|
+
* new Date(2016, 0, 1), new Date(2018, 0, 1), new Date(2020, 0, 1)
|
|
351
|
+
* ].map((date) => date.getTime()),
|
|
352
|
+
* labelsVisible: true,
|
|
353
|
+
* labelFormatFunction: (value) => {
|
|
354
|
+
* const date = new Date(value);
|
|
355
|
+
* return `'${date.getUTCFullYear() - 2000}`;
|
|
545
356
|
* },
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
357
|
+
* tickCreatedFunction: (value, tickElement, labelElement) => {
|
|
358
|
+
* tickElement.classList.add("custom-ticks");
|
|
359
|
+
* labelElement.classList.add("custom-labels");
|
|
360
|
+
* }
|
|
361
|
+
* }]
|
|
362
|
+
* };
|
|
363
|
+
* @example
|
|
364
|
+
* // this CSS goes with the snippet above.
|
|
365
|
+
* #timeSlider .custom-ticks {
|
|
366
|
+
* background-color: red;
|
|
367
|
+
* width: 1px;
|
|
368
|
+
* height: 8px;
|
|
369
|
+
* }
|
|
370
|
+
* #timeSlider .custom-labels {
|
|
371
|
+
* font-family: Georgia, 'Times New Roman', Times, serif;
|
|
372
|
+
* font-size: 15px;
|
|
373
|
+
* color: red;
|
|
374
|
+
* }
|
|
549
375
|
*/
|
|
550
|
-
accessor tickConfigs: TickConfig
|
|
376
|
+
accessor tickConfigs: Array<TickConfig> | null | undefined;
|
|
551
377
|
/**
|
|
552
|
-
* The current time extent of the time slider.
|
|
553
|
-
*
|
|
554
|
-
*
|
|
555
|
-
* the time slider's time extent will synchronize with the view's time extent.
|
|
556
|
-
* Meaning that any changes to one time extent property will be mirrored in the other.
|
|
557
|
-
*
|
|
558
|
-
* It is important to note that the time extent returned by this property will conform to the format in the table
|
|
559
|
-
* below based on the current `mode` of the time slider. Similarly, this format should be followed when assigning
|
|
560
|
-
* a new time extent to ensure proper behavior of the component and synchronization with an attached map or scene's
|
|
561
|
-
* time extent.
|
|
378
|
+
* The current time extent of the time slider. This property can be watched for
|
|
379
|
+
* updates and used to update the time extent property in queries and/or the layer filters and effects.
|
|
380
|
+
* The following table shows the `timeExtent` values returned for each [mode](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#mode).
|
|
562
381
|
*
|
|
563
|
-
*
|
|
564
|
-
* |
|
|
565
|
-
*
|
|
566
|
-
* | `
|
|
567
|
-
* | `
|
|
568
|
-
* | `cumulative-from-
|
|
569
|
-
* | `cumulative-from-end` | `null` end date | `{ start: new Date(2019, 2, 1), end: null }` |
|
|
382
|
+
* | Mode | The timeExtent value |
|
|
383
|
+
* | ------- | -------------------- |
|
|
384
|
+
* | `time-window` | `{start: startDate, end: endDate}` |
|
|
385
|
+
* | `instant` | `{start: sameDate, end: sameDate}` |
|
|
386
|
+
* | `cumulative-from-start` | `{start: null, end: endDate}` |
|
|
387
|
+
* | `cumulative-from-end` | `{start: startDate, end: null}` |
|
|
570
388
|
*
|
|
571
389
|
* @example
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
*
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
* const layer = new GeoJSONLayer({
|
|
586
|
-
* url: "https://bsvensson.github.io/various-tests/geojson/usgs-earthquakes-06182019.geojson",
|
|
587
|
-
* timeInfo: {
|
|
588
|
-
* startField: "time",
|
|
589
|
-
* interval: { unit: "days", value: 1 },
|
|
590
|
-
* },
|
|
591
|
-
* });
|
|
592
|
-
*
|
|
593
|
-
* const viewElement = document.querySelector("arcgis-map");
|
|
594
|
-
* await viewElement.viewOnReady();
|
|
595
|
-
* viewElement.add(layer);
|
|
596
|
-
*
|
|
597
|
-
* await viewElement.viewOnReady();
|
|
598
|
-
* const layerView = await viewElement.whenLayerView(layer);
|
|
599
|
-
*
|
|
600
|
-
* const timeSlider = document.querySelector("arcgis-time-slider");
|
|
601
|
-
* await timeSlider.componentOnReady()
|
|
602
|
-
*
|
|
603
|
-
* timeSlider.fullTimeExtent = layer.timeInfo.fullTimeExtent.expandTo("hours");
|
|
604
|
-
* timeSlider.stops = {
|
|
605
|
-
* interval: new TimeInterval({ value: 1, unit: "hours" }),
|
|
606
|
-
* };
|
|
390
|
+
* // Display the time extent to the console whenever it changes.
|
|
391
|
+
* const timeSlider = new TimeSlider({
|
|
392
|
+
* container: "timeSliderDiv",
|
|
393
|
+
* mode: "time-window",
|
|
394
|
+
* fullTimeExtent: {
|
|
395
|
+
* start: new Date(2019, 2, 3),
|
|
396
|
+
* end: new Date(2019, 2, 5)
|
|
397
|
+
* },
|
|
398
|
+
* timeExtent: {
|
|
399
|
+
* start: new Date(2019, 2, 1),
|
|
400
|
+
* end: new Date(2019, 2, 28)
|
|
401
|
+
* }
|
|
402
|
+
* });
|
|
607
403
|
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
*
|
|
611
|
-
* (
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
* filter: { timeExtent },
|
|
615
|
-
* excludedEffect: "grayscale(20%) opacity(12%)",
|
|
616
|
-
* };
|
|
617
|
-
* }
|
|
618
|
-
* );
|
|
619
|
-
* ```
|
|
404
|
+
* reactiveUtils.watch(
|
|
405
|
+
* () => timeSlider.timeExtent,
|
|
406
|
+
* (timeExtent) => {
|
|
407
|
+
* console.log("Time extent now starts at", timeExtent.start, "and finishes at:", timeExtent.end);
|
|
408
|
+
* }
|
|
409
|
+
* );
|
|
620
410
|
*/
|
|
621
411
|
accessor timeExtent: TimeExtent | null | undefined;
|
|
622
412
|
/**
|
|
623
|
-
*
|
|
624
|
-
* This property is useful when the time extent of the slider is narrow or when the time component of the date is relevant to the user.
|
|
413
|
+
* Shows/hides time in the display.
|
|
625
414
|
*
|
|
626
415
|
* @default false
|
|
627
416
|
* @example
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
*
|
|
417
|
+
* // For time sliders with a small time extent it may be useful to display times as shown below.
|
|
418
|
+
* const timeSlider = new TimeSlider({
|
|
419
|
+
* container: "timeSliderDiv",
|
|
420
|
+
* mode: "time-window",
|
|
421
|
+
* timeVisible: true,
|
|
422
|
+
* fullTimeExtent: {
|
|
423
|
+
* start: new Date(2019, 2, 3),
|
|
424
|
+
* end: new Date(2019, 2, 5)
|
|
425
|
+
* },
|
|
426
|
+
* timeExtent: {
|
|
427
|
+
* start: new Date(2019, 2, 1),
|
|
428
|
+
* end: new Date(2019, 2, 28)
|
|
429
|
+
* }
|
|
430
|
+
* });
|
|
633
431
|
*/
|
|
634
432
|
accessor timeVisible: boolean;
|
|
635
433
|
/**
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
434
|
+
* Dates and times displayed in the component will be displayed in this time zone. By default this time zone is
|
|
435
|
+
* inherited from [MapView#timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone). When a MapView is not associated with the component
|
|
436
|
+
* then the property will fallback to the `system` time zone.
|
|
639
437
|
*
|
|
640
|
-
*
|
|
641
|
-
*
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
* @
|
|
649
|
-
* @see [MapView#timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone)
|
|
438
|
+
* **Possible Values**
|
|
439
|
+
*
|
|
440
|
+
* Value | Description |
|
|
441
|
+
* ----- | ----------- |
|
|
442
|
+
* system | Dates and times will be displayed in the timezone of the device or browser.
|
|
443
|
+
* unknown | Dates and time are not adjusted for any timezone. [TimeSlider](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/) will be disabled.
|
|
444
|
+
* Specified IANA timezone | Dates and times will be displayed in the specified IANA time zone. See [wikipedia - List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
445
|
+
*
|
|
446
|
+
* @since 4.28
|
|
650
447
|
*/
|
|
651
|
-
accessor timeZone: string
|
|
448
|
+
accessor timeZone: string;
|
|
652
449
|
/**
|
|
653
450
|
* The view associated with the component.
|
|
654
451
|
* > **Note:** The recommended approach is to fully migrate applications to use map and scene components and avoid using MapView and SceneView directly. However, if you are migrating a large application from widgets to components, you might prefer a more gradual transition. To support this use case, the SDK includes this `view` property which connects a component to a MapView or SceneView. Ultimately, once migration is complete, the arcgis-time-slider component will be associated with a map or scene component rather than using the `view` property.
|
|
655
|
-
*/
|
|
656
|
-
accessor view: MapView | SceneView | null | undefined;
|
|
657
|
-
/**
|
|
658
|
-
* This method will update multiple time slider properties and is intended to be used in conjunction with
|
|
659
|
-
* [getTimeSliderSettingsFromWebDocument](https://developers.arcgis.com/javascript/latest/references/core/support/timeUtils/#getTimeSliderSettingsFromWebDocument).
|
|
660
|
-
*
|
|
661
|
-
* `getTimeSliderSettingsFromWebDocument` is a utility function that extracts time slider settings (if any) from a
|
|
662
|
-
* published web map or web scene. This method can be used to apply those settings to the time slider component.
|
|
663
452
|
*
|
|
664
|
-
* @param settings
|
|
665
453
|
* @example
|
|
666
|
-
* The following example demonstrates how to use `getTimeSliderSettingsFromWebDocument` and `applyTimeSliderSettings`
|
|
667
|
-
* together to extract time slider settings from a web map and apply them to the time slider component.
|
|
668
|
-
* ```html
|
|
669
|
-
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
670
|
-
* <arcgis-time-slider slot="top-left"></arcgis-time-slider>
|
|
671
|
-
* </arcgis-map>
|
|
672
|
-
* ```
|
|
673
454
|
* ```js
|
|
674
|
-
*
|
|
675
|
-
*
|
|
676
|
-
*
|
|
677
|
-
*
|
|
678
|
-
*
|
|
679
|
-
*
|
|
680
|
-
*
|
|
681
|
-
*
|
|
682
|
-
*
|
|
683
|
-
*
|
|
684
|
-
*
|
|
685
|
-
*
|
|
686
|
-
*
|
|
455
|
+
* // Create and then add a TimeSlider component and then listen to changes in the View's time extent.
|
|
456
|
+
* const timeSlider = new TimeSlider({
|
|
457
|
+
* container: "timeSliderDiv",
|
|
458
|
+
* view: view,
|
|
459
|
+
* mode: "instant",
|
|
460
|
+
* fullTimeExtent: {
|
|
461
|
+
* start: new Date(2000, 0, 1),
|
|
462
|
+
* end: new Date(2010, 0, 1)
|
|
463
|
+
* },
|
|
464
|
+
* timeExtent: {
|
|
465
|
+
* start: new Date(2000, 0, 1),
|
|
466
|
+
* end: new Date(2000, 0, 1)
|
|
467
|
+
* }
|
|
468
|
+
* });
|
|
469
|
+
* view.ui.add(timeSlider, "top-left");
|
|
687
470
|
*
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
*
|
|
691
|
-
*
|
|
471
|
+
* reactiveUtils.watch(
|
|
472
|
+
* () => view.timeExtent,
|
|
473
|
+
* (timeExtent) => {
|
|
474
|
+
* console.log("New view time is: ", timeExtent.start);
|
|
475
|
+
* }
|
|
476
|
+
* );
|
|
692
477
|
* ```
|
|
693
478
|
*/
|
|
479
|
+
accessor view: MapViewOrSceneView | null | undefined;
|
|
480
|
+
/** @param settings */
|
|
694
481
|
applyTimeSliderSettings(settings: TimeSliderSettings): Promise<void>;
|
|
695
482
|
/** Permanently destroy the component. */
|
|
696
483
|
destroy(): Promise<void>;
|
|
697
|
-
/**
|
|
698
|
-
* Incrementally moves the [timeExtent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#timeExtent) forward one stop.
|
|
699
|
-
*
|
|
700
|
-
* @example
|
|
701
|
-
* The following example demonstrates how to use the `next` method to move the time slider's time extent forward one
|
|
702
|
-
* stop when a button is clicked.
|
|
703
|
-
* ```html
|
|
704
|
-
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
705
|
-
* <arcgis-time-slider slot="top-left" mode="instant"></arcgis-time-slider>
|
|
706
|
-
* </arcgis-map>
|
|
707
|
-
* <button id="next-button">Next</button>
|
|
708
|
-
* ```
|
|
709
|
-
* ```js
|
|
710
|
-
* <script type="module">
|
|
711
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
712
|
-
* await timeSliderElement.componentOnReady();
|
|
713
|
-
*
|
|
714
|
-
* document.getElementById("next-button").addEventListener("click", () => {
|
|
715
|
-
* timeSliderElement.next();
|
|
716
|
-
* });
|
|
717
|
-
* </script>
|
|
718
|
-
* ```
|
|
719
|
-
*/
|
|
720
484
|
next(): Promise<void>;
|
|
721
|
-
/**
|
|
722
|
-
* Initiates playback of the time slider, causing the [timeExtent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#timeExtent) to
|
|
723
|
-
* incrementally move forward based on the defined [playRate](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#playRate) and
|
|
724
|
-
* [stops](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#stops).
|
|
725
|
-
*
|
|
726
|
-
* Note that when [loop](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#loop) is `true`, the time slider will restart from the
|
|
727
|
-
* beginning when it reaches the end of the slider while playing.
|
|
728
|
-
*
|
|
729
|
-
* @example
|
|
730
|
-
* The following example demonstrates how to use the `play` method to start playback of the time slider when a button
|
|
731
|
-
* is clicked.
|
|
732
|
-
* ```html
|
|
733
|
-
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
734
|
-
* <arcgis-time-slider slot="top-left" mode="instant"></arcgis-time-slider>
|
|
735
|
-
* </arcgis-map>
|
|
736
|
-
* <button id="play-button">Play</button>
|
|
737
|
-
* ```
|
|
738
|
-
* ```js
|
|
739
|
-
* <script type="module">
|
|
740
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
741
|
-
* await timeSliderElement.componentOnReady();
|
|
742
|
-
*
|
|
743
|
-
* document.getElementById("play-button").addEventListener("click", () => {
|
|
744
|
-
* timeSliderElement.play();
|
|
745
|
-
* });
|
|
746
|
-
* </script>
|
|
747
|
-
* ```
|
|
748
|
-
*/
|
|
749
485
|
play(): Promise<void>;
|
|
750
|
-
/**
|
|
751
|
-
* Incrementally moves the [timeExtent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#timeExtent) backward one stop.
|
|
752
|
-
*
|
|
753
|
-
* @example
|
|
754
|
-
* The following example demonstrates how to use the `previous` method to move the time slider's time extent backward
|
|
755
|
-
* one stop when a button is clicked.
|
|
756
|
-
* ```html
|
|
757
|
-
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
758
|
-
* <arcgis-time-slider slot="top-left" mode="instant"></arcgis-time-slider>
|
|
759
|
-
* </arcgis-map>
|
|
760
|
-
* <button id="previous-button">Previous</button>
|
|
761
|
-
* ```
|
|
762
|
-
* ```js
|
|
763
|
-
* <script type="module">
|
|
764
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
765
|
-
* await timeSliderElement.componentOnReady();
|
|
766
|
-
*
|
|
767
|
-
* document.getElementById("previous-button").addEventListener("click", () => {
|
|
768
|
-
* timeSliderElement.previous();
|
|
769
|
-
* });
|
|
770
|
-
* </script>
|
|
771
|
-
* ```
|
|
772
|
-
*/
|
|
773
486
|
previous(): Promise<void>;
|
|
774
|
-
/**
|
|
775
|
-
* Stops time slider playback.
|
|
776
|
-
*
|
|
777
|
-
* @example
|
|
778
|
-
* The following example demonstrates how to use the `stop` method to stop time slider playback when a button
|
|
779
|
-
* is clicked.
|
|
780
|
-
* ```html
|
|
781
|
-
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
782
|
-
* <arcgis-time-slider slot="top-left" mode="instant"></arcgis-time-slider>
|
|
783
|
-
* </arcgis-map>
|
|
784
|
-
* <button id="stop-button">Stop</button>
|
|
785
|
-
* ```
|
|
786
|
-
* ```js
|
|
787
|
-
* <script type="module">
|
|
788
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
789
|
-
* await timeSliderElement.componentOnReady();
|
|
790
|
-
*
|
|
791
|
-
* document.getElementById("stop-button").addEventListener("click", () => {
|
|
792
|
-
* timeSliderElement.stop();
|
|
793
|
-
* });
|
|
794
|
-
* </script>
|
|
795
|
-
* ```
|
|
796
|
-
*/
|
|
797
487
|
stop(): Promise<void>;
|
|
798
|
-
/**
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
* The following example demonstrates how to use the `stop` method to stop time slider playback when a button
|
|
804
|
-
* is clicked.
|
|
805
|
-
* ```html
|
|
806
|
-
* <arcgis-map item-id="acea555a4b6f412dae98994bcfdbc002">
|
|
807
|
-
* <arcgis-time-slider slot="top-left"></arcgis-time-slider>
|
|
808
|
-
* </arcgis-map>
|
|
809
|
-
* <button id="save-button">Save</button>
|
|
810
|
-
* ```
|
|
811
|
-
* ```js
|
|
812
|
-
* <script type="module">
|
|
813
|
-
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
814
|
-
* await timeSliderElement.componentOnReady();
|
|
815
|
-
*
|
|
816
|
-
* const viewElement = document.querySelector("arcgis-map");
|
|
817
|
-
* await viewElement.viewOnReady();
|
|
818
|
-
*
|
|
819
|
-
* document.getElementById("save-button").addEventListener("click", async () => {
|
|
820
|
-
* timeSliderElement.updateWebDocument(viewElement.map);
|
|
821
|
-
* const portalItem = await viewElement.map.save();
|
|
822
|
-
* });
|
|
823
|
-
* </script>
|
|
824
|
-
* ```
|
|
825
|
-
* @see [timeSlider](https://developers.arcgis.com/javascript/latest/references/core/webdoc/Widgets/#timeSlider)
|
|
826
|
-
*/
|
|
827
|
-
updateWebDocument(document: WebMap | WebScene): Promise<void>;
|
|
488
|
+
/** @param webmap */
|
|
489
|
+
updateWebDocument(webmap: WebMap): Promise<void>;
|
|
490
|
+
"@setterTypes": {
|
|
491
|
+
icon?: IconName;
|
|
492
|
+
};
|
|
828
493
|
/** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
|
|
829
|
-
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "state"; }>;
|
|
494
|
+
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "effectiveStops" | "fullTimeExtent" | "timeExtent" | "state"; }>;
|
|
830
495
|
/** Emitted when the component associated with a map or scene view is ready to be interacted with. */
|
|
831
496
|
readonly arcgisReady: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
832
497
|
/** Emitted when an action is triggered on the component. */
|
|
833
|
-
readonly arcgisTriggerAction: import("@arcgis/lumina").TargetedEvent<this,
|
|
498
|
+
readonly arcgisTriggerAction: import("@arcgis/lumina").TargetedEvent<this, TimeSliderViewModelTriggerActionEvent>;
|
|
834
499
|
readonly "@eventTypes": {
|
|
835
500
|
arcgisPropertyChange: ArcgisTimeSlider["arcgisPropertyChange"]["detail"];
|
|
836
501
|
arcgisReady: ArcgisTimeSlider["arcgisReady"]["detail"];
|