Interface Player
com.yandex.mapkit.panorama
public interface Player
Methods
void | addDirectionChangeListener( DirectionChangeListener directionChangeListener) | Adds direction listener. |
void | addErrorListener( ErrorListener errorListener) | Adds error listener. |
void | addPanoramaChangeListener( PanoramaChangeListener panoramaChangeListener) | Adds a panorama change listener. |
void | addSpanChangeListener( SpanChangeListener spanChangeListener) | Adds span listener. |
Direction | direction() | View direction of the opened panorama. |
void | disableLoadingWheel() | Disallows showing loading wheels. |
void | disableMarkers() | Disallows markers (house numbers, railway stations, airports) to be shown. |
void | disableMove() | Hides transition arrows and disallows switching panoramas. |
void | disableRotation() | Disallows the user to rotate panoramas. |
void | disableZoom() | Disables player zoom controls. |
void | enableLoadingWheel() | Allows showing loading wheels. |
void | enableMarkers() | Allows markers (house numbers, railway stations, airports) to be shown. |
void | enableMove() | Shows transition arrows and allows switching panoramas. |
void | enableRotation() | Allows the user to rotate panoramas. |
void | enableZoom() | Enables player zoom controls. |
Logo | getLogo() | Yandex logo object. |
boolean | isValid() | Tells if this Player is valid or no. |
boolean | loadingWheelEnabled() | Checks if loading wheels can be shown while the panorama is opening. |
void | lookAt( Point position) | Sets the view direction to the center of the given geo position. |
boolean | markersEnabled() | Checks if markers are enabled. |
boolean | moveEnabled() | Checks if switching panoramas is enabled. |
void | onMemoryWarning() | Called when a memory warning happens. |
void | openPanorama(String panoramaId) | Opens the panorama with the given ID. |
String | panoramaId() | Opened the panorama with the given ID. |
Point | position() | Geo position of current panorama. |
void | removeDirectionChangeListener( DirectionChangeListener directionChangeListener) | |
void | removeErrorListener( ErrorListener errorListener) | |
void | removePanoramaChangeListener( PanoramaChangeListener panoramaChangeListener) | |
void | removeSpanChangeListener( SpanChangeListener spanChangeListener) | |
void | reset() | Closes the opened panorama and stops all player actions. |
boolean | rotationEnabled() | Checks if player rotation is enabled. |
void | setDirection( Direction direction) | Sets the view direction bearing and tilt. |
void | setSpan( Span span) | Sets the view area span. |
Span | span() | View span of the opened panorama. |
boolean | zoomEnabled() | Checks if zoom controls are enabled. |
void | addDirectionChangeListener( DirectionChangeListener directionChangeListener) | Adds direction listener. |
void | addErrorListener( ErrorListener errorListener) | Adds error listener. |
void | addPanoramaChangeListener( PanoramaChangeListener panoramaChangeListener) | Adds a panorama change listener. |
void | addSpanChangeListener( SpanChangeListener spanChangeListener) | Adds span listener. |
Direction | direction() | View direction of the opened panorama. |
void | disableLoadingWheel() | Disallows showing loading wheels. |
void | disableMarkers() | Disallows markers (house numbers, railway stations, airports) to be shown. |
void | disableMove() | Hides transition arrows and disallows switching panoramas. |
void | disableRotation() | Disallows the user to rotate panoramas. |
void | disableZoom() | Disables player zoom controls. |
void | enableLoadingWheel() | Allows showing loading wheels. |
void | enableMarkers() | Allows markers (house numbers, railway stations, airports) to be shown. |
void | enableMove() | Shows transition arrows and allows switching panoramas. |
void | enableRotation() | Allows the user to rotate panoramas. |
void | enableZoom() | Enables player zoom controls. |
Logo | getLogo() | Yandex logo object. |
boolean | isValid() | Tells if this Player is valid or no. |
boolean | loadingWheelEnabled() | Checks if loading wheels can be shown while the panorama is opening. |
void | lookAt( Point position) | Sets the view direction to the center of the given geo position. |
boolean | markersEnabled() | Checks if markers are enabled. |
boolean | moveEnabled() | Checks if switching panoramas is enabled. |
void | onMemoryWarning() | Called when a memory warning happens. |
void | openPanorama(String panoramaId) | Opens the panorama with the given ID. |
String | panoramaId() | Opened the panorama with the given ID. |
Point | position() | Geo position of current panorama. |
void | removeDirectionChangeListener( DirectionChangeListener directionChangeListener) | |
void | removeErrorListener( ErrorListener errorListener) | |
void | removePanoramaChangeListener( PanoramaChangeListener panoramaChangeListener) | |
void | removeSpanChangeListener( SpanChangeListener spanChangeListener) | |
void | reset() | Closes the opened panorama and stops all player actions. |
boolean | rotationEnabled() | Checks if player rotation is enabled. |
void | setDirection( Direction direction) | Sets the view direction bearing and tilt. |
void | setSpan( Span span) | Sets the view area span. |
Span | span() | View span of the opened panorama. |
boolean | zoomEnabled() | Checks if zoom controls are enabled. |
Method Detail
addDirectionChangeListener
public void addDirectionChangeListener (DirectionChangeListener directionChangeListener)
Adds direction listener.
directionChangeListener | Panorama direction listener. |
directionChangeListener | Panorama direction listener. |
addErrorListener
public void addErrorListener (ErrorListener errorListener)
Adds error listener.
errorListener | Listeners that notify when a panorama failed to open. |
errorListener | Listeners that notify when a panorama failed to open. |
addPanoramaChangeListener
public void addPanoramaChangeListener (PanoramaChangeListener panoramaChangeListener)
Adds a panorama change listener.
panoramaChangeListener | Panorama change listener. |
panoramaChangeListener | Panorama change listener. |
addSpanChangeListener
public void addSpanChangeListener (SpanChangeListener spanChangeListener)
Adds span listener.
spanChangeListener | Panorama span listener. |
spanChangeListener | Panorama span listener. |
direction
public Direction direction ()
View direction of the opened panorama.
Returns:
View direction of the opened panorama. Empty if no panorama is open.
disableLoadingWheel
public void disableLoadingWheel ()
Disallows showing loading wheels.
disableMarkers
public void disableMarkers ()
Disallows markers (house numbers, railway stations, airports) to be shown.
disableMove
public void disableMove ()
Hides transition arrows and disallows switching panoramas.
disableRotation
public void disableRotation ()
Disallows the user to rotate panoramas.
disableZoom
public void disableZoom ()
Disables player zoom controls.
enableLoadingWheel
public void enableLoadingWheel ()
Allows showing loading wheels.
enableMarkers
public void enableMarkers ()
Allows markers (house numbers, railway stations, airports) to be shown.
enableMove
public void enableMove ()
Shows transition arrows and allows switching panoramas.
enableRotation
public void enableRotation ()
Allows the user to rotate panoramas.
enableZoom
public void enableZoom ()
Enables player zoom controls.
getLogo
public Logo getLogo ()
Yandex logo object.
isValid
public boolean isValid ()
Tells if this Player is valid or no.
Any other method (except for this one) called on an invalid Player will throw java.lang.RuntimeException. An instance becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.loadingWheelEnabled
public boolean loadingWheelEnabled ()
Checks if loading wheels can be shown while the panorama is opening.
lookAt
public void lookAt (Point position)
Sets the view direction to the center of the given geo position.
position | The position to look at. |
position | The position to look at. |
markersEnabled
public boolean markersEnabled ()
Checks if markers are enabled.
moveEnabled
public boolean moveEnabled ()
Checks if switching panoramas is enabled.
onMemoryWarning
public void onMemoryWarning ()
Called when a memory warning happens.
openPanorama
public void openPanorama (String panoramaId)
Opens the panorama with the given ID.
panoramaId | The panoramaId that specifies the panorama to open. You can get the panoramaId by using the PanoramaService methods. |
panoramaId | The panoramaId that specifies the panorama to open. You can get the panoramaId by using the PanoramaService methods. |
panoramaId
public String panoramaId ()
Opened the panorama with the given ID.
Returns:
PanoramaId of the currently opened panorama. Empty if no panorama is open.
position
public Point position ()
Geo position of current panorama.
Returns:
Geo position of the currently opened panorama. Empty if no panorama is open.
removeDirectionChangeListener
public void removeDirectionChangeListener (DirectionChangeListener directionChangeListener)
removeErrorListener
public void removeErrorListener (ErrorListener errorListener)
removePanoramaChangeListener
public void removePanoramaChangeListener (PanoramaChangeListener panoramaChangeListener)
removeSpanChangeListener
public void removeSpanChangeListener (SpanChangeListener spanChangeListener)
reset
public void reset ()
Closes the opened panorama and stops all player actions.
rotationEnabled
public boolean rotationEnabled ()
Checks if player rotation is enabled.
setDirection
public void setDirection (Direction direction)
Sets the view direction bearing and tilt.
direction | View direction. |
direction | View direction. |
setSpan
public void setSpan (Span span)
Sets the view area span.
Invalid values are adjusted by the player to the closest valid values.span | View area span. May be adjusted by the player. |
span | View area span. May be adjusted by the player. |
span
public Span span ()
View span of the opened panorama.
Returns:
Current view span of the opened panorama. May be different from the span provided by the setSpan(span) method.
zoomEnabled
public boolean zoomEnabled ()
Checks if zoom controls are enabled.