2

I have a database with list of latitude and longitude points i want to search.

Now, how can i list the latitude and long points which are situated in between 0 and 45 degrees or in range of 15 to 30 degrees . Is there any method or api.

The post values are lat,long and degreeslowerlimit and degreesupperlimit.

Please help me to achieve this

4

2 回答 2

1

假设你的数据库是 MySQL

$minLat = $_POST[degreeslowerlimit);//depending on your parameters
$maxLat = $_POST[degreeslowerlimit) ;

$STH = $dbh->prepare('SELECT * FROM table WHERE `latitude` BETWEEN :minLat AND :maxLat')
$STH->bindParam(':minLat', $minLat);
$STH->bindParam(':maxLat', $maxLat);

$STH->execute();
于 2012-10-17T10:31:46.667 回答
0

http://transition.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html

检查Javascript。这很简单。

于 2012-10-17T07:50:27.740 回答