MMKDataSourceLayer

@interface MMKDataSourceLayer : NSObject

Undocumented

Summary

Instance methods

- (void)clear;
Clears all cached tiles and starts new requests for tiles that are displayed

- (BOOL)setStyleWithId:(NSInteger)id style:(nonnull NSString *)style;
Applies JSON style transformation to the layer

- (void)resetStyles;
Resets all JSON style transformations applied to the layer

- (void)setLayerLoadedListenerWithLayerLoadedListener:
    (nullable id<MMKLayerLoadedListener>)layerLoadedListener;

Sets layer loaded listener

- (void)remove;
Removes the data source layer from the parent layer

- (void)setDataSourceListenerWithDataSourceListener:
    (nullable id<MMKDataSourceListener>)dataSourceListener;

Sets data source listener

Properties

@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isActive)
    BOOL active;

Manages visibility of the layer

@property (nonatomic, readonly, getter=isValid) BOOL valid;
Tells if this object is valid or no

Instance methods

clear

- (void)clear;

Clears all cached tiles and starts new requests for tiles that are displayed.


setStyleWithId:style:

- (BOOL)setStyleWithId:(NSInteger)id style:(nonnull NSString *)style;

Applies JSON style transformation to the layer. Replaces previous styling with the specified ID (if such exists). Stylings are applied in an ascending order. Set to empty string to clear previous styling with the specified ID. Returns true if the style was successfully parsed and false otherwise. If the returned value is false, the current style remains unchanged.


resetStyles

- (void)resetStyles;

Resets all JSON style transformations applied to the layer.


setLayerLoadedListenerWithLayerLoadedListener:

- (void)setLayerLoadedListenerWithLayerLoadedListener:
    (nullable id<MMKLayerLoadedListener>)layerLoadedListener;

Sets layer loaded listener.

The class does not retain the object in the 'layerLoadedListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.


remove

- (void)remove;

Removes the data source layer from the parent layer. The object becomes invalid after that.


setDataSourceListenerWithDataSourceListener:

- (void)setDataSourceListenerWithDataSourceListener:
    (nullable id<MMKDataSourceListener>)dataSourceListener;

Sets data source listener. Use it to invalidate data source. Temporary solution until https://st.mappable-team.ru/MAPSMOBCORE-20531 is done

The class does not retain the object in the 'dataSourceListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.


Properties

active

@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isActive)
    BOOL active;

Manages visibility of the layer.


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.