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

Oliver Christen oliver.christen at camptocamp.com
Wed Jun 4 01:49:37 EDT 2008

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/f147dfa5/attachment.html

More information about the Cartoweb-users mailing list