例10:レイヤ管理の追加 (adding layer controls)



この例ではレイヤ管理機能を追加します。 レイヤ管理機能を実現するには、テンプレート・ファイルに HTML のチェック・ボックスを追加する必要があります。 MapServer はチェック・ボックスのオン/オフによって、 マップ・ファイルの LAYER オブジェクトにある STATUS パラメータの値を変更し、レイヤの表示/非表示を切り替えます。
This example adds the ability to turn on/off layers. In the HTML template file you need to add a check box with the name "layer", and the value of each checkbox should be the name of the layer from the mapfile; MapServer will change the layer's STATUS parameter accordingly..