Class YMKTrafficLayer

A layer with traffic information.

Instance Methods

- addTrafficListenerWithTrafficListener:

Adds a traffic listener.

- isRoadEventVisibleWithType:
- isTrafficVisible

Checks if traffic is visible.

- removeTrafficListenerWithTrafficListener:

Removes a traffic listener.

- setRoadEventVisibleWithType:on:
- 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.

-isRoadEventVisibleWithType:

- (BOOL)isRoadEventVisibleWithType:(YMKRoadEventsEventType)type 
Attention.

This feature is not available in the free MapKit version.

Checks if road events are visible.

-isTrafficVisible

- (BOOL)isTrafficVisible

Checks if traffic is visible.

-removeTrafficListenerWithTrafficListener:

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

Removes a traffic listener.

-setRoadEventVisibleWithType:on:

- (void)setRoadEventVisibleWithType:(YMKRoadEventsEventType)type
                                 on:(BOOL)on 
Attention.

This feature is not available in the free MapKit version.

Sets road events visibility.

-setTrafficStyleWithStyle:

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

Applies JSON style transformations to the traffic layer.

Set to empty string to clear any previous custom 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.