<div dir="ltr">I achieved my goal slighlty differently, but you gave me the solution. <div>As I also want to display the type in the table to allow the search against it on the interface.</div><div>I added a "color" column and I tried setting an event in the digitizer config to set this color. Just for trying : </div><div>

<pre style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;white-space:pre;margin:0px;padding:12px;line-height:normal;display:block;overflow:auto;color:rgb(64,64,64);background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-l gmail-l-Scalar gmail-l-Scalar-Plain" style="box-sizing:border-box">events
</span>  onBeforeInsert<span class="gmail-p gmail-p-Indicator" style="box-sizing:border-box">:</span> <span class="gmail-l gmail-l-Scalar gmail-l-Scalar-Plain" style="box-sizing:border-box">$item['color'] = "#ffff00";</span></pre><pre style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;white-space:pre;margin:0px;padding:12px;line-height:normal;display:block;overflow:auto;color:rgb(64,64,64);background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">But after saving, this line was automatically modified as </pre><pre style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;white-space:pre;margin:0px;padding:12px;line-height:normal;display:block;overflow:auto;color:rgb(64,64,64);background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">onBeforeInsert<span class="gmail-p gmail-p-Indicator" style="box-sizing:border-box">:</span> '<span class="gmail-l gmail-l-Scalar gmail-l-Scalar-Plain" style="box-sizing:border-box">$item[''color''] = "#ffff00"';</span></pre><pre style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;white-space:pre;margin:0px;padding:12px;line-height:normal;display:block;overflow:auto;color:rgb(64,64,64);background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-l gmail-l-Scalar gmail-l-Scalar-Plain" style="box-sizing:border-box"><br></span></pre><pre style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;white-space:pre;margin:0px;padding:12px;line-height:normal;display:block;overflow:auto;color:rgb(64,64,64);background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-l gmail-l-Scalar gmail-l-Scalar-Plain" style="box-sizing:border-box">This event had no effect, maybe I've done something wrong...</span></pre><pre style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;white-space:pre;margin:0px;padding:12px;line-height:normal;display:block;overflow:auto;color:rgb(64,64,64);background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-l gmail-l-Scalar gmail-l-Scalar-Plain" style="box-sizing:border-box">So I created a trigger on insert/update in lines table, in the postgresql database, with the following function : </span></pre><pre style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;white-space:pre;margin:0px;padding:12px;line-height:normal;display:block;overflow:auto;color:rgb(64,64,64);background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-l gmail-l-Scalar gmail-l-Scalar-Plain" style="box-sizing:border-box">

<pre style="color:rgb(0,0,0);text-decoration-style:initial;text-decoration-color:initial;word-wrap:break-word;white-space:pre-wrap">--
-- Name: setColor(); Type: FUNCTION; Schema: public; Owner: mapbender-au1
--

CREATE FUNCTION public."setColor"() RETURNS trigger
    LANGUAGE plpgsql
    AS $$BEGIN 
  IF NEW.type = 'REV' THEN
    NEW.color='#0000ff';
  ELSIF NEW.type = 'LiaisonIntercommunale' THEN
    NEW.color='#00ff00';
  ELSE
    NEW.color='#ff0000';
 END IF;
 RETURN NEW;
END;$$;

--

COMMENT ON FUNCTION public."setColor"() IS 'set color column according to the type';</pre>



