【发布时间】:2014-06-11 15:11:07
【问题描述】:
我正在尝试在某个区域的边界内生成一些地理位置,现在我正在尝试在这些边界内生成地理位置
$bounds = array(
array(55.4024447, 13.1656691),
array(56.1575776, 15.8350261),
array(68.0410163, 17.4600359),
array(58.9380148, 11.3501468),
array(67.6820048, 16.1964251)
);
现在我的检查如下
if (
($bounds[0][0] < $lat && $bounds[0][1] < $lng) &&
($bounds[1][0] < $lat && $bounds[1][1] > $lng) &&
($bounds[2][0] > $lat && $bounds[2][1] > $lng) &&
($bounds[3][0] > $lat && $bounds[3][1] < $lng) &&
($bounds[4][0] > $lat && $bounds[4][1] > $lng)
) {
但是,这只会获取中间正方形内的位置,而不是整个区域 您知道如何在整个区域内进行检查吗?
【问题讨论】:
-
查看我对类似问题的回答Here。它使用 javascript。
-
感谢朋友,好帖子
标签: php geolocation geo