Alexey Zakharov
Alexey Zakharov

Reputation: 25112

Does Android Google Api provide traffic layer for developers?

Is it possible to create traffic layer using android google api sdk on Android?

Upvotes: 0

Views: 1246

Answers (1)

nixan
nixan

Reputation: 523

((MapView) findViewById(R.id.my_map_view)).setTraffic(true);

public void setTraffic(boolean isEnabled) Control whether traffic is shown on the map. This is incompatible with Street View indicators, so they will be deactivated if necessary. They can be drawn over map tiles or over satellite tiles; however, they are optimized for map tiles. Parameters: on - If true, turn traffic lines on. If false, turn them off.

Upvotes: 7

Related Questions