Download "user manual"

Transcript
Editing
May differ from the msLayer type (rendering)
•
edit_srid: integer (optional), id of the SRID
•
edit_attributes: string, comma separated list of attributes used for edition.
Each value represents the attribute name and type separated by a pipe symbol.
Only attributes with type set are editable.
Warning
Attribute types available values are 'string' and 'integer'.
14.3. How To
In this section are described the steps to get the edit plugin working on a cartoweb
project.
•
First, you need a PostgreSQL database with postGIS enabled. Let's say, it is
named "edit_db" for the following explanations.
•
At that point, you may launch demoEdit_schema.sql and demoEdit_data.sql.
located in the
<CARTOWEB_HOME>/projects/demoEdit/ directory.
This will create 3 sample geometry tables, one for each type of geometry.
•
In CartoWeb, you'll have to load the edit plugin in your project on both
client and server sides.
loadPlugins = [...], edit
•
Then, you'll need to configure the plugin by setting the layer_ids in the
editLayers parameter in the edit.ini file.
editLayers = edit_poly, edit_line, edit_point
•
In your mapfile, in the corresponding LAYER, you'll have to set the specific
metadatas as following :
LAYER
NAME "edit_poly"
STATUS ON
TYPE POLYGON
CONNECTIONTYPE POSTGIS
CONNECTION 'dbname=edit_db user=www-data password=www-data host=localhost'
DATA 'the_geom from (select the_geom, oid, parc_id, name, culture, surf, parc_type
107
from edit_poly)