Comments (12)
As seen this morning I find that using the configuration of the attribute table plugin is more suitable for my personnal use cases.
These kind of support is layer dependent, this means that inside the attribute table configuration the administrator must include specific configuration properties for each layer for which he wants to provide the above (coded values and validations).
Need to test ;)
from mapstore2-georchestra.
We have custom editor options:
See this dependent project.
https://github.com/geosolutions-it/MapStore2-C040/blob/master/localConfig.json#L368
where you define RULES (regex that apply identify the layer and the attribute to apply)
and each rule can use a custom editor.
The linked config has a custom editor called "AddressesEditor", that is a customization present only in that installation.
In MapStore we have only "DropDownEditor" that can be configured with a fixed list of values (this covers the first point).
We can add a NumberEditor that can be used to define min and max and a FormatEditor that checks if the content matches a regex.
from mapstore2-georchestra.
I report some additional information about the meeting:
- We will check if it is possible to add also initial default values for new rows, because this task was not foreseen in the original program
- @MaelREBOUX can you provide us a sample dataset, with write permission and all the data types you need to support, and also the constraints on values for each attribute, so we can ensure that all the use cases are covered? thank you very much
from mapstore2-georchestra.
This is the test layer layer for editing : https://public-test.sig.rennesmetropole.fr/geoserver/wfs?REQUEST=DescribeFeatureType&TYPENAME=test:mapstore_test
But I have issues to correctly set up the permissions for being editing by anyone in WFS. It is not ou traditionnal way...
CREATE TABLE mapstore_test
(
id integer NOT NULL DEFAULT nextval('urba_foncier.mapstore_test_id_seq'::regclass),
att_integer integer,
att_integer_constr integer NOT NULL,
att_long numeric,
att_varchar character varying(50) COLLATE pg_catalog."default" DEFAULT ''::character varying,
att_varchar_constr character varying(50) COLLATE pg_catalog."default" DEFAULT ''::character varying,
att_text text COLLATE pg_catalog."default",
att_text_constr text COLLATE pg_catalog."default",
att_url text COLLATE pg_catalog."default",
att_boolen boolean,
att_date_iso date,
att_date_timestamp timestamp without time zone DEFAULT now(),
geom geometry(Point,3948),
CONSTRAINT mapstore_test_pk PRIMARY KEY (id)
USING INDEX TABLESPACE bdu,
CONSTRAINT att_varchar_constr_dom CHECK (att_varchar_constr::text = ANY (ARRAY['Non renseigné'::text, 'Publicité'::text, 'Pré-enseigne'::text, 'Enseigne'::text])),
CONSTRAINT att_integer_constr_check CHECK (att_integer_constr < 5),
CONSTRAINT att_text_constr_dom CHECK (att_text_constr = ANY (ARRAY['non renseigné'::text, 'permanent'::text, 'temporaire'::text]))
)
from mapstore2-georchestra.
I still cannot correctly set up the permissions for obtain a WFS layer edited by anyone (ie not authentificated).
I wrote a message to the mailing list for support. Could you help ?
from mapstore2-georchestra.
@MaelREBOUX I will check it tomorrow, thank you anyway.
from mapstore2-georchestra.
I still cannot correctly set up the permissions for obtain a WFS layer edited by anyone (ie not authentificated).
I saw that in our DEV instance of geOrchestra there is a specific security rule at WFS service level that prevent other users (also anonymous) to write data through WFS
I'm quite confident that you have something similar in your public-test instance.
Therefore I don't think that you can provide write access to us on test:mapstore_test.
Maybe you can share an export of the dataset in SHP format? If you can do that we can publish it in our DEV instance.
Anyway I think that we don't necessarily need to finally save a modification, what we have to do here is to properly setup the edit mode in MS according to the data and the configuration of the plugin for that layer.
from mapstore2-georchestra.
Sad news but logical for geOrchestra : need to be authentificated for this kind of work.
From our point of view it is important to test in the conditions of production, ie : table with constraints.
So... I think you have a PostGIS database on the demo platform ?
If yes : could you create the layer described above : #49 (comment)
from mapstore2-georchestra.
Sad news but logical for geOrchestra : need to be authentificated for this kind of work.
Of course, that's exactly what I supposed in my previous comment.
From our point of view it is important to test in the conditions of production, ie : table with constraints.
OK
So... I think you have a PostGIS database on the demo platform ?
If yes : could you create the layer described above : #49 (comment)
OK, let's try with this
from mapstore2-georchestra.
@tdipisa
I created a database and table on our DEV environment. I just had to tweak a little the creation script (we don't have a bdu
tablespace or a urba_foncier
schema):
geoserver=> CREATE TABLE mapstore_test
(
id integer NOT NULL DEFAULT nextval('mapstore_test_id_seq'::regclass),
att_integer integer,
att_integer_constr integer NOT NULL,
att_long numeric,
att_varchar character varying(50) COLLATE pg_catalog."default" DEFAULT ''::character varying,
att_varchar_constr character varying(50) COLLATE pg_catalog."default" DEFAULT ''::character varying,
att_text text COLLATE pg_catalog."default",
att_text_constr text COLLATE pg_catalog."default",
att_url text COLLATE pg_catalog."default",
att_boolen boolean,
att_date_iso date,
att_date_timestamp timestamp without time zone DEFAULT now(),
geom geometry(Point,3948),
CONSTRAINT mapstore_test_pk PRIMARY KEY (id),
CONSTRAINT att_varchar_constr_dom CHECK (att_varchar_constr::text = ANY (ARRAY['Non renseigné'::text, 'Publicité'::text, 'Pré-enseigne'::text, 'Enseigne'::text])), CONSTRAINT att_integer_constr_check CHECK (att_integer_constr < 5),
CONSTRAINT att_text_constr_dom CHECK (att_text_constr = ANY (ARRAY['non renseigné'::text, 'permanent'::text, 'temporaire'::text]))
);
CREATE TABLE
More detail in the doc for the DEV server. The layer is published here
Any issues let me know
from mapstore2-georchestra.
@randomorder
Thank you so much for this. You forgot to include this constraint:
CONSTRAINT att_integer_constr_check CHECK (att_integer_constr < 5),
@offtherailz @vlt1
I've pepared this context in our DEV where I've populated the layer with some points. Constraints are properly working DB side.
from mapstore2-georchestra.
@MaelREBOUX I think we are ready now, thank you.
from mapstore2-georchestra.
Related Issues (20)
- FeatureEditor - relational dropdown according to another field
- [StreetView Plugin] ability to set parameters for the size of the default window (e.g. to display the date of recording). HOT 3
- [Annotations] Circle object - Mapstore crash entering a value in Radius field before drawing the circle HOT 1
- [Annotations] Disabled annotations are printed HOT 2
- [Annotations] Geometry title not easy to modify HOT 2
- Personal plugins broken since 2023.02.00-RC*-geOrchestra deployments HOT 6
- Problem printing when not connected HOT 2
- Update MS to latest version (Phase III) HOT 2
- Dashboard's Tables not working since 2023.02.00-RC1-geOrchestra and 2023.02.00-RC2-geOrchestra deployments HOT 7
- Problem with permalink generated from an old context HOT 4
- WMTS not working with EPSG:3948 and 2154 since 2023.02.00-RC*-geOrchestra deployments HOT 1
- Problem with log4j2.properties from datadir HOT 1
- Edit button is not present by default but yes after FeatureEditor (2022.02) HOT 1
- Node.js - wich version to use ? HOT 6
- Is 2023.02.xx stable ? HOT 2
- [Context Export] Unabble to export map configuration in context manager since 2023.02.RCx HOT 3
- [Annotation] Circle radius is modified when saving the annotation HOT 3
- [Print] Ability to print image legend with an appropriate scale HOT 4
- [FeatureEditor] - EditingAllowedRoles by attribute HOT 1
- [FeatureEditor] - Prohibit geometry edition for some roles HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapstore2-georchestra.