<?php
//$Id$ 
//gen openMairie le 27/06/2012 11:37 
require_once ("../gen/obj/om_sig_map_wms.class.php");

class om_sig_map_wms extends om_sig_map_wms_gen {

    function om_sig_map_wms($id,&$db,$debug) {
        $this->constructeur($id,$db,$debug);
    }// fin constructeur

    function setType(&$form,$maj) {
        parent::setType($form,$maj);
        if($maj<2){
            $form->setType('om_sig_wms','select');
            $form->setType('om_sig_map', 'hidden');
            $form->setType('visibility', 'checkbox');
            $form->setType('panier', 'checkbox');
            $form->setType('pa_type_geometrie','select');
        }

        if ($maj == 2 or $maj == 3) {
            $form->setType('om_sig_wms','selectstatic');
            $form->setType('pa_type_geometrie','selectstatic');
        }
    }

    function setTaille(&$form,$maj) {
        parent::setTaille($form,$maj);
        //taille des champs affiches (text)
        $form->setTaille('om_sig_wms',20);
        $form->setTaille('ol_map',50);
        $form->setTaille('ordre',4);
        $form->setTaille('pa_nom',20);
        $form->setTaille('pa_layer',50);
        $form->setTaille('pa_attribut',50);
        $form->setTaille('pa_encaps',3);
        $form->setTaille('pa_type_geometrie',30);
    }

    function setMax(&$form,$maj) {
        parent::setMax($form,$maj); 
        $form->setMax('ol_map',50);
        $form->setMax('ordre',4);
        $form->setMax('pa_nom',50);
        $form->setMax('pa_layer',50);
        $form->setMax('pa_attribut',50);
        $form->setMax('pa_encaps',3);
    }

    function setLib(&$form,$maj) {
        parent::setLib($form,$maj);
        //libelle des champs
        $form->setLib('om_sig_wms',_('flux WMS : '));
        $form->setLib('ol_map',_('nom map OpenLayer : '));
        $form->setLib('ordre',_('ordre : '));
        $form->setLib('visibility',_('visible par defaut :'));
        $form->setLib('pa_nom',_('nom du panier :'));
        $form->setLib('pa_layer',_('couche :'));
        $form->setLib('pa_attribut',_('attribut :'));
        $form->setLib('pa_encaps',_('champ encapsulation :'));
        $form->setLib('pa_sql',_('requete (&lst) :'));
        $form->setLib('pa_type_geometrie',_('type de geometrie'));
    }

    function setSelect(&$form, $maj,&$db,$debug) {
        parent::setSelect($form, $maj,$db,$debug);

        if(file_exists ("../dyn/var_sig.inc")) {
            include ("../dyn/var_sig.inc");
        }

        $form->setSelect("pa_type_geometrie",$type_geometrie);
    }

}// fin classe
?>
