MMKPanoramaPlayer
- 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
class MMKPanoramaPlayer : NSObject |
Panorama player that is used to open panoramas.
Summary
Instance methods
func openPanorama(withPanoramaId panoramaId: String) |
func openUserPanoramaWithLocalDataSource(with panoramaDescription: MMKPanoramaDescription, |
func openUserPanoramaWithNetworkDataSource(with panoramaDescription: MMKPanoramaDescription, |
func panoramaId() -> String |
func position() -> MMKPoint |
func lookAt(withPosition position: MMKPoint) |
func direction() -> MMKDirection |
func setDirectionWith( direction: MMKDirection_) |
func setSpanWith( span: MMKSpan_) |
func reset() |
func historicalPanoramas() -> [MMKHistoricalPanorama] |
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: MMKPanoramaChangeDelegate) |
func removePanoramaChangeListener(withPanoramaChangeListener panoramaChangeListener: MMKPanoramaChangeDelegate) |
func addDirectionChangeListener(withDirectionChangeListener directionChangeListener: MMKPanoramaDirectionChangeDelegate) |
func removeDirectionChangeListener(withDirectionChangeListener directionChangeListener: MMKPanoramaDirectionChangeDelegate) |
func addSpanChangeListener(withSpanChangeListener spanChangeListener: MMKPanoramaSpanChangeDelegate) |
func removeSpanChangeListener(withSpanChangeListener spanChangeListener: MMKPanoramaSpanChangeDelegate) |
func addCompanyTapListener(withCompanyTapListener companyTapListener: MMKPanoramaCompanyTapDelegate) |
func removeCompanyTapListener(withCompanyTapListener companyTapListener: MMKPanoramaCompanyTapDelegate) |
func addErrorListenerWithErrorListener( errorListener: MMKPanoramaErrorDelegate_) |
func removeErrorListenerWithErrorListener( errorListener: MMKPanoramaErrorDelegate_) |
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: MMKPanoramaDescription, |
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: MMKPanoramaDescription, |
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() -> MMKPoint |
Geo position of current panorama.
Returns |
Geo position of the currently opened panorama. Empty if no |
lookAt(withPosition:)
func lookAt(withPosition position: MMKPoint) |
Sets the view direction to the center of the given geo position.
Parameters |
|
position |
The position to look at. |
direction()
func direction() -> MMKDirection |
View direction of the opened panorama.
Returns |
View direction of the opened panorama. Empty if no panorama |
setDirectionWith(_:)
func setDirectionWith( direction: MMKDirection_) |
Sets the view direction bearing and tilt.
Parameters |
|
direction |
View direction. |
span()
func span() -> MMKSpan |
View span of the opened panorama.
Returns |
Current view span of the opened panorama. May be different |
setSpanWith(_:)
func setSpanWith( span: MMKSpan_) |
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() -> [MMKHistoricalPanorama] |
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: MMKPanoramaChangeDelegate) |
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: MMKPanoramaChangeDelegate) |
Removes the panorama change listener.
Parameters |
|
panoramaChangeListener |
The panorama change listener to remove. |
addDirectionChangeListener(withDirectionChangeListener:)
func addDirectionChangeListener(withDirectionChangeListener directionChangeListener: MMKPanoramaDirectionChangeDelegate) |
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: MMKPanoramaDirectionChangeDelegate) |
Removes the direction listener.
Parameters |
|
directionChangeListener |
The panorama direction listener to remove. |
addSpanChangeListener(withSpanChangeListener:)
func addSpanChangeListener(withSpanChangeListener spanChangeListener: MMKPanoramaSpanChangeDelegate) |
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: MMKPanoramaSpanChangeDelegate) |
Removes span listener.
Parameters |
|
spanChangeListener |
The span listener to remove. |
addCompanyTapListener(withCompanyTapListener:)
func addCompanyTapListener(withCompanyTapListener companyTapListener: MMKPanoramaCompanyTapDelegate) |
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: MMKPanoramaCompanyTapDelegate) |
Removes company tap listener.
Parameters |
|
companyTapListener |
The company tap listener to remove. |
addErrorListenerWithErrorListener(_:)
func addErrorListenerWithErrorListener( errorListener: MMKPanoramaErrorDelegate_) |
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: MMKPanoramaErrorDelegate_) |
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: MMKLogo { get } |
Mappable 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.