that works great!!!</span></pre><pre style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;white-space:pre;margin:0px;padding:12px;line-height:normal;display:block;overflow:auto;color:rgb(64,64,64);background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Next step now ;)</pre><pre style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;white-space:pre;margin:0px;padding:12px;line-height:normal;display:block;overflow:auto;color:rgb(64,64,64);background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Bye</pre><pre style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;white-space:pre;margin:0px;padding:12px;line-height:normal;display:block;overflow:auto;color:rgb(64,64,64);background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Gérald</pre><pre style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;white-space:pre;margin:0px;padding:12px;line-height:normal;display:block;overflow:auto;color:rgb(64,64,64);background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-06-24 23:26 GMT+02:00 Gérald Salin <span dir="ltr"><<a href="mailto:gerald.salin@gmail.com" target="_blank">gerald.salin@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">great, will try it asap!!!<div>thank you Astrid</div><div><br></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">2018-06-24 11:47 GMT+02:00 Astrid Emde <span dir="ltr"><<a href="mailto:astrid.emde@wheregroup.com" target="_blank">astrid.emde@wheregroup.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Gérald,<br>
<br>
you can do this easily as you can use die OpenLayers 2 styles in the digitizer.<br>
<br>
See OpenLayer 2 styles documentation: <a href="http://docs.openlayers.org/library/feature_styling.html" rel="noreferrer" target="_blank">http://docs.openlayers.org/lib<wbr>rary/feature_styling.html</a><br>
<br>
You should add a new column for the color in your table, that you fill depending on the choice of the user.<br>
<br>
f.e.<br>
<br>
Alter table poi add column color varchar;<br>
<br>
As Mapbender does not support combo you could choose a selectbox  for the different types.<br>
<br>
Add the selectbox to your digitizer configuration:<br>
<br>
f.e.<br>
<br>
            -<br>
              type: select<br>
              title: Type<br>
              name: color<br>
              options:<br>
                '#ff00ff': Type-A<br>
                '#00ffff': Type-B<br>
                '#ffff00': Type-C<br>
                '#00ff00': Type-D<br>
<br>
<br>
Styles could look like this - with ${color} you refer to the new column with the color values<br>
<br>
  styles:<br>
    default:<br>
      strokeWidth: 2<br>
      strokeColor: '#0e6a9e'<br>
      fillColor: ${color}<br>
      fillOpacity: 1<br>
      fillWidth: 2<br>
      pointRadius: 10<br>
    select:<br>
      strokeWidth: 3<br>
      strokeColor: ${color}<br>
      fillOpacity: 0.7<br>
      pointRadius: 10<br>
<br>
Happy cycling!<br>
<br>
Astrid<span><br>
<br>
Am 2018-06-23 17:00, schrieb Gérald Salin:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
Hi mapbender users,<br>
 we (a french cyclist association, bicycle as a way of transport)<br>
would like to use mapbender to allow cyclists to draw lines on a map<br>
of the most important cyclable axes which they think is missing. We<br>
are still evaluating mapbender. I already posted a message few weeks<br>
ago and are still evaluate mapbender.<br>
We would like to associate a type (combo with 3 items in the form) to<br>
the lines added by the cyclists, and visually differentiate them on<br>
the map.<br>
<br>
do you know if there is a way to associate a color to each type so<br>
that the lines appear differently on the map?<br>
<br>
Thank you for your help<br>
<br>
Gérald--<br>
<br>
VelObs : remontez vos problèmes lors des déplacements à vélo sur<br></span>
le web [1] ou sur android [2] (une appli 2P2R [3])<br>
Pedibus labégeois [4]<br>
Soutenez ICEA [5], Inititiative Citoyenne pour une Energie<span><br>
Alternative, prenez ou offrez des parts sociales pour devenir<br>
co-propriétaire de panneaux photovoltaïques<br>
Consommez de l'énergie éléctrique verte renouvelable avec ENERCOOP<br></span>
[6]<br>
<br>
<br>
<br>
Links:<br>
------<br>
[1] <a href="https://velobs.2p2r.org/" rel="noreferrer" target="_blank">https://velobs.2p2r.org/</a><br>
[2]<br>
<a href="https://play.google.com/store/apps/details?id=org.deuxpiedsdeuxroues.velobs.tlse&amp;hl=fr" rel="noreferrer" target="_blank">https://play.google.com/store/<wbr>apps/details?id=org.deuxpiedsd<wbr>euxroues.velobs.tlse&amp;hl=fr</a><br>
[3] <a href="https://2p2r.org/" rel="noreferrer" target="_blank">https://2p2r.org/</a><br>
[4] <a href="https://emilepattesblog.wordpress.com/" rel="noreferrer" target="_blank">https://emilepattesblog.wordpr<wbr>ess.com/</a><br>
[5] <a href="http://icea-enr.fr/" rel="noreferrer" target="_blank">http://icea-enr.fr/</a><br>
[6] <a href="http://www.enercoop.fr/" rel="noreferrer" target="_blank">http://www.enercoop.fr/</a><br>
______________________________<wbr>_________________<br>
Mapbender_users mailing list<br>
<a href="mailto:Mapbender_users@lists.osgeo.org" target="_blank">Mapbender_users@lists.osgeo.or<wbr>g</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapbender_users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/mapbender_users</a><br>
</blockquote>
<br>
-- <br>
Mit freundlichen Grüßen<br>
<br>
Astrid Emde<br>
Senior GIS-Consultant<br>
<br>
------------------------------<wbr>-----<br>
Aufwind durch Wissen!<br>
Qualifizierte Open-Source-Schulungen<br>
bei der <a href="http://www.foss-academy.com" rel="noreferrer" target="_blank">www.foss-academy.com</a><br>
------------------------------<wbr>-----<br>
<br>
<br>
 Astrid Emde<br>
 WhereGroup GmbH & Co.KG<br>
 Eifelstraße 7<br>
 53119 Bonn<br>
 Germany<br>
