<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16608" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$GLOBALS['$layerSQL'] = array();</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Albert</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=oliver.christen@camptocamp.com
href="mailto:oliver.christen@camptocamp.com">Oliver Christen</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=casanovas@k2sistemas.com.br
href="mailto:casanovas@k2sistemas.com.br">Albert Casanovas</A> ; <A
title=cartoweb-users@lists.maptools.org
href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, June 04, 2008 2:49
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Cartoweb-users] Geostat
demo. Required parameters on .ini file</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2>Hi</FONT></DIV>
<DIV><FONT size=2>did you defined the query object in the /common/ part of the
plugin ?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>regards</FONT></DIV>
<DIV><FONT size=2>Oliver</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=casanovas@k2sistemas.com.br
href="mailto:casanovas@k2sistemas.com.br">Albert Casanovas</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=cartoweb-users@lists.maptools.org
href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, June 03, 2008 8:11
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Cartoweb-users] Geostat demo.
Required parameters on .ini file</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>We have included a new parameter in the
geostat.ini file which includes the SELECT to take the results from to paint
the cloropeth. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>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:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>public function handlePreDrawing($requ)
{</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>
$this->geostatResult = new
GeostatResult();<BR>
$this->geostatResult->choroplethParams
=<BR>
$requ->choroplethParams;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>
$this->log->debug('Drawing Geostat');</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> if (
$requ->status == true
&&<BR>
$requ->choroplethParams->layer
&&<BR>
$requ->choroplethParams->layer != 'def'
&&<BR>
$requ->choroplethParams->indicator
&&<BR>
$requ->choroplethParams->indicator != 'def')
{<BR> try
{<BR>
$this->drawChoropleth($requ->choroplethParams);<BR>
} catch (Exception $e)
{<BR>
throw new CartoserverException("Cannot draw choropleth"
.<BR>
"\n" . $e->getMessage());</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>
}<BR> } else
{<BR>
$this->geostatResult->choroplethDrawn =
false;<BR> }</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>
return $this->geostatResult;<BR> }</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The problem is that when we include the
lines</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$requ->choroplethParams->query
&&<BR>$requ->choroplethParams->query != 'def'
&&</FONT><BR></DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks a lot,</FONT></DIV>
<DIV><FONT face=Arial size=2>Albert</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Cartoweb-users
mailing
list<BR>Cartoweb-users@lists.maptools.org<BR>http://lists.maptools.org/mailman/listinfo/cartoweb-users<BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>