在两个给定点之间查找中间纬度经度 [英] Finding intermediate Lattitude Longitude between two given points

查看:127
本文介绍了在两个给定点之间查找中间纬度经度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • Lat-Long的源代码
  • 目的地很长

  • 我需要在从源到目的地的路径上找到Lat-Long对。这些Lat-Long对必须有一定的粒度差异。



    是否有一些Google API可以用来获取这些信息?

    解决方案

    Google地图API高程服务就是这样做的。给定一条路径(由您的源和目标LatLng对定义),您还可以指定样本的数量,并将返回沿该路径的特定LatLng点的高程。只需忽略海拔信息即可。



    海拔Web服务可独立于Google Maps API v3使用。但请确保您的使用情况仍然符合服务条款



    要检索驾车路线上的粒度点,请使用Google Maps API路线服务获取完整的驾车路线,并将该路径用作Elevation Service的输入。


    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 source to destination. These Lat-Long pairs must differ from each other by some given granularity.

    Is there some Google API using which I can get this information ?

    解决方案

    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.

    这篇关于在两个给定点之间查找中间纬度经度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