[Chameleon] Query non visible layers?

Massimiliano Cannata massimiliano.cannata at supsi.ch
Fri Jul 21 07:20:20 EDT 2006


in the QueryResult.phtml (into the query widget folder) comment lines 
94, 95 and 112...
it takes off the check for layer to be visible to run the query...

THUS YOU HAVE TO REPLACE:
if ($oLayer->status == MS_ON || $oLayer->status == MS_DEFAULT)
       {
           if ($oLayer->template != "")
           {
               $bQueryable = true;
           }
           else
           {
               for( $j=0; $j < $oLayer->numclasses; $j++)
               {
                   $oClass = $oLayer->getClass($j);
                   if ($oClass->template != "")
                   {
                       $bQueryable = true;
                       break;
                   }
               }
           }
       }

WITH:
if ($oLayer->template != "")
{
 $bQueryable = true;
}
 else
{
 for( $j=0; $j < $oLayer->numclasses; $j++)
   {
     $oClass = $oLayer->getClass($j);
     if ($oClass->template != "")
     {
        $bQueryable = true;
        break;
     }
   }
}

Hope it helps...
Maxi

-- 

Dr. Eng. Massimiliano Cannata
Scuola Universitaria Professionale della Svizzera Italiana
Istituto Scienze della Terra
Via Trevano, c.p. 72
CH-6952 Canobbio-Lugano
Tel: +41 (0)58 666 62 14
Fax +41 (0)58 666 62 09 



caspar gilles wrote:
> Hi,
>
> I m using the Query widget and I would like to do a spatial query with 
> several layers at once, but a few of them are invisble (status off).
>
> Is there are a way that I can include those layers in my query?
>
> Cheers,
>
> Gilles
>
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>
>


-- 

Dr. Eng. Massimiliano Cannata
Scuola Universitaria Professionale della Svizzera Italiana
Istituto Scienze della Terra
Via Trevano, c.p. 72
CH-6952 Canobbio-Lugano
Tel: +41 (0)58 666 62 14
Fax +41 (0)58 666 62 09 




More information about the Chameleon mailing list