Interface Player
- Summary
- Methods
- openPanorama
- openUserPanoramaWithLocalDataSource
- openUserPanoramaWithNetworkDataSource
- panoramaId
- position
- lookAt
- direction
- setDirection
- span
- setSpan
- reset
- historicalPanoramas
- enableZoom
- disableZoom
- zoomEnabled
- enableMove
- disableMove
- moveEnabled
- enableRotation
- disableRotation
- rotationEnabled
- enableMarkers
- disableMarkers
- markersEnabled
- enableCompanies
- disableCompanies
- companiesEnabled
- addPanoramaChangeListener
- removePanoramaChangeListener
- addDirectionChangeListener
- removeDirectionChangeListener
- addSpanChangeListener
- removeSpanChangeListener
- addCompanyTapListener
- removeCompanyTapListener
- addErrorListener
- removeErrorListener
- enableLoadingWheel
- disableLoadingWheel
- loadingWheelEnabled
- getLogo
- onMemoryWarning
- isValid
Warning
This feature is available in the Full MapKit SDK version
Package world.mappable.mapkit.places.panorama
interface Player
Panorama player that is used to open panoramas.
Summary
Methods
Type and modifiers |
Method and Description |
void |
openPanorama(@NonNull java.lang.String panoramaId) |
void |
openUserPanoramaWithLocalDataSource(@NonNull PanoramaDescription panoramaDescription, |
void |
openUserPanoramaWithNetworkDataSource(@NonNull PanoramaDescription panoramaDescription, |
java.lang.String |
panoramaId() |
position() |
|
void |
lookAt(@NonNull Point position) |
direction() |
|
void |
setDirection(@NonNull Direction direction) |
span() |
|
void |
|
void |
reset() |
java.util.List<HistoricalPanorama> |
|
void |
enableZoom() |
void |
disableZoom() |
boolean |
zoomEnabled() |
void |
enableMove() |
void |
disableMove() |
boolean |
moveEnabled() |
void |
enableRotation() |
void |
disableRotation() |
boolean |
rotationEnabled() |
void |
enableMarkers() |
void |
disableMarkers() |
boolean |
markersEnabled() |
void |
enableCompanies() |
void |
disableCompanies() |
boolean |
companiesEnabled() |
void |
addPanoramaChangeListener(@NonNull PanoramaChangeListener panoramaChangeListener) |
void |
removePanoramaChangeListener(@NonNull PanoramaChangeListener panoramaChangeListener) |
void |
addDirectionChangeListener(@NonNull DirectionChangeListener directionChangeListener) |
void |
removeDirectionChangeListener(@NonNull DirectionChangeListener directionChangeListener) |
void |
addSpanChangeListener(@NonNull SpanChangeListener spanChangeListener) |
void |
removeSpanChangeListener(@NonNull SpanChangeListener spanChangeListener) |
void |
addCompanyTapListener(@NonNull CompanyTapListener companyTapListener) |
void |
removeCompanyTapListener(@NonNull CompanyTapListener companyTapListener) |
void |
addErrorListener(@NonNull ErrorListener errorListener) |
void |
removeErrorListener(@NonNull ErrorListener errorListener) |
void |
enableLoadingWheel() |
void |
disableLoadingWheel() |
boolean |
loadingWheelEnabled() |
getLogo() |
|
void |
onMemoryWarning() |
boolean |
isValid() |
Methods
openPanorama
void openPanorama(@NonNull java.lang.String panoramaId) |
Opens the panorama with the given ID.
Parameters |
|
|
The panoramaId that specifies the panorama to open. You can get the panoramaId by using the PanoramaService methods. |
openUserPanoramaWithLocalDataSource
void openUserPanoramaWithLocalDataSource(@NonNull PanoramaDescription panoramaDescription, |
Opens the panorama from the local datasource.
The class maintains a strong reference to the object in the 'tileImageProvider' parameter until it (the class) is invalidated.
The class maintains a strong reference to the object in the 'iconImageProvider' parameter until it (the class) is invalidated.
The class does not retain the object in the 'userPanoramaEventListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
Parameters |
|
|
Initialize this struct to open panorama |
|
The tile datasource |
|
The icon datasource |
|
The user panorama notification listener |
openUserPanoramaWithNetworkDataSource
void openUserPanoramaWithNetworkDataSource(@NonNull PanoramaDescription panoramaDescription, |
Opens the panorama from the network datasource.
The class maintains a strong reference to the object in the 'tileUrlProvider' parameter until it (the class) is invalidated.
The class maintains a strong reference to the object in the 'iconUrlProvider' parameter until it (the class) is invalidated.
The class does not retain the object in the 'userPanoramaEventListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
Parameters |
|
|
Initialize this struct to open panorama |
|
The network tile datasource |
|
The netwokr icon datasource |
|
The user panorama notification listener |
panoramaId
@NonNull |
Opened the panorama with the given ID.
Returns |
PanoramaId of the currently opened panorama. Empty if no panorama is open. |
position
@NonNull |
Geo position of current panorama.
Returns |
Geo position of the currently opened panorama. Empty if no panorama is open. |
lookAt
void lookAt(@NonNull Point position) |
Sets the view direction to the center of the given geo position.
Parameters |
|
|
The position to look at. |
direction
@NonNull |
View direction of the opened panorama.
Returns |
View direction of the opened panorama. Empty if no panorama is open. |
setDirection
void setDirection(@NonNull Direction direction) |
Sets the view direction bearing and tilt.
Parameters |
|
|
View direction. |
span
@NonNull |
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. |
setSpan
void setSpan(@NonNull Span span) |
Sets the view area span.
Invalid values are adjusted by the player to the closest valid values.
Parameters |
|
|
View area span. May be adjusted by the player. |
reset
void reset() |
Closes the opened panorama and stops all player actions.
historicalPanoramas
@NonNull |
Returns |
panoramas published earlier at the current panorama position. Result is updated on the mapkit.places.panorama.PanoramaChangeListener callback |
enableZoom
void enableZoom() |
Enables player zoom controls.
disableZoom
void disableZoom() |
Disables player zoom controls.
zoomEnabled
boolean zoomEnabled() |
Checks if zoom controls are enabled.
enableMove
void enableMove() |
Shows transition arrows and allows switching panoramas.
disableMove
void disableMove() |
Hides transition arrows and disallows switching panoramas.
moveEnabled
boolean moveEnabled() |
Checks if switching panoramas is enabled.
enableRotation
void enableRotation() |
Allows the user to rotate panoramas.
disableRotation
void disableRotation() |
Disallows the user to rotate panoramas.
rotationEnabled
boolean rotationEnabled() |
Checks if player rotation is enabled.
enableMarkers
void enableMarkers() |
Allows markers (house numbers, railway stations, airports) to be shown.
disableMarkers
void disableMarkers() |
Disallows markers (house numbers, railway stations, airports) to be shown.
markersEnabled
boolean markersEnabled() |
Checks if markers are enabled.
enableCompanies
void enableCompanies() |
Allows companies (company names and icons) to be shown.
disableCompanies
void disableCompanies() |
Disallows companies (company names and icons) to be shown.
companiesEnabled
boolean companiesEnabled() |
Checks if companies are enabled.
addPanoramaChangeListener
void addPanoramaChangeListener(@NonNull PanoramaChangeListener panoramaChangeListener) |
Adds a panorama change listener.
The class does not retain the object in the 'panoramaChangeListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
Parameters |
|
|
Panorama change listener. |
removePanoramaChangeListener
void removePanoramaChangeListener(@NonNull PanoramaChangeListener panoramaChangeListener) |
Removes the panorama change listener.
Parameters |
|
|
The panorama change listener to remove. |
addDirectionChangeListener
void addDirectionChangeListener(@NonNull DirectionChangeListener directionChangeListener) |
Adds direction listener.
The class does not retain the object in the 'directionChangeListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
Parameters |
|
|
Panorama direction listener. |
removeDirectionChangeListener
void removeDirectionChangeListener(@NonNull DirectionChangeListener directionChangeListener) |
Removes the direction listener.
Parameters |
|
|
The panorama direction listener to remove. |
addSpanChangeListener
void addSpanChangeListener(@NonNull SpanChangeListener spanChangeListener) |
Adds span listener.
The class does not retain the object in the 'spanChangeListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
Parameters |
|
|
Panorama span listener. |
removeSpanChangeListener
void removeSpanChangeListener(@NonNull SpanChangeListener spanChangeListener) |
Removes span listener.
Parameters |
|
|
The span listener to remove. |
addCompanyTapListener
void addCompanyTapListener(@NonNull CompanyTapListener companyTapListener) |
Adds company tap listener.
The class does not retain the object in the 'companyTapListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
Parameters |
|
|
Company tap listener. |
removeCompanyTapListener
void removeCompanyTapListener(@NonNull CompanyTapListener companyTapListener) |
Removes company tap listener.
Parameters |
|
|
The company tap listener to remove. |
addErrorListener
void addErrorListener(@NonNull ErrorListener errorListener) |
Adds error listener.
The class does not retain the object in the 'errorListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
Parameters |
|
|
Listeners that notify when a panorama failed to open. |
removeErrorListener
void removeErrorListener(@NonNull ErrorListener errorListener) |
Removes error listener.
Parameters |
|
|
The listener to remove. |
enableLoadingWheel
void enableLoadingWheel() |
Allows showing loading wheels.
disableLoadingWheel
void disableLoadingWheel() |
Disallows showing loading wheels.
loadingWheelEnabled
boolean loadingWheelEnabled() |
Checks if loading wheels can be shown while the panorama is opening.
getLogo
@NonNull |
Mappable logo object.
onMemoryWarning
void onMemoryWarning() |
Called when a memory warning happens.
isValid
boolean isValid() |
Tells if this Player is valid or not.
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.