例11:照会 (adding layer queries)



この例では照会機能を追加します。 MapServer の照会機能を使用するためには、mode パラメータを query (単一の照会結果用)あるいは nquery (複数の照会結果用)に設定する必要があります。 そして、MapServer は照会結果を表示するためのテンプレート・ファイルを定義 しているレイヤを探します。
複数の照会結果を表示するには、テンプレート・ファイルをヘッダー、 テンプレートおよびフッターに分割することができます。 ヘッダーには、照会結果を表示する前の HTML 情報が含まれます。 フッターには、照会結果を表示した後の情報が含まれます。 テンプレートには照会結果そのものが含まれます。

This example adds the ability to query. MapServer requires the map mode to be set to 'query' (for a single query result) or 'nquery' (for multiple query results). MapServer also requires the layer to have a TEMPLATE set in the mapfile.
To view the results of multiple queries, the template file header and footer can be split into different files. The header file displays the HTML shown before the results. The footer file contains the HTML shown after the query results. The template file itself contains the query results.