[Cartoweb-users] Geostat demo. Required parameters on .ini file

Albert Casanovas casanovas at k2sistemas.com.br
Wed Jun 4 13:55:34 EDT 2008


Yes we did it. We are trying to put the content of the config file in a Global variable in order to do a kind of HashTable to recover afterwards the value of the SELECT depending on the layer name, should work using something like:

$GLOBALS['$layerSQL'] = array();


  ----- Original Message ----- 
  From: Oliver Christen 
  To: Albert Casanovas ; cartoweb-users at lists.maptools.org 
  Sent: Wednesday, June 04, 2008 2:49 AM
  Subject: Re: [Cartoweb-users] Geostat demo. Required parameters on .ini file

  did you defined the query object in the /common/ part of the plugin ?

    ----- Original Message ----- 
    From: Albert Casanovas 
    To: cartoweb-users at lists.maptools.org 
    Sent: Tuesday, June 03, 2008 8:11 PM
    Subject: [Cartoweb-users] Geostat demo. Required parameters on .ini file


    We have included a new parameter in the geostat.ini file which includes the SELECT to take the results from to paint the cloropeth. 

    We need to recover the parameter in the ServerGeostat.php without sending it through the ClientGeostat.php generated formular, so we need to pass it as the "layer" and "indicator" parameters are passed.

    The new parameter is "query" has been included in the corresponding common/Geostat.php, the parsing of the ini file in the ServerGeostat.php and other necessary places and we need to put it also in the required parameters of the following handlePreDrawing function:

    public function handlePreDrawing($requ) {

            $this->geostatResult = new GeostatResult();
            $this->geostatResult->choroplethParams =

            $this->log->debug('Drawing Geostat');

            if ( $requ->status == true &&
                $requ->choroplethParams->layer &&
                $requ->choroplethParams->layer != 'def' &&
                $requ->choroplethParams->indicator &&
                $requ->choroplethParams->indicator != 'def') {
                try {
                } catch (Exception $e) {
                    throw new CartoserverException("Cannot draw choropleth" .
                        "\n" . $e->getMessage());

            } else {
                $this->geostatResult->choroplethDrawn = false;

            return $this->geostatResult;

    The problem is that when we include the lines

    $requ->choroplethParams->query &&
    $requ->choroplethParams->query != 'def' &&

    The application does an intern error which we cant get any description but does not show any result, and if we dont include these lines, the application goes normally but does not pass the content of the variable.

    Thanks a lot,


    Cartoweb-users mailing list
    Cartoweb-users at lists.maptools.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080604/24d5d096/attachment.html

More information about the Cartoweb-users mailing list