- Summary
- Instance methods
- openPanorama(withPanoramaId:)
- openUserPanoramaWithLocalDataSource(with:tileImageProvider:iconImageProvider:userPanoramaEventListener:)
- openUserPanoramaWithNetworkDataSource(with:tileUrlProvider:iconUrlProvider:userPanoramaEventListener:)
- panoramaId()
- position()
- lookAt(withPosition:)
- direction()
- setDirectionWith(_:)
- span()
- setSpanWith(_:)
- reset()
- historicalPanoramas()
- enableZoom()
- disableZoom()
- zoomEnabled()
- enableMove()
- disableMove()
- moveEnabled()
- enableRotation()
- disableRotation()
- rotationEnabled()
- enableMarkers()
- disableMarkers()
- markersEnabled()
- enableCompanies()
- disableCompanies()
- companiesEnabled()
- addPanoramaChangeListener(withPanoramaChangeListener:)
- removePanoramaChangeListener(withPanoramaChangeListener:)
- addDirectionChangeListener(withDirectionChangeListener:)
- removeDirectionChangeListener(withDirectionChangeListener:)
- addSpanChangeListener(withSpanChangeListener:)
- removeSpanChangeListener(withSpanChangeListener:)
- addCompanyTapListener(withCompanyTapListener:)
- removeCompanyTapListener(withCompanyTapListener:)
- addErrorListenerWithErrorListener(_:)
- removeErrorListenerWithErrorListener(_:)
- enableLoadingWheel()
- disableLoadingWheel()
- loadingWheelEnabled()
- onMemoryWarning()
- Properties
Важно
This feature is available in the Full MapKit SDK version
YMKPanoramaPlayer
class YMKPanoramaPlayer : NSObject |
Panorama player that is used to open panoramas.
Summary
Instance methods
func openPanorama(withPanoramaId panoramaId: String) |
func openUserPanoramaWithLocalDataSource(with panoramaDescription: YMKPanoramaDescription, |
func openUserPanoramaWithNetworkDataSource(with panoramaDescription: YMKPanoramaDescription, |
func panoramaId() -> String |
func position() -> YMKPoint |
func lookAt(withPosition position: YMKPoint) |
func direction() -> YMKDirection |
func setDirectionWith( direction: YMKDirection_) |
func setSpanWith( span: YMKSpan_) |
func reset() |
func historicalPanoramas() -> [YMKHistoricalPanorama] |
func enableZoom() |
func disableZoom() |
func zoomEnabled() -> Bool |
func enableMove() |
func disableMove() |
func moveEnabled() -> Bool |
func enableRotation() |
func disableRotation() |
func rotationEnabled() -> Bool |
func enableMarkers() |
func disableMarkers() |
func markersEnabled() -> Bool |
func enableCompanies() |
func disableCompanies() |
func companiesEnabled() -> Bool |
func addPanoramaChangeListener(withPanoramaChangeListener panoramaChangeListener: YMKPanoramaChangeDelegate) |
func removePanoramaChangeListener(withPanoramaChangeListener panoramaChangeListener: YMKPanoramaChangeDelegate) |
func addDirectionChangeListener(withDirectionChangeListener directionChangeListener: YMKPanoramaDirectionChangeDelegate) |
func removeDirectionChangeListener(withDirectionChangeListener directionChangeListener: YMKPanoramaDirectionChangeDelegate) |
func addSpanChangeListener(withSpanChangeListener spanChangeListener: YMKPanoramaSpanChangeDelegate) |
func removeSpanChangeListener(withSpanChangeListener spanChangeListener: YMKPanoramaSpanChangeDelegate) |
func addCompanyTapListener(withCompanyTapListener companyTapListener: YMKPanoramaCompanyTapDelegate) |
func removeCompanyTapListener(withCompanyTapListener companyTapListener: YMKPanoramaCompanyTapDelegate) |
func addErrorListenerWithErrorListener( errorListener: YMKPanoramaErrorDelegate_) |
func removeErrorListenerWithErrorListener( errorListener: YMKPanoramaErrorDelegate_) |
func enableLoadingWheel() |
func disableLoadingWheel() |
func loadingWheelEnabled() -> Bool |
func onMemoryWarning() |
Properties
var isValid: Bool { get } |
Instance methods
openPanorama(withPanoramaId:)
func openPanorama(withPanoramaId panoramaId: String) |
Opens the panorama with the given ID.
Parameters |
|
panoramaId |
The panoramaId that specifies the panorama to open. You can get the panoramaId by using the PanoramaService methods. |
openUserPanoramaWithLocalDataSource(with:tileImageProvider:iconImageProvider:userPanoramaEventListener:)
func openUserPanoramaWithLocalDataSource(with panoramaDescription: YMKPanoramaDescription, |
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 |
|
panoramaDescription |
Initialize this struct to open panorama |
tileImageProvider |
The tile datasource |
iconImageProvider |
The icon datasource |
userPanoramaEventListener |
The user panorama notification listener |
openUserPanoramaWithNetworkDataSource(with:tileUrlProvider:iconUrlProvider:userPanoramaEventListener:)
func openUserPanoramaWithNetworkDataSource(with panoramaDescription: YMKPanoramaDescription, |
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 |
|
panoramaDescription |
Initialize this struct to open panorama |
tileUrlProvider |
The network tile datasource |
iconUrlProvider |
The netwokr icon datasource |
userPanoramaEventListener |
The user panorama notification listener |
panoramaId()
func panoramaId() -> String |
Opened the panorama with the given ID.
Returns |
PanoramaId of the currently opened panorama. Empty if no |
position()
func position() -> YMKPoint |
Geo position of current panorama.
Returns |
Geo position of the currently opened panorama. Empty if no |
lookAt(withPosition:)
func lookAt(withPosition position: YMKPoint) |
Sets the view direction to the center of the given geo position.
Parameters |
|
position |
The position to look at. |
direction()
func direction() -> YMKDirection |
View direction of the opened panorama.
Returns |
View direction of the opened panorama. Empty if no panorama |
setDirectionWith(_:)
func setDirectionWith( direction: YMKDirection_) |
Sets the view direction bearing and tilt.
Parameters |
|
direction |
View direction. |
span()
func span() -> YMKSpan |
View span of the opened panorama.
Returns |
Current view span of the opened panorama. May be different |
setSpanWith(_:)
func setSpanWith( span: YMKSpan_) |
Sets the view area span. Invalid values are adjusted by the player to the closest valid values.
Parameters |
|
span |
View area span. May be adjusted by the player. |
reset()
func reset() |
Closes the opened panorama and stops all player actions.
historicalPanoramas()
func historicalPanoramas() -> [YMKHistoricalPanorama] |
Returns |
panoramas published earlier at the current panorama position. |
enableZoom()
func enableZoom() |
Enables player zoom controls.
disableZoom()
func disableZoom() |
Disables player zoom controls.
zoomEnabled()
func zoomEnabled() -> Bool |
Checks if zoom controls are enabled.
enableMove()
func enableMove() |
Shows transition arrows and allows switching panoramas.
disableMove()
func disableMove() |
Hides transition arrows and disallows switching panoramas.
moveEnabled()
func moveEnabled() -> Bool |
Checks if switching panoramas is enabled.
enableRotation()
func enableRotation() |
Allows the user to rotate panoramas.
disableRotation()
func disableRotation() |
Disallows the user to rotate panoramas.
rotationEnabled()
func rotationEnabled() -> Bool |
Checks if player rotation is enabled.
enableMarkers()
func enableMarkers() |
Allows markers (house numbers, railway stations, airports) to be shown.
disableMarkers()
func disableMarkers() |
Disallows markers (house numbers, railway stations, airports) to be shown.
markersEnabled()
func markersEnabled() -> Bool |
Checks if markers are enabled.
enableCompanies()
func enableCompanies() |
Allows companies (company names and icons) to be shown.
disableCompanies()
func disableCompanies() |
Disallows companies (company names and icons) to be shown.
companiesEnabled()
func companiesEnabled() -> Bool |
Checks if companies are enabled.
addPanoramaChangeListener(withPanoramaChangeListener:)
func addPanoramaChangeListener(withPanoramaChangeListener panoramaChangeListener: YMKPanoramaChangeDelegate) |
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 |
|
panoramaChangeListener |
Panorama change listener. |
removePanoramaChangeListener(withPanoramaChangeListener:)
func removePanoramaChangeListener(withPanoramaChangeListener panoramaChangeListener: YMKPanoramaChangeDelegate) |
Removes the panorama change listener.
Parameters |
|
panoramaChangeListener |
The panorama change listener to remove. |
addDirectionChangeListener(withDirectionChangeListener:)
func addDirectionChangeListener(withDirectionChangeListener directionChangeListener: YMKPanoramaDirectionChangeDelegate) |
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 |
|
directionChangeListener |
Panorama direction listener. |
removeDirectionChangeListener(withDirectionChangeListener:)
func removeDirectionChangeListener(withDirectionChangeListener directionChangeListener: YMKPanoramaDirectionChangeDelegate) |
Removes the direction listener.
Parameters |
|
directionChangeListener |
The panorama direction listener to remove. |
addSpanChangeListener(withSpanChangeListener:)
func addSpanChangeListener(withSpanChangeListener spanChangeListener: YMKPanoramaSpanChangeDelegate) |
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 |
|
spanChangeListener |
Panorama span listener. |
removeSpanChangeListener(withSpanChangeListener:)
func removeSpanChangeListener(withSpanChangeListener spanChangeListener: YMKPanoramaSpanChangeDelegate) |
Removes span listener.
Parameters |
|
spanChangeListener |
The span listener to remove. |
addCompanyTapListener(withCompanyTapListener:)
func addCompanyTapListener(withCompanyTapListener companyTapListener: YMKPanoramaCompanyTapDelegate) |
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 |
|
companyTapListener |
Company tap listener. |
removeCompanyTapListener(withCompanyTapListener:)
func removeCompanyTapListener(withCompanyTapListener companyTapListener: YMKPanoramaCompanyTapDelegate) |
Removes company tap listener.
Parameters |
|
companyTapListener |
The company tap listener to remove. |
addErrorListenerWithErrorListener(_:)
func addErrorListenerWithErrorListener( errorListener: YMKPanoramaErrorDelegate_) |
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 |
|
errorListener |
Listeners that notify when a panorama failed to open. |
removeErrorListenerWithErrorListener(_:)
func removeErrorListenerWithErrorListener( errorListener: YMKPanoramaErrorDelegate_) |
Removes error listener.
Parameters |
|
errorListener |
The listener to remove. |
enableLoadingWheel()
func enableLoadingWheel() |
Allows showing loading wheels.
disableLoadingWheel()
func disableLoadingWheel() |
Disallows showing loading wheels.
loadingWheelEnabled()
func loadingWheelEnabled() -> Bool |
Checks if loading wheels can be shown while the panorama is opening.
onMemoryWarning()
func onMemoryWarning() |
Called when a memory warning happens.
Properties
logo
var logo: YMKLogo { get } |
Yandex logo object.
isValid
var isValid: Bool { get } |
Tells if this object is valid or no. Any method called on an invalid object will throw an exception. The object 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.