T
T
tonybeat2017-03-02 17:08:51
JavaScript
tonybeat, 2017-03-02 17:08:51

How to remove traffic jams?

brothers ,
tell me
how to remove traffic jams in google map api
, I call them like this

function trafficCar() {
        var trafficLayer = new google.maps.TrafficLayer();
        trafficLayer.setMap(map);
    }


And I can't find how to put it back

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
justdealman, 2017-03-02
@tonybeat

trafficLayer.setMap(null);
trafficLayer only needs to be declared globally

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question