Class YMKPanoramaPlayer

Panorama player that is used to open panoramas.

Instance Methods

- addDirectionChangeListenerWithDirectionChangeListener:

Adds direction listener.

- addErrorListenerWithErrorListener:

Adds error listener.

- addPanoramaChangeListenerWithPanoramaChangeListener:

Adds a panorama change listener.

- addSpanChangeListenerWithSpanChangeListener:

Adds span listener.

- direction

View direction of the opened panorama.

- disableLoadingWheel

Disallows showing loading wheels.

- disableMarkers

Disallows markers (house numbers, railway stations, airports) to be shown.

- disableMove

Hides transition arrows and disallows switching panoramas.

- disableRotation

Disallows the user to rotate panoramas.

- disableZoom

Disables player zoom controls.

- enableLoadingWheel

Allows showing loading wheels.

- enableMarkers

Allows markers (house numbers, railway stations, airports) to be shown.

- enableMove

Shows transition arrows and allows switching panoramas.

- enableRotation

Allows the user to rotate panoramas.

- enableZoom

Enables player zoom controls.

- historicalPanoramas
- loadingWheelEnabled

Checks if loading wheels can be shown while the panorama is opening.

- lookAtWithPosition:

Sets the view direction to the center of the given geo position.

- markersEnabled

Checks if markers are enabled.

- moveEnabled

Checks if switching panoramas is enabled.

- onMemoryWarning

Called when a memory warning happens.

- openPanoramaWithPanoramaId:

Opens the panorama with the given ID.

- panoramaId

Opened the panorama with the given ID.

- position

Geo position of current panorama.

- removeDirectionChangeListenerWithDirectionChangeListener:

Removes the direction listener.

- removeErrorListenerWithErrorListener:

Removes error listener.

- removePanoramaChangeListenerWithPanoramaChangeListener:

Removes the panorama change listener.

- removeSpanChangeListenerWithSpanChangeListener:

Removes span listener.

- reset

Closes the opened panorama and stops all player actions.

- rotationEnabled

Checks if player rotation is enabled.

- setDirectionWithDirection:

Sets the view direction bearing and tilt.

- setSpanWithSpan:

Sets the view area span.

- span

View span of the opened panorama.

- zoomEnabled

Checks if zoom controls are enabled.

Properties

logo

Yandex logo object.

valid

Tells if this object is valid or no.

Method Detail

-addDirectionChangeListenerWithDirectionChangeListener:

- (void)addDirectionChangeListenerWithDirectionChangeListener:(nonnull id< YMKPanoramaDirectionChangeDelegate >)directionChangeListener 

Adds direction listener.

Parameters:
directionChangeListener

Panorama direction listener.

-addErrorListenerWithErrorListener:

- (void)addErrorListenerWithErrorListener:(nonnull id< YMKPanoramaErrorDelegate >)errorListener 

Adds error listener.

Parameters:
errorListener

Listeners that notify when a panorama failed to open.

-addPanoramaChangeListenerWithPanoramaChangeListener:

- (void)addPanoramaChangeListenerWithPanoramaChangeListener:(nonnull id< YMKPanoramaChangeDelegate >)panoramaChangeListener 

Adds a panorama change listener.

Parameters:
panoramaChangeListener

Panorama change listener.

-addSpanChangeListenerWithSpanChangeListener:

- (void)addSpanChangeListenerWithSpanChangeListener:(nonnull id< YMKPanoramaSpanChangeDelegate >)spanChangeListener 

Adds span listener.

Parameters:
spanChangeListener

Panorama span listener.

-direction

- (nonnull YMKDirection *)direction

View direction of the opened panorama.

Returns:

View direction of the opened panorama. Empty if no panorama is open.

-disableLoadingWheel

- (void)disableLoadingWheel

Disallows showing loading wheels.

-disableMarkers

- (void)disableMarkers

Disallows markers (house numbers, railway stations, airports) to be shown.

-disableMove

- (void)disableMove

Hides transition arrows and disallows switching panoramas.

-disableRotation

- (void)disableRotation

Disallows the user to rotate panoramas.

-disableZoom

- (void)disableZoom

Disables player zoom controls.

-enableLoadingWheel

- (void)enableLoadingWheel

Allows showing loading wheels.

-enableMarkers

- (void)enableMarkers

Allows markers (house numbers, railway stations, airports) to be shown.

-enableMove

- (void)enableMove

Shows transition arrows and allows switching panoramas.

-enableRotation

- (void)enableRotation

Allows the user to rotate panoramas.

-enableZoom

- (void)enableZoom

Enables player zoom controls.

-historicalPanoramas

- (nonnull NSArray< YMKHistoricalPanorama * > *)historicalPanoramas

Returns:

panoramas published earlier at the current panorama position. Result is updated on the PanoramaChangeListener callback

-loadingWheelEnabled

- (BOOL)loadingWheelEnabled

Checks if loading wheels can be shown while the panorama is opening.

-lookAtWithPosition:

- (void)lookAtWithPosition:(nonnull YMKPoint *)position 

Sets the view direction to the center of the given geo position.

Parameters:
position

The position to look at.

-markersEnabled

- (BOOL)markersEnabled

Checks if markers are enabled.

-moveEnabled

- (BOOL)moveEnabled

Checks if switching panoramas is enabled.

-onMemoryWarning

- (void)onMemoryWarning

Called when a memory warning happens.

-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.

-panoramaId

- (nonnull NSString *)panoramaId

Opened the panorama with the given ID.

Returns:

PanoramaId of the currently opened panorama. Empty if no panorama is open.

-position

- (nonnull YMKPoint *)position

Geo position of current panorama.

Returns:

Geo position of the currently opened panorama. Empty if no panorama is open.

-removeDirectionChangeListenerWithDirectionChangeListener:

- (void)removeDirectionChangeListenerWithDirectionChangeListener:(nonnull id< YMKPanoramaDirectionChangeDelegate >)directionChangeListener 

Removes the direction listener.

Parameters:
directionChangeListener

The panorama direction listener to remove.

-removeErrorListenerWithErrorListener:

- (void)removeErrorListenerWithErrorListener:(nonnull id< YMKPanoramaErrorDelegate >)errorListener 

Removes error listener.

Parameters:
errorListener

The listener to remove.

-removePanoramaChangeListenerWithPanoramaChangeListener:

- (void)removePanoramaChangeListenerWithPanoramaChangeListener:(nonnull id< YMKPanoramaChangeDelegate >)panoramaChangeListener 

Removes the panorama change listener.

Parameters:
panoramaChangeListener

The panorama change listener to remove.

-removeSpanChangeListenerWithSpanChangeListener:

- (void)removeSpanChangeListenerWithSpanChangeListener:(nonnull id< YMKPanoramaSpanChangeDelegate >)spanChangeListener 

Removes span listener.

Parameters:
spanChangeListener

The span listener to remove.

-reset

- (void)reset

Closes the opened panorama and stops all player actions.

-rotationEnabled

- (BOOL)rotationEnabled

Checks if player rotation is enabled.

-setDirectionWithDirection:

- (void)setDirectionWithDirection:(nonnull YMKDirection *)direction 

Sets the view direction bearing and tilt.

Parameters:
direction

View direction.

-setSpanWithSpan:

- (void)setSpanWithSpan:(nonnull YMKSpan *)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.

-span

- (nonnull YMKSpan *)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

- (BOOL)zoomEnabled

Checks if zoom controls are enabled.

Property Detail

valid

(assign, 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.