[Chameleon] CHAMELEON Query - parameters - map_query.php
Rodriguez Sandra
rodriguezs at bancoestado.com
Thu Dec 9 09:19:10 EST 2004
> Hi friends,
>
> Please, I need help!
>
> I have developed my application over the software: W2000 (Internet Information Server), chameleon 1.99b2, php4.3.7, phpmapscript 4.2, mapserver 4.
> 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 .
>
> 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.
>
> Thanks, very much
>
> Sandra
>
>
> Adj.
>
> Part of the file map_query.php
>
> $campo = "RANKGES";
> $consulta = "('[RANKGES]' = '3')";
>
> if(@$oLayer->querybyattributes($campo,$consulta,MS_MULTIPLE)==MS_SUCCESS)
> {
> $nNumResults = intval($oLayer->getNumResults());
> $oLayer->open();
> for ($i=0; $i < $nNumResults; $i++)
> {
> // get next shape row
> $oResult = $oLayer->getResult($i);
> $oShape = $oLayer->getShape($oResult->tileindex,
> $oResult->shapeindex);
>
> // push the row array onto the results array
> //$aTmp = $oShape->values;
> $aTmp = array("CONSEJO PROVINCIAL" => $oShape->values["CAN_PROV"],
> "MUNICIPIO" => $oShape->values["CAN_DES"],
> "COD_ENTI" => $oShape->values["COD_ENTI"],
> "RANK. GESTION" => $oShape->values["RANKGES"],
> "RANK. AUTOSUF." => $oShape->values["RANKAUTO"],
> "RANK. ENDEUD." => $oShape->values["RANKDEU"],
> "CALIF. RIESGO" => $oShape->values["CALIFICA"]);
> array_push( $axResults, $aTmp );
>
> // end for loop
> } $q_img = $oMap->drawquery();
> $q_path =$q_img->savewebimage();
> echo "Consulta: "."<br> ".$consulta."<br>";
> echo "<img src=".$q_path.">";
> } else
> {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20041209/c2e84294/attachment.html
More information about the Chameleon
mailing list