Give your users the ability to see real time traffic in your mobile apps.
With Online Traffic Flow tiles your users will have information about congestion, the speed of traffic on different road segments, and the difference between that speed and the free-flow speed on the same road segments. You can find more information and details about Online Traffic Flow tile parameters on Online Vector Traffic Flow tiles or Online Raster Traffic Flow tiles.
Online Traffic flow tiles
Traffic flow tiles are available in two formats: vector (.pbf) and raster (.png). Vector tiles provide a possibility for visual customization and better visual experience. Therefore, we recommend using the vector tiles for map and traffic display. Raster tiles are especially suitable for low performance devices.
Vector traffic flow tiles are used by default for traffic flow in Maps SDK. Vector traffic flow tiles are available from map zoom levels: 11 to 20. Raster traffic flow tiles are available from map zoom levels: 0 to 18.
You can switch to raster traffic flow tiles by using the method:
self.mapView.trafficTileStyle = [TTRasterTileType setStyle:TTRasterStyleRelative];
Traffic raster type style
Online Traffic flow tiles style types are represented in the SDK as an enum. The available raster traffic flow styles are the following:
TTRasterStyleRelative, TTRasterStyleAbsolute, TTRasterStyleRelativeDelay, TTRasterStyleReducedSensitivity
You can change back to vector traffic tiles by using the method:
self.mapView.trafficTileStyle = [TTVectorTileType setStyle:TTVectorStyleRelative];
Vector traffic flow type style
Online Traffic flow tiles style types are represented in the SDK as an enum. The available raster traffic flow types are the following:
TTVectorStyleRelative, TTVectorStyleAbsolute, TTVectorStyleRelativeDelay
You can turn on/off traffic flow by using the method:
self.mapView.trafficFlowOn = self.trafficOn;
Online Traffic incidents style types are represented in the SDK as an enum. The available traffic incidents options are the following:
self.mapView.trafficIncidentsStyle = TTTrafficIncidentsStyleRaster;
You can turn on/of traffic flow by using the method:
self.mapView.trafficIncidentsOn = self.incidentsOn;
Traffic vector flow layer on vector map.
Traffic raster flow shown on raster map.
Traffic raster incidents layer in sample app.
Traffic raster incidents and raster flow layer on raster map.
No traffic in sample app.