/**
@param double $x Longitude
@param double $y latitude
@param double $d distance unit/meter
@return Array
*/
function GetRange ($x, $y, $d) {
}
As above function,
$x indicates the longitude of the point
$y represents the latitude of the point
$d distance from the point of departure
Return latitude and longitude range
Reply content:
/**
@param double $x Longitude
@param double $y latitude
@param double $d distance unit/meter
@return Array
*/
function GetRange ($x, $y, $d) {
}
As above function,
$x indicates the longitude of the point
$y represents the latitude of the point
$d distance from the point of departure
Return latitude and longitude range
Go to Google "calculate the distance between two points by latitude"
If the accuracy requirements are not high, you can calculate it by yourself. The radius of the Earth, you know? Longitude is dividing the Earth's surface into 360 equal latitudes, the latitude is divided into 180 equal, so that the distance and the center point given to calculate the span of latitude and longitude.
If the accuracy requirements are high, it is best to see if there is a third-party professional interface can be used (such as Google Maps, high-level map, Baidu map These)
Isn't that a math problem?