[Cartoweb-users] Geostat demo. Required parameters on .ini file
Albert Casanovas
casanovas at k2sistemas.com.br
Tue Jun 3 14:11:15 EDT 2008
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080603/f4062be8/attachment.html
More information about the Cartoweb-users
mailing list