Package com.esri.arcgisruntime.ogc.kml
Class KmlTourController
- java.lang.Object
-
- com.esri.arcgisruntime.ogc.kml.KmlTourController
-
-
Constructor Summary
Constructors Constructor Description KmlTourController()
Constructs a KmlTourController.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addCurrentPositionChangedListener(KmlTourCurrentPositionChangedListener listener)
Adds a current position changed listener to the controller.void
addTotalDurationChangedListener(KmlTourTotalDurationChangedListener listener)
Adds a total duration changed listener to the controller.double
getCurrentPosition()
Gets the current position of the KML tour.double
getTotalDuration()
Gets the total duration of the KML tour.KmlTour
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
removeCurrentChangedListener(KmlTourCurrentPositionChangedListener listener)
Deprecated, for removal: This API element is subject to removal in a future version.since 100.14.0.boolean
removeCurrentPositionChangedListener(KmlTourCurrentPositionChangedListener listener)
Removes a current position changed listener from the controller.boolean
removeTotalDurationChangedListener(KmlTourTotalDurationChangedListener listener)
Removes a total duration changed listener from the controller.void
reset()
Resets the execution of the KML tour to the beginning.void
setTour(KmlTour kmlTour)
Sets the KML tour on the controller and initializes it.
-
-
-
Method Detail
-
getTour
public KmlTour getTour()
Gets the KML tour associated with the controller.- Returns:
- the KmlTour object
- Since:
- 100.5.0
-
setTour
public void setTour(KmlTour kmlTour)
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:
KmlTourStatus
-
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
public void addTotalDurationChangedListener(KmlTourTotalDurationChangedListener listener)
Adds a total duration changed listener to the controller.- Parameters:
listener
- the listener- Throws:
IllegalArgumentException
- if listener is null- Since:
- 100.5.0
-
removeTotalDurationChangedListener
public boolean removeTotalDurationChangedListener(KmlTourTotalDurationChangedListener listener)
Removes a total duration changed listener from the controller.- Parameters:
listener
- the listener- Returns:
- true, if successful
- Since:
- 100.5.0
-
addCurrentPositionChangedListener
public void addCurrentPositionChangedListener(KmlTourCurrentPositionChangedListener listener)
Adds a current position changed listener to the controller.- Parameters:
listener
- the listener- Throws:
IllegalArgumentException
- if listener is null- Since:
- 100.6.0
-
removeCurrentPositionChangedListener
public boolean removeCurrentPositionChangedListener(KmlTourCurrentPositionChangedListener listener)
Removes a current position changed listener from the controller.- Parameters:
listener
- the listener- Returns:
- true, if successful
- Since:
- 100.14.0
-
removeCurrentChangedListener
@Deprecated(since="100.14.0", forRemoval=true) public boolean removeCurrentChangedListener(KmlTourCurrentPositionChangedListener listener)
Deprecated, for removal: This API element is subject to removal in a future version.since 100.14.0. UseremoveCurrentPositionChangedListener(KmlTourCurrentPositionChangedListener)
instead.Removes a current position changed listener from the controller.- Parameters:
listener
- the listener- Returns:
- true, if successful
- Since:
- 100.6.0
-
-