Class YMKOfflineCacheRegion

Attention.

This feature is not available in the free MapKit version.

Region information.

Instance Methods

- addListenerWithRegionListener:

Subscribe the listener to receive all manager notifications.

- drop

Drop region data from the device.

- mayBeOutOfAvailableSpace

Returns true if available disk space might not be enough for installation of the region data.

- pause

Pause the download.

- removeListenerWithRegionListener:

Unsubscribe the listener from receiving all manager notifications.

- start

Add the map to the download queue.

- stop

Cancel the download, if any.

Properties

center

Center point.

cities

Cities inside the region.

country

Country of the region.

downloadSize

Returns the size of the download in bytes.

name

Name of the region.

progress

Returns the download progress (0..1).

regionId

Region ID.

releaseTime

Returns the region creation time.

state

State of the region.

valid

Tells if this object is valid or no.

Method Detail

-addListenerWithRegionListener:

- (void)addListenerWithRegionListener:(nonnull id< YMKOfflineCacheRegionListener >)regionListener 

Subscribe the listener to receive all manager notifications.

-drop

- (void)drop

Drop region data from the device.

If data is being downloaded then downloading is cancelled.

-mayBeOutOfAvailableSpace

- (BOOL)mayBeOutOfAvailableSpace

Returns true if available disk space might not be enough for installation of the region data.

-pause

- (void)pause

Pause the download.

-removeListenerWithRegionListener:

- (void)removeListenerWithRegionListener:(nonnull id< YMKOfflineCacheRegionListener >)regionListener 

Unsubscribe the listener from receiving all manager notifications.

-start

- (void)start

Add the map to the download queue.

The download will be started (resumed) immediately.

-stop

- (void)stop

Cancel the download, if any.

Property Detail

center

(assign, readonly) YMKPoint * center

Center point.

cities

(assign, readonly) NSArray< NSString * > * cities

Cities inside the region.

country

(assign, readonly) NSString * country

Country of the region.

downloadSize

(assign, readonly) YMKLocalizedValue * downloadSize

Returns the size of the download in bytes.

name

(assign, readonly) NSString * name

Name of the region.

progress

(assign, readonly) float progress

Returns the download progress (0..1).

regionId

(assign, readonly) NSUInteger regionId

Region ID.

releaseTime

(assign, readonly) NSDate * releaseTime

Returns the region creation time.

state

(assign, readonly) YMKOfflineCacheRegionState state

State of the region.

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.