Class YMKLayer

Interface for working with the layer.

Instance Methods

- activateWithOn:

Shows or hides the layer on the map.

- clear

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

- invalidateWithVersion:

Invalidates the layer and reloads all tiles that have been modified in the new map version.

- remove

Removes the layer from the map.

- resetStyles

Resets all JSON style transformations applied to the layer.

- setLayerLoadedListenerWithLayerLoadedListener:

Sets layer loaded listener.

- setStyleWithId:style:

Applies JSON style transformation to the layer.

Properties

valid

Tells if this object is valid or no.

Method Detail

-activateWithOn:

- (void)activateWithOn:(BOOL)on 

Shows or hides the layer on the map.

-clear

- (void)clear

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

-invalidateWithVersion:

- (void)invalidateWithVersion:(nonnull NSString *)version 

Invalidates the layer and reloads all tiles that have been modified in the new map version.

To update a layer that does not have a version, leave this parameter empty. Can be called on any thread.

-remove

- (void)remove

Removes the layer from the map.

-resetStyles

- (void)resetStyles

Resets all JSON style transformations applied to the layer.

-setLayerLoadedListenerWithLayerLoadedListener:

- (void)setLayerLoadedListenerWithLayerLoadedListener:(nullable id< YMKLayerLoadedListener >)layerLoadedListener 

Sets layer loaded listener.

Remark:
Parameters:
layerLoadedListener

has optional type, it may be uninitialized.

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

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.