Class YMKTrafficLayer

A layer with traffic information.

Instance Methods

- addTrafficListenerWithTrafficListener:

Adds a traffic listener.

- isTrafficVisible

Checks if traffic is visible.

- removeTrafficListenerWithTrafficListener:

Removes a traffic listener.

- resetRoadEventsStyles

Resets all JSON style transformations applied to the road events layer.

- resetTrafficStyles

Resets all JSON style transformations applied to the traffic layer.

- setRoadEventsStyleWithId:style:

Applies JSON style transformations to the road events layer.

- setRoadEventsStyleWithStyle:

Applies JSON style transformations to the road events layer.

- setTrafficStyleWithId:style:

Applies JSON style transformations to the traffic layer.

- setTrafficStyleWithStyle:

Applies JSON style transformations to the traffic layer.

- setTrafficVisibleWithOn:

Sets traffic visibility.

Properties

valid

Tells if this object is valid or no.

Method Detail

-addTrafficListenerWithTrafficListener:

- (void)addTrafficListenerWithTrafficListener:(nonnull id< YMKTrafficDelegate >)trafficListener 

Adds a traffic listener.

-isTrafficVisible

- (BOOL)isTrafficVisible

Checks if traffic is visible.

-removeTrafficListenerWithTrafficListener:

- (void)removeTrafficListenerWithTrafficListener:(nonnull id< YMKTrafficDelegate >)trafficListener 

Removes a traffic listener.

-resetRoadEventsStyles

- (void)resetRoadEventsStyles

Resets all JSON style transformations applied to the road events layer.

-resetTrafficStyles

- (void)resetTrafficStyles

Resets all JSON style transformations applied to the traffic layer.

-setRoadEventsStyleWithId:style:

- (BOOL)setRoadEventsStyleWithId:(NSInteger)id
                           style:(nonnull NSString *)style 

Applies JSON style transformations to the road events 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; false otherwise. If the return value is false, the current road events style remains unchanged.

-setRoadEventsStyleWithStyle:

- (BOOL)setRoadEventsStyleWithStyle:(nonnull NSString *)style 

Applies JSON style transformations to the road events layer.

Same as setRoadEventsStyle(0, style). Set to empty string to clear previous styling. Returns true if the style was successfully parsed; false otherwise. If the return value is false, the current road events style remains unchanged.

-setTrafficStyleWithId:style:

- (BOOL)setTrafficStyleWithId:(NSInteger)id
                        style:(nonnull NSString *)style 

Applies JSON style transformations to the traffic 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; false otherwise. If the return value is false, the current traffic style remains unchanged.

-setTrafficStyleWithStyle:

- (BOOL)setTrafficStyleWithStyle:(nonnull NSString *)style 

Applies JSON style transformations to the traffic layer.

Same as setTrafficStyle(0, style). Set to empty string to clear previous styling. Returns true if the style was successfully parsed; false otherwise. If the return value is false, the current traffic style remains unchanged.

-setTrafficVisibleWithOn:

- (void)setTrafficVisibleWithOn:(BOOL)on 

Sets traffic visibility.

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.