Google Distance Matrix need to return the value

后端 未结 2 1467
一个人的身影
一个人的身影 2021-02-11 07:15

I have using google distance matrix api to getting the shortest distance of two geo points from the following way:



        
2条回答
  •  無奈伤痛
    2021-02-11 08:07

    I would make an array as a global variable with the number of elements as well a global variable. Then, in the callback I would increment the number of elements and set the current array element as the distance.

    Hope this answers your question. Best of luck!

提交回复
热议问题