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

Oliver Christen oliver.christen at camptocamp.com
Thu Jun 5 02:13:17 EDT 2008


can you show me the content of your buildRequest and of the common *Request class ?
  ----- Original Message ----- 
  From: Albert Casanovas 
  To: Oliver Christen ; cartoweb-users at lists.maptools.org 
  Sent: Wednesday, June 04, 2008 7:55 PM
  Subject: Re: [Cartoweb-users] Geostat demo. Required parameters on .ini file


  Hi,

  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();

  Regards,
  Albert

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


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

    regards
    Oliver
      ----- 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



      Hi,

      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 =
                  $requ->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 {
                      $this->drawChoropleth($requ->choroplethParams);
                  } 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,
      Albert




--------------------------------------------------------------------------


      _______________________________________________
      Cartoweb-users mailing list
      Cartoweb-users at lists.maptools.org
      http://lists.maptools.org/mailman/listinfo/cartoweb-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080605/98bb625f/attachment-0001.html


More information about the Cartoweb-users mailing list