java.lang.Object
com.esri.arcgisruntime.ogc.kml.KmlTourController
Controls the execution of a KML tour on a SceneView.
Use it to play, pause or reset a KmlTour
, and play sound cues or show/hide balloon popup as
specified in a KML tour.
- Since:
- 100.5.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a current position changed listener to the controller.void
Adds a total duration changed listener to the controller.double
Gets the current position of the KML tour.double
Gets the total duration of the KML tour.getTour()
Gets the KML tour associated with the controller.void
pause()
Pauses the execution of the KML tour.void
play()
Starts or resumes playing of the KML tour, which may include audio contents.boolean
Removes a current position changed listener from the controller.boolean
Removes a total duration changed listener from the controller.void
reset()
Resets the execution of the KML tour to the beginning.void
Sets the KML tour on the controller and initializes it.
-
Constructor Details
-
KmlTourController
public KmlTourController()Constructs a KmlTourController.- Since:
- 100.5.0
-
-
Method Details
-
getTour
Gets the KML tour associated with the controller.- Returns:
- the KmlTour object
- Since:
- 100.5.0
-
setTour
Sets the KML tour on the controller and initializes it.The KmlTour status becomes
KmlTourStatus.INITIALIZED
after it is set to a controller. To play the tour, the KmlLayer that the KmlTour is obtained from needs to be visible on a SceneView. If a new KmlTour is set on the controller while a previous KML Tour is playing, the previous execution is aborted and its status goes back toKmlTourStatus.NOT_INITIALIZED
.- Parameters:
kmlTour
- the KML tour, or null to reset the controller- Since:
- 100.5.0
- See Also:
-
getTotalDuration
public double getTotalDuration()Gets the total duration of the KML tour.- Returns:
- the total duration in seconds, or zero if the tour is null
- Since:
- 100.5.0
-
getCurrentPosition
public double getCurrentPosition()Gets the current position of the KML tour.- Returns:
- the current position of the tour in seconds
- Since:
- 100.6.0
-
play
public void play()Starts or resumes playing of the KML tour, which may include audio contents.- Since:
- 100.5.0
-
pause
public void pause()Pauses the execution of the KML tour.- Since:
- 100.5.0
-
reset
public void reset()Resets the execution of the KML tour to the beginning.Use this to reset the tour to the beginning, which includes resetting any KML content to its original state before the tour was played.
- Since:
- 100.5.0
-
addTotalDurationChangedListener
Adds a total duration changed listener to the controller.- Parameters:
listener
- the listener- Throws:
IllegalArgumentException
- if listener is null- Since:
- 100.5.0
-
removeTotalDurationChangedListener
Removes a total duration changed listener from the controller.- Parameters:
listener
- the listener- Returns:
- true, if successful
- Since:
- 100.5.0
-
addCurrentPositionChangedListener
Adds a current position changed listener to the controller.- Parameters:
listener
- the listener- Throws:
IllegalArgumentException
- if listener is null- Since:
- 100.6.0
-
removeCurrentPositionChangedListener
Removes a current position changed listener from the controller.- Parameters:
listener
- the listener- Returns:
- true, if successful
- Since:
- 100.14.0
-