Is there a way to remove or at least minimize
number of traffic Transaction
in MapQuest Leaflet Maps.
if (dir == null) {
dir = MQ.routing.directions()
.on('success', function (data) {
routeSummary(data);
});
dir.route({
locations: locations, // is a var of multiple locations (Lat/lon)
options: {
avoids: [],
disallows: [],
destinationManeuverDisplay: false,
doReverseGeocode: false,
manMaps: false,
sideOfStreetDisplay: false
}
});
}
Where routeSummary is Defined as
function routeSummary(data) {
if (data && data.route && data.route.distance)
{
var distance = data.route.distance;
var time = data.route.formattedTime;
}
}