Driving directions with traffic

Question!

How do I receive driving time between two locations with traffic. This information is displayed on iPhone maps application, when 'Show Traffic' option is selected.

Appreciate your help.

By : Prasanna


Answers

You have to buy in as a >>Maps business customer and set the durationInTraffic property of the >>DirectionsRequest object to true:

durationInTraffic (optional) specifies whether the DirectionsLeg result should include a duration that takes into account current traffic conditions. This feature is only available for Maps for Business customers. The time in current traffic will only be returned if traffic information is available in the requested area.

Without being a business customer you will not be able to take the current traffic situation into account for your directions calculations, but you can still >>activate the traffic layer in Maps to show the current traffic situation on your map.

By : Jpsy


This video can help you solving your question :)
By: admin