6
我目前正在计算一个函数内的一个wordpress网站上两点之间的行驶距离。我做到这一点使用谷歌距离矩阵通过调用计算“作为乌鸦”的距离php
wp_remote_get(
"http://maps.googleapis.com/maps/api/distancematrix/json?origins=".
urlencode($origin).
"&destinations=".
urlencode($destination).
"&sensor=false&units=imperial"
)
,然后插入起始点和目的地用户已经通过形式进入网址输入。是否有可能使用类似的方法来计算“像乌鸦一样”的距离,还是必须重新修改我的功能?
,你可以没有谷歌地图做。搜索让您获得地球上两点之间物理最短距离的公式。 – MAXIM
此问题与Google Maps API V3无关。 (标签已移除) – Marcelo