直接通过api即可获得
例如
https://maps.googleapis.com/maps/api/distancematrix/json?origins=上海七宝&destinations=上海松江泗泾&key=你申请的key值