MMKPanoramaPlayer
- Summary
- Instance methods
- openPanoramaWithPanoramaId:
- openUserPanoramaWithLocalDataSourceWithPanoramaDescription:tileImageProvider:iconImageProvider:userPanoramaEventListener:
- openUserPanoramaWithNetworkDataSourceWithPanoramaDescription:tileUrlProvider:iconUrlProvider:userPanoramaEventListener:
- panoramaId
- position
- lookAtWithPosition:
- direction
- setDirectionWithDirection:
- span
- setSpanWithSpan:
- reset
- historicalPanoramas
- enableZoom
- disableZoom
- zoomEnabled
- enableMove
- disableMove
- moveEnabled
- enableRotation
- disableRotation
- rotationEnabled
- enableMarkers
- disableMarkers
- markersEnabled
- enableCompanies
- disableCompanies
- companiesEnabled
- addPanoramaChangeListenerWithPanoramaChangeListener:
- removePanoramaChangeListenerWithPanoramaChangeListener:
- addDirectionChangeListenerWithDirectionChangeListener:
- removeDirectionChangeListenerWithDirectionChangeListener:
- addSpanChangeListenerWithSpanChangeListener:
- removeSpanChangeListenerWithSpanChangeListener:
- addCompanyTapListenerWithCompanyTapListener:
- removeCompanyTapListenerWithCompanyTapListener:
- addErrorListenerWithErrorListener:
- removeErrorListenerWithErrorListener:
- enableLoadingWheel
- disableLoadingWheel
- loadingWheelEnabled
- onMemoryWarning
- Properties
@interface MMKPanoramaPlayer : NSObject |
Panorama player that is used to open panoramas.
Summary
Instance methods
- (void)openPanoramaWithPanoramaId:(nonnull NSString *)panoramaId; |
- (void) |
- (void) |
- (nonnull NSString *)panoramaId; |
- (nonnull MMKPoint *)position; |
- (void)lookAtWithPosition:(nonnull MMKPoint *)position; |
- (nonnull MMKDirection *)direction; |
- (void)setDirectionWithDirection:(nonnull MMKDirection *)direction; |
- (void)setSpanWithSpan:(nonnull MMKSpan *)span; |
- (void)reset; |
- (nonnull NSArray<MMKHistoricalPanorama *> *)historicalPanoramas; |
- (void)enableZoom; |
- (void)disableZoom; |
- (BOOL)zoomEnabled; |
- (void)enableMove; |
- (void)disableMove; |
- (BOOL)moveEnabled; |
- (void)enableRotation; |
- (void)disableRotation; |
- (BOOL)rotationEnabled; |
- (void)enableMarkers; |
- (void)disableMarkers; |
- (BOOL)markersEnabled; |
- (void)enableCompanies; |
- (void)disableCompanies; |
- (BOOL)companiesEnabled; |
- (void)addPanoramaChangeListenerWithPanoramaChangeListener: |
- (void)removePanoramaChangeListenerWithPanoramaChangeListener: |
- (void)addDirectionChangeListenerWithDirectionChangeListener: |
- (void)removeDirectionChangeListenerWithDirectionChangeListener: |
- (void)addSpanChangeListenerWithSpanChangeListener: |
- (void)removeSpanChangeListenerWithSpanChangeListener: |
- (void)addCompanyTapListenerWithCompanyTapListener: |
- (void)removeCompanyTapListenerWithCompanyTapListener: |
- (void)addErrorListenerWithErrorListener: |
- (void)removeErrorListenerWithErrorListener: |
- (void)enableLoadingWheel; |
- (void)disableLoadingWheel; |
- (BOOL)loadingWheelEnabled; |
- (void)onMemoryWarning; |
Properties
@property (nonatomic, readonly, nonnull) MMKLogo *logo; |
@property (nonatomic, readonly, getter=isValid) BOOL valid; |
Instance methods
openPanoramaWithPanoramaId:
- (void)openPanoramaWithPanoramaId:(nonnull NSString *)panoramaId; |
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. |
openUserPanoramaWithLocalDataSourceWithPanoramaDescription:tileImageProvider:iconImageProvider:userPanoramaEventListener:
- (void) |
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 |
openUserPanoramaWithNetworkDataSourceWithPanoramaDescription:tileUrlProvider:iconUrlProvider:userPanoramaEventListener:
- (void) |
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
- (nonnull NSString *)panoramaId; |
Opened the panorama with the given ID.
Returns |
PanoramaId of the currently opened panorama. Empty if no |
position
- (nonnull MMKPoint *)position; |
Geo position of current panorama.
Returns |
Geo position of the currently opened panorama. Empty if no |
lookAtWithPosition:
- (void)lookAtWithPosition:(nonnull MMKPoint *)position; |
Sets the view direction to the center of the given geo position.
Parameters |
|
position |
The position to look at. |
direction
- (nonnull MMKDirection *)direction; |
View direction of the opened panorama.
Returns |
View direction of the opened panorama. Empty if no panorama |
setDirectionWithDirection:
- (void)setDirectionWithDirection:(nonnull MMKDirection *)direction; |
Sets the view direction bearing and tilt.
Parameters |
|
direction |
View direction. |
span
- (nonnull MMKSpan *)span; |
View span of the opened panorama.
Returns |
Current view span of the opened panorama. May be different |
setSpanWithSpan:
- (void)setSpanWithSpan:(nonnull MMKSpan *)span; |
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
- (void)reset; |
Closes the opened panorama and stops all player actions.
historicalPanoramas
- (nonnull NSArray<MMKHistoricalPanorama *> *)historicalPanoramas; |
Returns |
panoramas published earlier at the current panorama position. |
enableZoom
- (void)enableZoom; |
Enables player zoom controls.
disableZoom
- (void)disableZoom; |
Disables player zoom controls.
zoomEnabled
- (BOOL)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
- (BOOL)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
- (BOOL)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
- (BOOL)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
- (BOOL)companiesEnabled; |
Checks if companies are enabled.
addPanoramaChangeListenerWithPanoramaChangeListener:
- (void)addPanoramaChangeListenerWithPanoramaChangeListener: |
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. |
removePanoramaChangeListenerWithPanoramaChangeListener:
- (void)removePanoramaChangeListenerWithPanoramaChangeListener: |
Removes the panorama change listener.
Parameters |
|
panoramaChangeListener |
The panorama change listener to remove. |
addDirectionChangeListenerWithDirectionChangeListener:
- (void)addDirectionChangeListenerWithDirectionChangeListener: |
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. |
removeDirectionChangeListenerWithDirectionChangeListener:
- (void)removeDirectionChangeListenerWithDirectionChangeListener: |
Removes the direction listener.
Parameters |
|
directionChangeListener |
The panorama direction listener to remove. |
addSpanChangeListenerWithSpanChangeListener:
- (void)addSpanChangeListenerWithSpanChangeListener: |
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. |
removeSpanChangeListenerWithSpanChangeListener:
- (void)removeSpanChangeListenerWithSpanChangeListener: |
Removes span listener.
Parameters |
|
spanChangeListener |
The span listener to remove. |
addCompanyTapListenerWithCompanyTapListener:
- (void)addCompanyTapListenerWithCompanyTapListener: |
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. |
removeCompanyTapListenerWithCompanyTapListener:
- (void)removeCompanyTapListenerWithCompanyTapListener: |
Removes company tap listener.
Parameters |
|
companyTapListener |
The company tap listener to remove. |
addErrorListenerWithErrorListener:
- (void)addErrorListenerWithErrorListener: |
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:
- (void)removeErrorListenerWithErrorListener: |
Removes error listener.
Parameters |
|
errorListener |
The listener to remove. |
enableLoadingWheel
- (void)enableLoadingWheel; |
Allows showing loading wheels.
disableLoadingWheel
- (void)disableLoadingWheel; |
Disallows showing loading wheels.
loadingWheelEnabled
- (BOOL)loadingWheelEnabled; |
Checks if loading wheels can be shown while the panorama is opening.
onMemoryWarning
- (void)onMemoryWarning; |
Called when a memory warning happens.
Properties
logo
@property (nonatomic, readonly, nonnull) MMKLogo *logo; |
Mappable logo object.
valid
@property (nonatomic, readonly, getter=isValid) BOOL valid; |
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.