You are here

function gm3_is_valid_polygon in Google Maps API V3 7

Ensure the text for a single polygon is valid

1 call to gm3_is_valid_polygon()
gm3_polygon_items_validate in gm3_field/gm3_field.module
Validation functions -----------------------------------------------------------------------------

File

gm3_field/gm3_field.module, line 525

Code

function gm3_is_valid_polygon($polygon) {

  // Load the Library.
  gm3_load_geophp();
  $wkt_reader = new WKT();
  return $wkt_reader
    ->read($polygon, TRUE);
}