[Chameleon] result_fields setting for query/identify
Jason Fournier
jfournier at dmsolutions.ca
Tue Mar 29 18:34:44 EST 2005
Tyler,
I don't think the current Query widget implementation supports metadata
delimitation of resulting fields. I would imagine you'd either have to
modify the widget to support this or hardcode expected fields in the
query.phtml file.
Another option would be to use the Custom Query implementation
(http://chameleon.maptools.org/tiki/tiki-index.php?page=QueryWidgetCustomizingResults).
the query.phtml file could contain an array something like:
$aNoShow = array( 'SHAPE_INDEX', 'TILE_INDEX', 'LAYER_INDEX',
'GEOMETRY', 'gml:boundedBy', 'gml:Point' );
Then when you are looping through your results you could check to see if
the fieldname matches your noshow values - if not then show the field:
foreach($aResult as $key => $aRow)
{
foreach($aRow as $attr => $val)
{
if( !in_array( $attr, $aNoShow ) )
{
$szResults .= "<tr><td
width=\"20\"> </td>\n";
$szResults .= "<td width=\"75\"><span
class=\"queryKey\">$attr</span></td>\n";
$szResults .= "<td valign=\"top\"><span
class=\"queryValue\">$val</span></td></tr>\n";
}
}
}
In this instance $aResult is the result of executeQuery().
Jason
Tyler Mitchell wrote:
> Is there an equivalent metadata tag I should be using to limit the
> fields returned from an identify? I used to use
> "RESULT_FIELDS" "fieldname1 fieldname2"
> to only show certain fields. What is the method for doing this with the
> identify widget?
>
> Tyler
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>
--
________________________
Jason Fournier
DM Solutions Group Inc.
jfournier at dmsolutions.ca
www.dmsolutions.ca
613.565.5056 x18
More information about the Chameleon
mailing list