@arcgis/map-components 5.1.0-next.83 → 5.1.0-next.85
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/66YJK5TN.js +2 -0
- package/dist/cdn/{HBEEL7IW.js → 6VJBGE5W.js} +1 -1
- package/dist/cdn/AFAQWPXY.js +2 -0
- package/dist/cdn/AU2CHOT7.js +2 -0
- package/dist/cdn/{GPU57C3Y.js → CLGZBSF4.js} +1 -1
- package/dist/cdn/EIVHDZFM.js +2 -0
- package/dist/cdn/{7TRV2EOI.js → ELGQ2B5Q.js} +1 -1
- package/dist/cdn/{JT5PIQU5.js → FPT2UAZM.js} +1 -1
- package/dist/cdn/{MVULTZL6.js → FQY55PPT.js} +1 -1
- package/dist/cdn/GUYOWFTW.js +2 -0
- package/dist/cdn/HN5OI754.js +2 -0
- package/dist/cdn/{K2RCQ3S4.js → HTNECFCQ.js} +1 -1
- package/dist/cdn/{GDHU6FB7.js → HU4V2LGL.js} +1 -1
- package/dist/cdn/{5SWQQWAZ.js → IMENOON5.js} +1 -1
- package/dist/cdn/IYYLPWB4.js +2 -0
- package/dist/cdn/{6ECAKVHP.js → KKQWYK3S.js} +1 -1
- package/dist/cdn/{L3OVLVI3.js → LLRYOV3A.js} +1 -1
- package/dist/cdn/{DTRSQHPV.js → MV6B2G3T.js} +1 -1
- package/dist/cdn/{VQ7UIUFE.js → NOIIORU5.js} +1 -1
- package/dist/cdn/{CVNE57KC.js → NUXHWUHW.js} +1 -1
- package/dist/cdn/O5ZWXMTJ.js +2 -0
- package/dist/cdn/{WKA6U2M7.js → OYSW2K2B.js} +1 -1
- package/dist/cdn/{NVRFQSZB.js → ST5DXIZ6.js} +1 -1
- package/dist/cdn/{F7UR4A5G.js → U5G4PHA4.js} +1 -1
- package/dist/cdn/{6BESCJK6.js → XQ5BV7DL.js} +1 -1
- package/dist/cdn/{NGAZTR7Y.js → XWYXHSGO.js} +1 -1
- package/dist/cdn/{CQ7BRDZC.js → YACNPFYK.js} +1 -1
- package/dist/cdn/{G4QTXMBQ.js → ZO7ZJ52E.js} +1 -1
- package/dist/cdn/{7NFLP5PG.js → ZPSJEBD6.js} +1 -1
- package/dist/cdn/assets/features/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/time-slider/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/async-utils.js +63 -51
- package/dist/components/arcgis-aggregated-features/customElement.js +27 -23
- package/dist/components/arcgis-daylight/customElement.js +1 -1
- package/dist/components/arcgis-elevation-profile/customElement.d.ts +2 -3
- package/dist/components/arcgis-elevation-profile/customElement.js +1 -1
- package/dist/components/arcgis-elevation-profile-legend/customElement.js +20 -14
- package/dist/components/arcgis-features/customElement.js +99 -84
- package/dist/components/arcgis-time-of-day-slider/customElement.js +74 -46
- package/dist/components/arcgis-time-slider/customElement.d.ts +687 -352
- package/dist/components/arcgis-time-slider/customElement.js +678 -26
- package/dist/components/arcgis-time-slider/index.js +7 -0
- package/dist/components/arcgis-time-slider/types.d.ts +147 -0
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +24 -24
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +1 -1
- package/dist/components/arcgis-zoom/customElement.js +27 -33
- 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/loader.js +2 -2
- package/dist/types/lumina.d.ts +1 -2
- package/dist/types/preact.d.ts +1 -2
- package/dist/types/react.d.ts +1 -2
- package/dist/types/stencil.d.ts +1 -2
- package/package.json +4 -4
- package/dist/cdn/5UBX7NJZ.js +0 -2
- package/dist/cdn/7752ICPP.js +0 -2
- package/dist/cdn/K6DM6L64.js +0 -2
- package/dist/cdn/OZZ7CYLP.js +0 -2
- package/dist/cdn/PQSRQNWY.js +0 -2
- package/dist/cdn/V4RMKJUW.js +0 -2
- package/dist/cdn/VWL5JQZ4.js +0 -2
- package/dist/cdn/XUYGLABO.js +0 -2
|
@@ -1,83 +1,103 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
|
-
import type WebMap from "@arcgis/core/WebMap.js";
|
|
3
|
-
import type Collection from "@arcgis/core/core/Collection.js";
|
|
4
2
|
import type TimeExtent from "@arcgis/core/time/TimeExtent.js";
|
|
3
|
+
import type Collection from "@arcgis/core/core/Collection.js";
|
|
4
|
+
import type WebMap from "@arcgis/core/WebMap.js";
|
|
5
|
+
import type WebScene from "@arcgis/core/WebScene.js";
|
|
6
|
+
import type MapView from "@arcgis/core/views/MapView.js";
|
|
7
|
+
import type SceneView from "@arcgis/core/views/SceneView.js";
|
|
5
8
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
6
9
|
import type { ArcgisReferenceElement, IconName } from "../types.js";
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
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";
|
|
10
|
+
import type { Action, DateLabelFormatter, Layout, TickConfig, TimeSliderSettings, TriggerActionEvent, Mode, State, Stops } from "./types.js";
|
|
11
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
|
-
* The
|
|
14
|
+
* The `<arcgis-time-slider>` component provides interactive time selection and playback within a defined temporal extent.
|
|
16
15
|
*
|
|
17
16
|
* @since 4.28
|
|
18
17
|
*/
|
|
19
18
|
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
|
+
}>;
|
|
20
47
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
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.
|
|
48
|
+
* When defined, the actions will be displayed in an ellipsis button menu within the component.
|
|
49
|
+
* This property accepts a collection of actions.
|
|
50
|
+
* Each action is an object that must contain a unique `id`, a `title`, and an `icon`.
|
|
26
51
|
*
|
|
27
|
-
*
|
|
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.
|
|
52
|
+
* When an action is clicked, the component emits a [@arcgisTriggerAction](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#event-arcgisTriggerAction) event.
|
|
30
53
|
*
|
|
31
54
|
* [](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=widgets-timeslider-offset)
|
|
32
55
|
*
|
|
33
|
-
* @since 4.21
|
|
34
|
-
* @see [Sample - TimeSlider with offset](https://developers.arcgis.com/javascript/latest/sample-code/widgets-timeslider-offset/)
|
|
35
56
|
* @example
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
57
|
+
* ```html
|
|
58
|
+
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
59
|
+
* <arcgis-time-slider slot="top-right"></arcgis-time-slider>
|
|
60
|
+
* </arcgis-map>
|
|
61
|
+
* ```
|
|
62
|
+
* ```js
|
|
63
|
+
* <script type="module">
|
|
64
|
+
* const [TimeExtent, Collection, reactiveUtils] = await $arcgis.import([
|
|
65
|
+
* "@arcgis/core/time/TimeExtent.js",
|
|
66
|
+
* "@arcgis/core/core/Collection.js",
|
|
67
|
+
* "@arcgis/core/core/reactiveUtils.js",
|
|
68
|
+
* ]);
|
|
69
|
+
*
|
|
70
|
+
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
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
|
+
* }
|
|
50
95
|
* },
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
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
|
-
* });
|
|
96
|
+
* );
|
|
97
|
+
* </script>
|
|
98
|
+
* ```
|
|
79
99
|
*/
|
|
80
|
-
accessor actions: Collection<Action
|
|
100
|
+
accessor actions: Collection<Action> | undefined;
|
|
81
101
|
/**
|
|
82
102
|
* If true, the component will not be destroyed automatically when it is
|
|
83
103
|
* disconnected from the document. This is useful when you want to move the
|
|
@@ -93,46 +113,94 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
93
113
|
*
|
|
94
114
|
* @default false
|
|
95
115
|
* @example
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
116
|
+
* ```html
|
|
117
|
+
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
118
|
+
* <arcgis-time-slider slot="top-right" disabled></arcgis-time-slider>
|
|
119
|
+
* </arcgis-map>
|
|
120
|
+
* ```
|
|
121
|
+
* ```js
|
|
122
|
+
* <script type="module">
|
|
123
|
+
* const [TimeExtent] = await $arcgis.import([
|
|
124
|
+
* "@arcgis/core/time/TimeExtent.js",
|
|
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
|
+
* ```
|
|
105
138
|
*/
|
|
106
139
|
accessor disabled: boolean;
|
|
107
140
|
/**
|
|
108
|
-
*
|
|
141
|
+
* The dates that the time slider's handles will snap to when manipulated.
|
|
109
142
|
*
|
|
110
143
|
* @example
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
144
|
+
* ```html
|
|
145
|
+
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
146
|
+
* <arcgis-time-slider slot="top-right"></arcgis-time-slider>
|
|
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
|
+
* ```
|
|
114
176
|
*/
|
|
115
|
-
get effectiveStops():
|
|
177
|
+
get effectiveStops(): Date[] | null | undefined;
|
|
116
178
|
/**
|
|
117
|
-
* The temporal extent of the entire slider.
|
|
118
|
-
*
|
|
119
|
-
* your time aware data using the time slider component.
|
|
179
|
+
* The temporal extent of the entire slider. It defines the upper and lower bounds of the time slider and the range
|
|
180
|
+
* within which the thumbs can be manipulated.
|
|
120
181
|
*
|
|
121
182
|
* @example
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
183
|
+
* ```html
|
|
184
|
+
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
185
|
+
* <arcgis-time-slider slot="top-right"></arcgis-time-slider>
|
|
186
|
+
* </arcgis-map>
|
|
187
|
+
* ```
|
|
188
|
+
* ```js
|
|
189
|
+
* <script type="module">
|
|
190
|
+
* const [TimeExtent] = await $arcgis.import([
|
|
191
|
+
* "@arcgis/core/time/TimeExtent.js",
|
|
192
|
+
* ]);
|
|
193
|
+
*
|
|
194
|
+
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
195
|
+
* await timeSliderElement.componentOnReady();
|
|
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
|
+
* ```
|
|
136
204
|
*/
|
|
137
205
|
accessor fullTimeExtent: TimeExtent | null | undefined;
|
|
138
206
|
/**
|
|
@@ -140,95 +208,139 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
140
208
|
* Typically used when the component is controlled by another component (e.g. by the Expand component).
|
|
141
209
|
*
|
|
142
210
|
* @default "clock"
|
|
143
|
-
* @since 4.27
|
|
144
211
|
* @see [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/)
|
|
145
212
|
*/
|
|
146
|
-
|
|
147
|
-
|
|
213
|
+
accessor icon: IconName | undefined;
|
|
214
|
+
/** The component's default label. */
|
|
215
|
+
accessor label: string | undefined;
|
|
148
216
|
/**
|
|
149
|
-
*
|
|
217
|
+
* An optional callback function that can be used to customize the content of the minimum, maximum, and extent labels.
|
|
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.
|
|
150
220
|
*
|
|
151
|
-
* @
|
|
221
|
+
* @example
|
|
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
|
+
* ```
|
|
152
262
|
*/
|
|
153
|
-
accessor
|
|
263
|
+
accessor labelFormatFunction: DateLabelFormatter | undefined;
|
|
154
264
|
/**
|
|
155
|
-
*
|
|
265
|
+
* Defines the layout of the component. The layout determines the orientation of the component elements and how much space they consume.
|
|
156
266
|
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
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. |
|
|
267
|
+
* There are main layouts, "compact" and "wide", and an "auto" layout that switches between the two based on the component's width.
|
|
268
|
+
* The "compact" layout stacks the elements vertically and is better suited for narrow widths, while the "wide"
|
|
269
|
+
* layout arranges the elements laterally and is better for wider applications.
|
|
163
270
|
*
|
|
164
271
|
* @default "auto"
|
|
165
|
-
* @
|
|
166
|
-
*
|
|
272
|
+
* @example
|
|
273
|
+
* Explicitly set the layout to "wide".
|
|
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
|
+
* ```
|
|
167
279
|
*/
|
|
168
|
-
accessor layout:
|
|
280
|
+
accessor layout: Layout;
|
|
169
281
|
/**
|
|
170
|
-
* When `true`,
|
|
282
|
+
* When `true`, time slider will restart from the beginning when it reaches the end of the slider when playing.
|
|
171
283
|
*
|
|
172
284
|
* @default false
|
|
173
285
|
* @example
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
* loop
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* timeSlider.play();
|
|
286
|
+
* Set the time slider to loop continuously while playing.
|
|
287
|
+
* ```html
|
|
288
|
+
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
289
|
+
* <arcgis-time-slider slot="top-right" loop></arcgis-time-slider>
|
|
290
|
+
* </arcgis-map>
|
|
291
|
+
* ```
|
|
181
292
|
*/
|
|
182
293
|
accessor loop: boolean;
|
|
183
294
|
/**
|
|
184
|
-
*
|
|
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.
|
|
295
|
+
* Replace localized message strings with your own strings.
|
|
187
296
|
*
|
|
188
|
-
*
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
297
|
+
* _**Note**: Individual message keys may change between releases._
|
|
298
|
+
*/
|
|
299
|
+
accessor messageOverrides: {
|
|
300
|
+
componentLabel?: string | undefined;
|
|
301
|
+
control?: {
|
|
302
|
+
play?: string | undefined;
|
|
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.
|
|
194
316
|
*
|
|
195
317
|
* @default "time-window"
|
|
196
|
-
* @see [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent)
|
|
197
318
|
* @example
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
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
|
-
* });
|
|
319
|
+
* Set the mode to "instant" to show temporal data that falls on a single instance in time.
|
|
320
|
+
* ```html
|
|
321
|
+
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
322
|
+
* <arcgis-time-slider slot="top-right" mode="instant"></arcgis-time-slider>
|
|
323
|
+
* </arcgis-map>
|
|
324
|
+
* ```
|
|
212
325
|
*/
|
|
213
|
-
accessor mode:
|
|
326
|
+
accessor mode: Mode;
|
|
214
327
|
/**
|
|
215
|
-
*
|
|
328
|
+
* When `arcgis-time-slider` is playing, the play rate determines the interval (in milliseconds) between animation steps.
|
|
216
329
|
*
|
|
217
330
|
* > [!WARNING]
|
|
218
331
|
* >
|
|
219
|
-
* > When
|
|
220
|
-
* >
|
|
221
|
-
* >
|
|
332
|
+
* > When `arcgis-time-slider` is associated with a `arcgis-map` or `argis-scene` component, the actual playback rate may differ.
|
|
333
|
+
* > Specifically, the current time extent will only advance after the designated play rate interval and after the view has finished updating.
|
|
334
|
+
* > This means that if the view takes longer to update than the specified play rate, the effective play rate will be slower than expected.
|
|
222
335
|
*
|
|
223
336
|
* @default 1000
|
|
224
337
|
* @example
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
* timeSlider.play();
|
|
338
|
+
* Set the play rate to 500 milliseconds (half a second).
|
|
339
|
+
* ```html
|
|
340
|
+
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
341
|
+
* <arcgis-time-slider slot="top-right" play-rate="500"></arcgis-time-slider>
|
|
342
|
+
* </arcgis-map>
|
|
343
|
+
* ```
|
|
232
344
|
*/
|
|
233
345
|
accessor playRate: number;
|
|
234
346
|
/**
|
|
@@ -242,260 +354,483 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
242
354
|
*
|
|
243
355
|
* @default "disabled"
|
|
244
356
|
* @example
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
357
|
+
* The following snippet will log the time slider's state to the console whenever it changes.
|
|
358
|
+
* ```html
|
|
359
|
+
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
360
|
+
* <arcgis-time-slider slot="top-right"></arcgis-time-slider>
|
|
361
|
+
* </arcgis-map>
|
|
362
|
+
* ```
|
|
363
|
+
* ```js
|
|
364
|
+
* <script type="module">
|
|
365
|
+
* const [TimeExtent, reactiveUtils] = await $arcgis.import([
|
|
366
|
+
* "@arcgis/core/time/TimeExtent.js",
|
|
367
|
+
* "@arcgis/core/core/reactiveUtils.js",
|
|
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
|
+
* ```
|
|
257
385
|
*/
|
|
258
|
-
get state():
|
|
386
|
+
get state(): State;
|
|
259
387
|
/**
|
|
260
|
-
* Defines
|
|
261
|
-
* If unspecified, ten evenly spaced stops will be added.
|
|
388
|
+
* Defines the stops on the time slider. Stops are specific dates that the thumb, or thumbs, will snap to when manipulated.
|
|
262
389
|
*
|
|
263
|
-
*
|
|
390
|
+
* @default { count : 10 }
|
|
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.
|
|
264
394
|
* ```js
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
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.
|
|
395
|
+
* <script type="module">
|
|
396
|
+
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
397
|
+
* await timeSliderElement.componentOnReady();
|
|
274
398
|
*
|
|
399
|
+
* timeSliderElement.stops = {
|
|
400
|
+
* count: 10,
|
|
401
|
+
* };
|
|
402
|
+
* </script>
|
|
403
|
+
* ```
|
|
404
|
+
* @example
|
|
405
|
+
* To allow thumbs to be manipulated continuously without snapping to specific dates, set `stops` to `null`:
|
|
275
406
|
* ```js
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
* };
|
|
407
|
+
* <script type="module">
|
|
408
|
+
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
409
|
+
* await timeSliderElement.componentOnReady();
|
|
410
|
+
*
|
|
411
|
+
* timeSliderElement.stops = null;
|
|
412
|
+
* </script>
|
|
283
413
|
* ```
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* using the optional timeExtent property.
|
|
414
|
+
* @example
|
|
415
|
+
* To allow thumbs to snap to specific dates, assign an array of dates to a `dates` property as shown below.
|
|
287
416
|
* ```js
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
417
|
+
* <script type="module">
|
|
418
|
+
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
419
|
+
* await timeSliderElement.componentOnReady();
|
|
420
|
+
*
|
|
421
|
+
* timeSliderElement.stops = {
|
|
422
|
+
* dates: [
|
|
423
|
+
* new Date(2000, 0, 1), new Date(2001, 3, 8), new Date(2002, 0, 10),
|
|
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>
|
|
292
429
|
* ```
|
|
293
|
-
*
|
|
430
|
+
* @example
|
|
431
|
+
* To allow thumbs to snap at a regular interval, such as daily, month or yearly, assign a `TimeInterval` object to an `interval` property as shown below.
|
|
294
432
|
* ```js
|
|
295
|
-
*
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
*
|
|
433
|
+
* <script type="module">
|
|
434
|
+
* const [TimeInterval] = await $arcgis.import([
|
|
435
|
+
* "@arcgis/core/time/TimeInterval.js",
|
|
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>
|
|
448
|
+
* ```
|
|
449
|
+
* @example
|
|
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.
|
|
305
452
|
* ```js
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
453
|
+
* <script type="module">
|
|
454
|
+
* const [TimeExtent, TimeInterval] = await $arcgis.import([
|
|
455
|
+
* "@arcgis/core/time/TimeExtent.js",
|
|
456
|
+
* "@arcgis/core/time/TimeInterval.js",
|
|
457
|
+
* ]);
|
|
458
|
+
*
|
|
459
|
+
* const timeSliderElement = document.querySelector("arcgis-time-slider");
|
|
460
|
+
* await timeSliderElement.componentOnReady();
|
|
461
|
+
*
|
|
462
|
+
* // The time-slider will span the entire year of 2026.
|
|
463
|
+
* timeSliderElement.fullTimeExtent = new TimeExtent({
|
|
464
|
+
* start: new Date(2026, 0, 1),
|
|
465
|
+
* end: new Date(2027, 0, 1),
|
|
466
|
+
* });
|
|
467
|
+
*
|
|
468
|
+
* // However, the slider's thumbs will only snap to days within the month of April.
|
|
469
|
+
* timeSliderElement.stops = {
|
|
470
|
+
* interval: new TimeInterval({
|
|
471
|
+
* value: 1,
|
|
472
|
+
* unit: "days"
|
|
473
|
+
* }),
|
|
474
|
+
* timeExtent: new TimeExtent({
|
|
475
|
+
* start: new Date(2026, 3, 1),
|
|
476
|
+
* end: new Date(2026, 4, 1),
|
|
477
|
+
* }),
|
|
478
|
+
* };
|
|
479
|
+
* </script>
|
|
326
480
|
* ```
|
|
327
|
-
*
|
|
328
|
-
* @default { count : 10 }
|
|
329
481
|
*/
|
|
330
482
|
accessor stops: Stops | null | undefined;
|
|
331
483
|
/**
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
* on how to configure tick placement, style, and behavior.
|
|
484
|
+
* Use `tickConfigs` to define custom ticks on the time slider.
|
|
485
|
+
* Custom ticks can be used instead of the default ticks provided by the component.
|
|
335
486
|
*
|
|
336
|
-
* @since 4.16
|
|
337
487
|
* @example
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
488
|
+
* The following example adds labelled ticks representing the Northern Hemisphere seasons.
|
|
489
|
+
* ```html
|
|
490
|
+
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
491
|
+
* <arcgis-time-slider slot="top-left" mode="instant"></arcgis-time-slider>
|
|
492
|
+
* </arcgis-map>
|
|
493
|
+
* ```
|
|
494
|
+
* ```js
|
|
495
|
+
* <script type="module">
|
|
496
|
+
* const [TimeExtent] = await $arcgis.import([
|
|
497
|
+
* "@arcgis/core/time/TimeExtent.js",
|
|
498
|
+
* ]);
|
|
499
|
+
*
|
|
500
|
+
* // Define custom ticks with a label and date.
|
|
501
|
+
* interface Tick {
|
|
502
|
+
* label: string;
|
|
503
|
+
* date: Date;
|
|
504
|
+
* }
|
|
505
|
+
* const ticks: Tick[] = [
|
|
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,
|
|
356
545
|
* },
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
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
|
-
* }
|
|
546
|
+
* ];
|
|
547
|
+
* </script>
|
|
548
|
+
* ```
|
|
375
549
|
*/
|
|
376
|
-
accessor tickConfigs:
|
|
550
|
+
accessor tickConfigs: TickConfig[] | undefined;
|
|
377
551
|
/**
|
|
378
|
-
* The current time extent of the time slider.
|
|
379
|
-
*
|
|
380
|
-
*
|
|
552
|
+
* The current time extent of the time slider.
|
|
553
|
+
*
|
|
554
|
+
* When the `arcgis-time-slider` is associated with an `arcgis-map` or `arcgis-scene` component,
|
|
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.
|
|
381
562
|
*
|
|
382
|
-
*
|
|
383
|
-
* |
|
|
384
|
-
*
|
|
385
|
-
* | `
|
|
386
|
-
* | `
|
|
387
|
-
* | `cumulative-from-
|
|
563
|
+
*
|
|
564
|
+
* | Mode | Description | Example |
|
|
565
|
+
* |-------------------------|-------------------------------|---------------------------------------------------------------|
|
|
566
|
+
* | `time-window` | Non-null start and end dates | `{ start: new Date(2019, 2, 1), end: new Date(2019, 2, 28) }` |
|
|
567
|
+
* | `instant` | Identical start and end dates | `{ start: new Date(2019, 2, 1), end: new Date(2019, 2, 1) }` |
|
|
568
|
+
* | `cumulative-from-start` | `null` start date | `{ start: null, end: new Date(2019, 2, 28) }` |
|
|
569
|
+
* | `cumulative-from-end` | `null` end date | `{ start: new Date(2019, 2, 1), end: null }` |
|
|
388
570
|
*
|
|
389
571
|
* @example
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
*
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
*
|
|
397
|
-
*
|
|
398
|
-
*
|
|
399
|
-
*
|
|
400
|
-
*
|
|
401
|
-
*
|
|
402
|
-
*
|
|
572
|
+
* The `arcgis-time-slider` may be used indepentantly of an `arcgis-map` or `arcgis-scene` component.
|
|
573
|
+
* In the following example, the time slider does not reference an `arcgis-map` and is used to update a single layer's filter.
|
|
574
|
+
* ```html
|
|
575
|
+
* <arcgis-map basemap="dark-gray-vector" zoom="13" center="-117.512764, 34.04355"></arcgis-map>
|
|
576
|
+
* <arcgis-time-slider mode="time-window" play-rate="50"></arcgis-time-slider>
|
|
577
|
+
* ```
|
|
578
|
+
* ```js
|
|
579
|
+
* <script type="module">
|
|
580
|
+
* const [GeoJSONLayer, TimeInterval, reactiveUtils] = await $arcgis.import([
|
|
581
|
+
* "@arcgis/core/layers/GeoJSONLayer.js",
|
|
582
|
+
* "@arcgis/core/time/TimeInterval.js",
|
|
583
|
+
* "@arcgis/core/core/reactiveUtils.js",
|
|
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
|
+
* });
|
|
403
592
|
*
|
|
404
|
-
*
|
|
405
|
-
* ()
|
|
406
|
-
* (
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
* );
|
|
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
|
+
* };
|
|
607
|
+
*
|
|
608
|
+
* // Whenever the time slider's time extent changes, update the layer view's feature effect to highlight features
|
|
609
|
+
* // that fall within the current time extent and dim features that fall outside of it.
|
|
610
|
+
* reactiveUtils.watch(
|
|
611
|
+
* () => timeSlider.timeExtent,
|
|
612
|
+
* (timeExtent) => {
|
|
613
|
+
* layerView.featureEffect = {
|
|
614
|
+
* filter: { timeExtent },
|
|
615
|
+
* excludedEffect: "grayscale(20%) opacity(12%)",
|
|
616
|
+
* };
|
|
617
|
+
* }
|
|
618
|
+
* );
|
|
619
|
+
* ```
|
|
410
620
|
*/
|
|
411
621
|
accessor timeExtent: TimeExtent | null | undefined;
|
|
412
622
|
/**
|
|
413
|
-
*
|
|
623
|
+
* If `true`, the time component of dates is displayed in the minimum, maximum, and time extent labels.
|
|
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.
|
|
414
625
|
*
|
|
415
626
|
* @default false
|
|
416
627
|
* @example
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
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
|
-
* });
|
|
628
|
+
* ```html
|
|
629
|
+
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
630
|
+
* <arcgis-time-slider slot="top-left" time-visible></arcgis-time-slider>
|
|
631
|
+
* </arcgis-map>
|
|
632
|
+
* ```
|
|
431
633
|
*/
|
|
432
634
|
accessor timeVisible: boolean;
|
|
433
635
|
/**
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
636
|
+
* The `arcgis-time-slider` component will display dates and times in the time zone specified by this property.
|
|
637
|
+
* By default, the time zone is inherited from an associated `arcgis-map` or `arcgis-scene` component's view.
|
|
638
|
+
* If there is no associated view, the time zone will default to `"system"`, the device's time zone.
|
|
437
639
|
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
* @
|
|
640
|
+
* @example
|
|
641
|
+
* To specify a particular time zone, assign a valid IANA time zone string to the `time-zone` property as shown below.
|
|
642
|
+
* ```html
|
|
643
|
+
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
644
|
+
* <arcgis-time-slider slot="top-left" time-zone="Pacific/Auckland"></arcgis-time-slider>
|
|
645
|
+
* </arcgis-map>
|
|
646
|
+
* ```
|
|
647
|
+
* @see [wikipedia - List of tz database time zones](https://wikipedia.org/wiki/List_of_tz_database_time_zones)
|
|
648
|
+
* @see [arcgis-map.timeZone](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#timeZone)
|
|
649
|
+
* @see [MapView#timeZone](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone)
|
|
447
650
|
*/
|
|
448
|
-
accessor timeZone: string;
|
|
651
|
+
accessor timeZone: string | undefined;
|
|
449
652
|
/**
|
|
450
653
|
* The view associated with the component.
|
|
451
654
|
* > **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.
|
|
452
663
|
*
|
|
664
|
+
* @param settings
|
|
453
665
|
* @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
|
+
* ```
|
|
454
673
|
* ```js
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
*
|
|
466
|
-
* end: new Date(2000, 0, 1)
|
|
467
|
-
* }
|
|
468
|
-
* });
|
|
469
|
-
* view.ui.add(timeSlider, "top-left");
|
|
674
|
+
* <script type="module">
|
|
675
|
+
* const [timeUtils] = await $arcgis.import([
|
|
676
|
+
* "@arcgis/core/support/timeUtils.js",
|
|
677
|
+
* ]);
|
|
678
|
+
*
|
|
679
|
+
* const webMap = new WebMap({
|
|
680
|
+
* portalItem: {
|
|
681
|
+
* id: "your-webmap-id",
|
|
682
|
+
* }
|
|
683
|
+
* });
|
|
684
|
+
* await webMap.load();
|
|
470
685
|
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
* (
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
*
|
|
686
|
+
* const timeSliderSettings = await timeUtils.getTimeSliderSettingsFromWebDocument(webMap);
|
|
687
|
+
*
|
|
688
|
+
* const timeSlider = document.querySelector("arcgis-time-slider");
|
|
689
|
+
* await timeSlider.componentOnReady();
|
|
690
|
+
* timeSlider.applyTimeSliderSettings(timeSliderSettings);
|
|
691
|
+
* </script>
|
|
477
692
|
* ```
|
|
478
693
|
*/
|
|
479
|
-
accessor view: MapViewOrSceneView | null | undefined;
|
|
480
|
-
/** @param settings */
|
|
481
694
|
applyTimeSliderSettings(settings: TimeSliderSettings): Promise<void>;
|
|
482
695
|
/** Permanently destroy the component. */
|
|
483
696
|
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
|
+
*/
|
|
484
720
|
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
|
+
*/
|
|
485
749
|
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
|
+
*/
|
|
486
773
|
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
|
+
*/
|
|
487
797
|
stop(): Promise<void>;
|
|
488
|
-
/**
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
798
|
+
/**
|
|
799
|
+
* Updates the time slider definition in the parsed web document.
|
|
800
|
+
*
|
|
801
|
+
* @param document
|
|
802
|
+
* @example
|
|
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>;
|
|
493
828
|
/** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
|
|
494
|
-
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "
|
|
829
|
+
readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "state"; }>;
|
|
495
830
|
/** Emitted when the component associated with a map or scene view is ready to be interacted with. */
|
|
496
831
|
readonly arcgisReady: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
497
832
|
/** Emitted when an action is triggered on the component. */
|
|
498
|
-
readonly arcgisTriggerAction: import("@arcgis/lumina").TargetedEvent<this,
|
|
833
|
+
readonly arcgisTriggerAction: import("@arcgis/lumina").TargetedEvent<this, TriggerActionEvent>;
|
|
499
834
|
readonly "@eventTypes": {
|
|
500
835
|
arcgisPropertyChange: ArcgisTimeSlider["arcgisPropertyChange"]["detail"];
|
|
501
836
|
arcgisReady: ArcgisTimeSlider["arcgisReady"]["detail"];
|