mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Load GeoPHP in farm_map_polygon_area().
This commit is contained in:
parent
b494614af7
commit
443535e710
1 changed files with 3 additions and 0 deletions
|
@ -522,6 +522,9 @@ function farm_map_line_length($line) {
|
|||
*/
|
||||
function farm_map_polygon_area($polygon) {
|
||||
|
||||
// Load GeoPHP.
|
||||
geophp_load();
|
||||
|
||||
// If the geometry is not a polygon, bail.
|
||||
if ($polygon->geometryType() != 'Polygon' || $polygon->components[0]->geometryType() != 'LineString') {
|
||||
return $polygon;
|
||||
|
|
Loading…
Reference in a new issue