<br>
 Fon: +49(0)228 90 90 38 - 22<br>
 Fax: +49(0)228 90 90 38 - 11<br>
<br>
 <a href="mailto:astrid.emde@wheregroup.com" target="_blank">astrid.emde@wheregroup.com</a><br>
 <a href="http://www.wheregroup.com" rel="noreferrer" target="_blank">www.wheregroup.com</a><br>
<br>
 Folgen Sie der WhereGroup auf twitter: <a href="http://twitter.com/WhereGroup_com" rel="noreferrer" target="_blank">http://twitter.com/WhereGroup_<wbr>com</a><br>
<br>
Amtsgericht Bonn, HRA 6788<br>
------------------------------<wbr>-<br>
Komplementärin:<br>
WhereGroup Verwaltungs GmbH<br>
vertreten durch:<br>
Olaf Knopp, Peter Stamm<br>
------------------------------<wbr>-<br>
______________________________<wbr>_________________<br>
Mapbender_users mailing list<br>
<a href="mailto:Mapbender_users@lists.osgeo.org" target="_blank">Mapbender_users@lists.osgeo.or<wbr>g</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapbender_users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/mapbender_users</a></blockquote></div><br><br clear="all"><div><br></div></div></div>-- <br><div class="m_9136919436160138612gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span class=""><div>VelObs : remontez vos problèmes lors des déplacements à vélo sur le <a href="https://velobs.2p2r.org/" target="_blank">web</a> ou sur <a href="https://play.google.com/store/apps/details?id=org.deuxpiedsdeuxroues.velobs.tlse&hl=fr" target="_blank">android</a> (une appli <a href="https://2p2r.org/" target="_blank">2P2R</a>)</div><div><a href="https://emilepattesblog.wordpress.com/" target="_blank">Pedibus labégeois</a></div></span><div>Soutenez <a href="http://icea-enr.fr/" target="_blank">ICEA</a>, Inititiative Citoyenne pour une Energie Alternative, prenez ou offrez des parts sociales pour devenir co-propriétaire de panneaux photovoltaïques</div><span class=""><div>Consommez de l'énergie éléctrique verte renouvelable avec <a href="http://www.enercoop.fr/" target="_blank">ENERCOOP</a></div><div><br></div></span></div></div></div></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>VelObs : remontez vos problèmes lors des déplacements à vélo sur le <a href="https://velobs.2p2r.org/" target="_blank">web</a> ou sur <a href="https://play.google.com/store/apps/details?id=org.deuxpiedsdeuxroues.velobs.tlse&hl=fr" target="_blank">android</a> (une appli <a href="https://2p2r.org/" target="_blank">2P2R</a>)</div><div><a href="https://emilepattesblog.wordpress.com/" target="_blank">Pedibus labégeois</a></div><div>Soutenez <a href="http://icea-enr.fr/" target="_blank">ICEA</a>, Inititiative Citoyenne pour une Energie Alternative, prenez ou offrez des parts sociales pour devenir co-propriétaire de panneaux photovoltaïques</div><div>Consommez de l'énergie éléctrique verte renouvelable avec <a href="http://www.enercoop.fr/" target="_blank">ENERCOOP</a></div><div><br></div></div></div></div></div>
</div>