Finding intermediate Lattitude Longitude between two given points

后端 未结 2 1548
野趣味
野趣味 2021-01-16 11:57

I am provided with this information -

  1. Lat-Long of source
  2. Lat-Long of destination

I need to find the Lat-Long pairs on the path from so

相关标签:
2条回答
  • 2021-01-16 12:27

    The Google Maps API Elevation Service does exactly that. Given a path (defined by your source and destination LatLng pair), you also specify the number of samples and it will return elevation for specific LatLng points along that path. Just ignore the elevation information.

    The Elevation Web Service is available for use separate from the Google Maps API v3. However make sure that your usage still falls within the terms of service.

    To retrieve granular points along a driving path, use the Google Maps API Directions Service to obtain the full driving path and use that path as the input to the Elevation Service.

    0 讨论(0)
  • 2021-01-16 12:40

    I think what you are looking for is the directions api from google https://developers.google.com/maps/documentation/directions/

    You give it the origin and destination and then specify your travelmode (which is car by default but you can also say you are walking or using transit)

    0 讨论(0)
提交回复
热议问题