3
0
Fork 0
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:
Michael Stenta 2019-12-31 10:38:56 -05:00
parent b494614af7
commit 443535e710

View file

@ -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;