Interface TrafficLayer

com.yandex.mapkit.traffic

public interface TrafficLayer

Methods

void addTrafficListener( TrafficListener trafficListener)
boolean isRoadEventVisible(EventType type)
boolean isTrafficVisible()
boolean isValid()

Tells if this TrafficLayer is valid or no.

void removeTrafficListener( TrafficListener trafficListener)
void setRoadEventVisible(EventType type, boolean on)
boolean setTrafficStyle(String style)

Applies JSON style transformations to the traffic layer.

void setTrafficVisible(boolean on)
void addTrafficListener( TrafficListener trafficListener)
boolean isRoadEventVisible(EventType type)
boolean isTrafficVisible()
boolean isValid()

Tells if this TrafficLayer is valid or no.

void removeTrafficListener( TrafficListener trafficListener)
void setRoadEventVisible(EventType type, boolean on)
boolean setTrafficStyle(String style)

Applies JSON style transformations to the traffic layer.

void setTrafficVisible(boolean on)

Method Detail

addTrafficListener

public void addTrafficListener (TrafficListener trafficListener)

isRoadEventVisible

public boolean isRoadEventVisible (EventType type)

isTrafficVisible

public boolean isTrafficVisible ()

isValid

public boolean isValid ()

Tells if this TrafficLayer is valid or no.

Any other method (except for this one) called on an invalid TrafficLayer will throw java.lang.RuntimeException. An instance 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.

removeTrafficListener

public void removeTrafficListener (TrafficListener trafficListener)

setRoadEventVisible

public void setRoadEventVisible (EventType type, boolean on)

setTrafficStyle

public boolean setTrafficStyle (String style)

Applies JSON style transformations to the traffic layer.

Set to null 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.

setTrafficVisible

public void setTrafficVisible (boolean on)