APP_Geo_Query::get_smart_radius( float $lat_c, float $lng_c, float $lat_1, float $lng_1, float $lat_2, float $lng_2, string $unit )

Calculates the radius of the circle described around the rectangle with the given coordinates of the vertices.


Package


Description Description

The center of the circle is not necessary the center of rectangle. This why the radius is always more or equal half of rectangle diagonal.


Parameters Parameters

$lat_c

(float) (Required) The latitude of the circle center.

$lng_c

(float) (Required) The longitude of the circle center.

$lat_1

(float) (Required) The latitude of the NE boundary corner.

$lng_1

(float) (Required) The longitude of the NE boundary corner.

$lat_2

(float) (Required) The latitude of the SW boundary corner.

$lng_2

(float) (Required) The longitude of the SW boundary corner.

$unit

(string) (Required) The distance unit.


Top ↑

Return Return

(int)


Premium WordPress Apps

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.