我正在使用下面的代码。我只想计算优化路线的距离和总的行驶时间。有人能帮我拿到这个吗。
<script type="text/javascript">
// download the module
var map = new MQA.TileMap(document.getElementById('map'));
MQA.withModule('new-route', function () {
// uses the MQA.TileMap.addRoute function to pass i
在我的应用程序中,我正在创建一条从来源到目的地的路线,并使用google directions api,以在文本框中显示驾驶方向。我正在解析json格式的方向响应,并显示html指令。问题是,假设我在A位置,在B位置有一个转弯,那么当我到达B位置时,我得到了与B位置相关的html指令,而不是在此之前。
我用来显示方向的逻辑是:
1. Parse the json response and store the html instructions and their relevant coordinates in a array
2. Checking the current updated