[Mapbender-users] User-Name as an attribute in the digitizer
Astrid Emde (WhereGroup)
astrid.emde at wheregroup.com
Thu Oct 22 03:34:59 PDT 2020
Hello,
the definition is in the feature section and the user name is referred
via $user and groups as $userRoles (which is an array):
featureType:
connection: geodata_db
table: poi
uniqueId: gid
geomType: point
geomField: geom_25832
srid: 25832
filter: 'st_isempty(geom_25832) =
false'
events:
onBeforeSave:
$feature->setAttribute('abstract', 'MAPS');
$feature->setAttribute('user_name', $user
);$feature->setAttribute('group', implode(',', $userRoles));
But it looks like this feature is not working with the actual Mapbender
3.0.8.6 which uses digitizer 1.1.x. It works with digitzer 1.3 version.
To change to the 1.3 version you have install Mapbender via Github and
change in composer.json to "mapbender/digitizer": "dev-release/1.3",
Then you can build your own mapbender with digitizer 1.3.
Astrid
Best regards Astrid
Am 2020-10-22 08:58, schrieb Toma, Charlotte:
> Hello Uwe,
>
> you can use the „events“ to add predefined attributes from the
> mapbender database, e.g. the groupname or the username. You can use
> the example in the documentation
> (https://doc.mapbender3.org/en/functions/editing/digitizer.html#events
> [1]) and add the „onBeforeSafe“ event. Furthermore you need a
> coulumn in your table to save the information.
>
> Greetings from Wiesbaden
>
> Charly
>
> Mit freundlichen Grüßen
> im Auftrag
>
> Charlotte Toma
>
> Landeshauptstadt Wiesbaden
> -Der Magistrat-
>
> Stadtplanungsamt
> -610230-
> Gustav-Stresemann-Ring 15
> 65189 Wiesbaden
> Tel.: 0611 31-3436
> Fax: 0611 31-3917
> E-Mail: 61GIS at wiesbaden.de
> Internet: www.wiesbaden.de [2]
>
> Jede nicht gedruckte Seite spart Holz, Wasser und Strom.
>
> Von: Mapbender_users [mailto:mapbender_users-bounces at lists.osgeo.org]
> Im Auftrag von Uwe Seher
> Gesendet: Donnerstag, 22. Oktober 2020 08:14
> An: Mapbender User List <mapbender_users at lists.osgeo.org>
> Betreff: [Mapbender-users] User-Name as an attribute in the digitizer
>
> Hello!
>
> I want to log, when a feature has been changed by the digitizer. Is
> there a possibillity to use the logged in username as an attribute in
> the digitizer form or store it otherways in the edited feature?
>
> Thank you in advance
>
> Uwe Seher
>
> Links:
> ------
> [1]
> https://doc.mapbender3.org/en/functions/editing/digitizer.html#events
> [2] http://www.wiesbaden.de/
> _______________________________________________
> Mapbender_users mailing list
> Mapbender_users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapbender_users
--
Mit freundlichen Grüßen
Astrid Emde
GIS-Consultant
-----------------------------------
Aufwind durch Wissen!
Jetzt neu: Web-Seminare und Online-Schulungen
bei der www.foss-academy.com
-----------------------------------
Astrid Emde
WhereGroup GmbH
Eifelstraße 7
53119 Bonn
Germany
Fon: +49(0)228 90 90 38 - 22
Fax: +49(0)228 90 90 38 - 11
astrid.emde at wheregroup.com
www.wheregroup.com
Folgen Sie der WhereGroup auf twitter:
http://twitter.com/WhereGroup_com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
-------------------------------
More information about the Mapbender_users
mailing list