Version 1 (modified by 17 years ago) ( diff ) | ,
---|
HowTo set displayed attribute on query
Introduction
This feature is to limit the displayed attributes on query. This following document explains how to set displayed attributes on query.
Setting up the Mapfile
The suggested method to define the displayed attributes is through the layer's METADATA. The available mapfile parameters are defined below:
- query_include_items: Include these items to display. The string all can be set to include all items.
- query_exclude_items: Exclude these items to display.
- query_*_alias : Set the Alias (diplayed label) of an item where * is replaced by the item name.
The items name are the exact name retreived in the database. All items in query_include_items and query_exclude_items must be separated by a comma.
Example of use
Example 1
LAYER NAME "Parcels" GROUP "Parcels" DATA "parcelsDatabase" STATUS on TYPE polygon MAXSCALE 20000 TEMPLATE "ttt" METADATA "SELECTABLE" "TRUE" "query_include_items" "PARCEL_ID, OWNER, LOCATION" "query_PARCEL_ID_alias" "# Parcel" "query_OWNER_alias" "The Owner" END CLASS NAME "Parcels" STYLE OUTLINECOLOR 156 156 156 END END END
Example 2
LAYER NAME "Parcels" GROUP "Parcels" DATA "parcelsDatabase" STATUS on TYPE polygon MAXSCALE 20000 TEMPLATE "ttt" METADATA "SELECTABLE" "TRUE" "query_include_items" "all" "query_exclude_items" "LOCATION" "query_PARCEL_ID_alias" "# Parcel" "query_OWNER_alias" "The Owner" END CLASS NAME "Parcels" STYLE OUTLINECOLOR 156 156 156 END END END
Note:
See TracWiki
for help on using the wiki.