最小化或删除Mapquest Leafelt JS Maps的流量交易

时间:2016-06-16 10:18:53

标签: javascript leaflet mapquest

有没有办法在 MapQuest宣传单地图中删除minimizetraffic Transactionif (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 } }); }

function routeSummary(data) {
    if (data && data.route && data.route.distance) 
     {
                var distance = data.route.distance;
                var time = data.route.formattedTime;
     }      
 }

routeSummary 定义为

document.querySelectorAll('[id^="id_"]');

2 个答案:

答案 0 :(得分:0)

这看起来不应该计算任何流量交易。是否有一个网址,我们可以看到应用程序使用相关密钥?

答案 1 :(得分:0)

为了处理(减少/删除)流量交易。您必须停用useTraffic: false

               dir.route({
                     locations: locations,   // is a var of multiple locations (Lat/lon) 
                        options: {
                            avoids: [],
                            disallows: [],
                            destinationManeuverDisplay: false,
                            doReverseGeocode: false,
                            manMaps: false,
                            sideOfStreetDisplay: false,
                            useTraffic: false
                        }
                    });
                }
  

快乐编码......