Geofield Display Format Data Options (Using Bounding Box) I am using Geofield to store point and polygon features. Input works fine with all the different widgets I have tried.

Display formats (GeoJSON, WKT, KML) with Data Options "Use full geometry" and "Use centroid" work fine with either point or polygon geometries. When I use the Data Option " Use bounding box" it does not work with any geometry and get the following error:

Exception: Cannot construct Point. x and y should be numeric in Point->__construct() (line 23 of ....../sites/all/modules/geophp/geoPHP/lib/geometry/Point.class.php).

Is this a known bug? My search did not find any reports. Or is it my configuration?


Drupal 7.20 
Geofield 7.x.1.1 
geoPHP 7.x.1.7  
PHP (MAMP) 5.4.4
i had the same problem and found a quick and dirty solution:
in the referenced file Point.class.php the following function throws the error:

  public function __construct($x, $y, $z = NULL) {
    // Basic validation on x and y
    if (!is_numeric($x) || !is_numeric($y)) {
        throw new Exception("Cannot construct Point. x and y should be numeric");
    }


adding "echo $x;" before the "throw" showed me the problem:
the numbers for $x and $y where in the wrong "local" format.

e.g. 9,34124 instead 9.34124

  public function __construct($x, $y, $z = NULL) {
    $x = floatval(str_replace(',', '.', str_replace('.', '', $x)));
    $y = floatval(str_replace(',', '.', str_replace('.', '', $y)));
    // Basic validation on x and y
    if (!is_numeric($x) || !is_numeric($y)) {
     throw new Exception("Cannot construct Point. x and y should be numeric");
    }


is my dirty fix for this...

regards
nicolaj