<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>CHAMELEON Query - parameters - map_query.php</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>
<UL>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Hi friends,</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Please, I need help!</FONT></SPAN>
</P>
<P ALIGN=JUSTIFY><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">I have developed my application over the software: W2000 (Internet Information Server), chameleon 1.99b2, php4.3.7, phpmapscript 4.2, mapserver 4.</FONT></SPAN></P>
<P ALIGN=JUSTIFY><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">My application needs to show the attributes of the layer and that it displays the map and resulting data of the consultation like: attribute > value .</FONT></SPAN></P>
<P ALIGN=JUSTIFY><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">I personalized the file map_query.php (line 480), so that it spreads to the data additionally a map with a consultation defaulted (RANKGES = 3) . But, I need that the parameters of my consultation are correspondents from my main page where this file map_query.php to obtain the results as it is shown in the figure 1.</FONT></SPAN></P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Thanks, very much</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Sandra</FONT></SPAN>
</P>
<BR>
<P><SPAN LANG="es"><FONT SIZE=2 FACE="Arial">Adj.</FONT></SPAN>
</P>
<P><SPAN LANG="es"><FONT SIZE=2 FACE="Arial">Part of the file map_query.php</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> $campo = "RANKGES";</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> $consulta = "('[RANKGES]' = '3')";</FONT></SPAN>
</P>
<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> if(@$oLayer->querybyattributes($campo,$consulta,MS_MULTIPLE)==MS_SUCCESS)</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> {</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> $nNumResults = intval($oLayer->getNumResults()); </FONT></SPAN>
<BR><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">$oLayer->open();</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> for ($i=0; $i < $nNumResults; $i++)</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> {</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> // get next shape row</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> $oResult = $oLayer->getResult($i);</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> $oShape = $oLayer->getShape($oResult->tileindex,</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> $oResult->shapeindex);</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> </FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> // push the row array onto the results array</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> //$aTmp = $oShape->values;</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> $aTmp = array("CONSEJO PROVINCIAL" => $oShape->values["CAN_PROV"], </FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> "MUNICIPIO" => $oShape->values["CAN_DES"], </FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> "COD_ENTI" => $oShape->values["COD_ENTI"], </FONT></SPAN>
<BR><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial"> "RANK. GESTION" => $oShape->values["RANKGES"], </FONT></SPAN>
<BR><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial"> "RANK. AUTOSUF." => $oShape->values["RANKAUTO"], </FONT></SPAN>
<BR><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial"> "RANK. ENDEUD." => $oShape->values["RANKDEU"], </FONT></SPAN>
<BR><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial"> "CALIF.</FONT></SPAN><SPAN LANG="es"> <FONT SIZE=2 FACE="Arial">RIESGO" => $oShape->values["CALIFICA"]);</FONT></SPAN>
<BR><SPAN LANG="es"><FONT SIZE=2 FACE="Arial"> </FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">array_push( $axResults, $aTmp );</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> </FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> // end for loop </FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> } $q_img = $oMap->drawquery(); </FONT></SPAN>
<BR><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">$q_path =$q_img->savewebimage();</FONT></SPAN>
<BR><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">echo "Consulta: "."<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$consulta."<br>"; </FONT></SPAN></P>
<P><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">echo "<img src=".$q_path.">";</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> </FONT></SPAN><SPAN LANG="es"> <FONT SIZE=2 FACE="Arial">} else</FONT></SPAN>
<BR><SPAN LANG="es"><FONT SIZE=2 FACE="Arial"> {</FONT></SPAN>
</P>
</UL>
</BODY>
</HTML>