<div>Thank you Pierre four your fast answer.</div>
<div> </div>
<div>This is my label table:</div>
<div> </div>
<div> CREATE TABLE sector<br> (<br> gid int4 NOT NULL DEFAULT nextval('sector_gid_seq'::regclass),<br> ___dummy varchar,<br> the_geom geometry,<br> <strong>open int4 NOT NULL DEFAULT 0,</strong><br>
CONSTRAINT sector_pkey PRIMARY KEY (gid),<br> CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2),<br> CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL),
<br> CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = -1)<br> ) <br> WITHOUT OIDS;<br> ALTER TABLE sector OWNER TO postgres;</div>
<div> </div>
<div>but I only need to change the "open" variable. If I put one '0' it print the shape red, and if '1' it prints green.</div>
<div>This is my part of .map that make this.</div>
<div> </div>
<div> LAYER<br> NAME "sector140"<br> CONNECTIONTYPE postgis<br> CONNECTION "user=postgres password=postgres dbname=prova host=<a href="http://10.56.0.195">10.56.0.195</a> port=5432"<br> DATA "the_geom from sector"
<br> TYPE POLYGON<br> TRANSPARENCY 50<br> TEMPLATE "ttt"<br> CLASSITEM "open"<br> CLASS<br> NAME "opened"<br> EXPRESSION "1"<br> STYLE<br> COLOR 0 255 0 <br>
OUTLINECOLOR 255 180 180<br> END<br> END<br> CLASS<br> NAME "closed"<br> EXPRESSION "0"<br> STYLE<br> COLOR 255 0 0 <br> OUTLINECOLOR 255 180 180<br> END<br>
END</div>
<div> </div>
<div>It works, but Can anyone help me to make the plugin for change the variable in Database? I never write a plugin yet :(</div>
<div> </div>
<div>Many thanks.</div>
<div> </div>
<div> </div>
<div> </div>
<div>> I can change the colour of the shapes through changing one variable in<br>> my databse.<br><br>How do you do that ? Directly in your mapfile using a field value in<br>your database ?<br><br>> But can I change this variable in Cartoweb interface? and if the
<br>> answer is yes how?<br><br>This could be the job of a new plugin in your project.<br>On client side, this would add a form button on the interface and handle<br>it to send a specific request to the server side.<br>
On server side, this would call the mapOverlay plugin to change the<br>style of the defined layer.<br><br>><br>> I don't know if I explained. I need change the colour of the shapes<br>> through buttons in the same interface.
<br>><br>> Many thanks.<br>><br>>------------------------------------------------------------------------</div>