GoogleMaps Polyline Length in V3

后端 未结 7 1184
半阙折子戏
半阙折子戏 2020-12-10 23:30

There doesn\'t seem to be a length funciton for the Polyline in Google Maps anymore in V3.

Has anyone found a workaround for this functionality gap?

7条回答
  •  [愿得一人]
    2020-12-10 23:59

    If you got the polyline from DirectionsService, check distance and duration in DirectionsLeg.

    https://developers.google.com/maps/documentation/javascript/reference#DirectionsLeg

提交回复
热议问题