[Cartoweb-users] Problem with edit plugin.

Gilles BÉRÉTA gbereta at agglo-clermont.fr
Tue Mar 13 06:01:16 EST 2007


Oliver Christen a écrit :
> Hi Gilles
>
> either you modify your table or your modify the sql in ServerEdit.php 
> line 503, but I dont know what could be the side effects, maybe it 
> will work.
>
> regards
> Oliver
>
>> Hi,
>>
>> I have a problem with the edit plugin :
>>
>> I have a table with several field but no "oid" field.
>> Instead of "oid" field, I have a "gid" one.
>> When I want to edit this layer Cartoweb doesn't find the "oid" field 
>> and doesn't want to edit it.
>> Here is a piece of my .map.
>>
>> "LAYER
>>  NAME "eco_locaux_zfu"
>>  TYPE POINT
>>  CONNECTIONTYPE POSTGIS
>>  CONNECTION "dbname=XXX user=XXX password=XXX host=XXX"
>>  DATA "the_geom from (select the_geom, gid, identifiant_local_zfu, 
>> numobj, anglobj, idelocal, numero_de_zone, reference_cadastrale, 
>> sous_partie, datrecen, enseigne, activite, dirigeant, siret, codeape, 
>> numvoie, adresse, batiment, appart, etage, tel, fax, courriel, 
>> nom_du_proprietaire, adresse_du_proprietaire, 
>> telephone_du_proprietaire, fax_du_proprietaire, 
>> courriel_du_proprietaire, type_de_terrain, surface_du_terrain, 
>> type_de_local, surface_du_local, occupe, disponible, transaction, 
>> fichier, wfiche from eco_locaux_zfu ) as foo"
>>  TEMPLATE "ttt"
>>  METADATA
>>    "id_attribute_string" "identifiant_local_zfu" # query
>>    "query_returned_attributes" "enseigne activite nom_du_proprietaire 
>> adresse_du_proprietaire telephone_du_proprietaire"
>>    "edit_table" "eco_locaux_zfu" # PostGIS table
>>    "edit_geometry_column" "the_geom" # PostGIS geometry column
>>    "edit_geometry_type" "point" # PostGIS geometry type
>>    "edit_srid" "-1"
>>    "edit_attributes" "numero_de_zone|character 
>> varying,reference_cadastrale|character varying,sous_partie|character 
>> varying,datrecen|character varying,enseigne|character 
>> varying,activite|character varying,dirigeant|character 
>> varying,siret|character varying,codeape|character 
>> varying,numvoie|character varying,adresse|character 
>> varying,batiment|character varying,appart|character 
>> varying,etage|character varying,tel|character varying,fax|character 
>> varying,courriel|character varying,nom_du_proprietaire|character 
>> varying,adresse_du_proprietaire|character 
>> varying,telephone_du_proprietaire|character 
>> varying,fax_du_proprietaire|character 
>> varying,courriel_du_proprietaire|character 
>> varying,type_de_terrain|character 
>> varying,surface_du_terrain|bigint,type_de_local|character 
>> varying,surface_du_local|bigint,occupe|character 
>> varying,disponible|character varying,transaction|character 
>> varying,fichier|character varying,wfiche|character varying" # list of 
>> the editable fields
>>    "edit_filter" "" # mapserver filter
>>  END"
>>
>> What can I do to edit my layer ?
>>
>> Thanks.
>>
>> Gilles BERETA
>>
>>
>> _______________________________________________
>> Cartoweb-users mailing list
>> Cartoweb-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>
>
>
Hi,


I changed "oid" with "gid" in ServerEdit.php and I changed my select 
query : I use DATA "the_geom from (select the_geom, gid...) as foo 
_*using unique gid*_"
It works well !!!

By.

PS : it's ok for the problem with execution time for exportPdf plugin ; 
I changed the max_execution_time value to 200 in my php.ini

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gbereta.vcf
Type: text/x-vcard
Size: 482 bytes
Desc: not available
Url : http://lists.maptools.org/pipermail/cartoweb-users/attachments/20070313/25daa390/gbereta.vcf


More information about the Cartoweb-users mailing list