<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html lang="de" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html charset=ISO-8859-1" /><title></title><style type="text/css">html,body{font-size:12px;background-color:#fff;color:#333;font-family:sans-serif,Arial,Verdana,"Trebuchet MS";line-height:1.4;}</style></head><body><p>Yes, of course :-)</p>
<p>
</p><div>-----------------------------<br>
<br>
http://blumige-landschaften.de<br>
<br>
Dr. Kai Behncke<br>
<br>
Am Wulberg 15<br>
<br>
49324 Melle<br>
<br>
Tel.: (ab 18.00 Uhr): 0176-84019660</div>
<p></p>
<p>Astrid Emde schrieb am 12.04.2016 08:17:</p>
<blockquote cite="mid:a34547c4439e113c32ccd89868f89829@wheregroup.com" type="cite">
<pre>Hello Kai,
great. Thanks for sharing your code!
I like your application. Can we add it to the gallery?
<a href="http://mapbender3.org/?q=en/gallery" target="_blank" title="http://mapbender3.org/?q=en/gallery">http://mapbender3.org/?q=en/gallery</a>
Regards Astrid
Am 2016-04-12 06:49, schrieb Dr. Kai Behncke:
> Oh, sorry, wrong link.
> To set entries by digitizing a link like
>
>
> <a href="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla@" target="_blank" title="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla@">http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla@</a>
> [5]
>
> is used.
>
> Best regards, Kai
>
> Am 12.04.2016 um 05:55 schrieb Dr. Kai Behncke:
>
>> Hi you all,
>>
>> we found a solution for that, well not a very nice one, because of
>> no knowledge of symfony, the code is "hot-chaos", but it works:
>>
>> In:
>>
> mapbender3/vendor/mapbender/digitizer/Mapbender/DigitizerBundle/Element/Digitizer.php
>>
>>
>> From line 169:
>>
>> 169 public function httpAction($action)
>> 170 {
>> 171 /**
>> 172 * @var $requestService Request
>> 173 */
>> 174 $der_nutzername=$this->container->get('request');
>> 175
>> 176
>> 177 if ((substr_count($der_nutzername,'anwender=')==1) AND
>> (substr_count($der_nu tzername,'@')==1)) {
>> 178
>> 179
>> 180 $der_nutzername_array = explode ('anwender=',
>> $der_nutzername );
>> 181 $der_nutzername=$der_nutzername_array[1];
>> 182
>> 183 $der_nutzername=trim($der_nutzername);
>> 184 $der_nutzername_array2=explode ('@',$der_nutzername);
>> 185 $der_nutzername=$der_nutzername_array2[0];
>> 186 $der_nutzername=str_replace(" ","",$der_nutzername);
>> 187 $der_nutzername="digiowner='".$der_nutzername."'";
>> 188 $der_nutzername=trim($der_nutzername);
>> 189 $der_nutzername=str_replace(" ","",$der_nutzername);
>> 190 // $der_nutzername="nnn".$der_nutzername->get('Referer');
>> 191 }
>> 192 else {
>> 193
>> 194 $der_nutzername="digiowner='xxxxx'";
>> 195 }
>>
>> ....
>> ......
>> (This is to get the user of a request; for that, in the
>> digitite-table (e.g. "poi" a column "digiowner" is important)
>>
>> In
>>
> mapbender3/vendor/mapbender/digitizer/Mapbender/DigitizerBundle/Entity/FeatureType.php
>>
>> In line 396:
>>
>> public function search(array $criteria = array(),$neue_variable)
>> {
>>
>> // In $neue_variable a username is transported
>>
>> 422: $where=$neue_variable;
>> 423 if($where){
>> 424 $queryBuilder->andWhere($where);
>> 425 }
>>
>> And: in
>>
> mapbender/digitizer/Mapbender/DigitizerBundle/Resources/public/mapbender.element.digitizer.js
>>
>> Line 1305: var the_request=JSON.stringify(request);
>> 1306 the_request+=""
>>
>> ...
>>
>> .....
>> 1315 if (uri=="save"){
>> 1316
>> 1317
>>
> the_request=the_request.replace('}',',"digiowner":"'+der_nutzername+'"}');
>> ....
>> ........
>>
>> A changed request is build so a geometry belongs to a specific
>> user...
>>
>> So if someone calls:
>>
>>
> <a href="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften" target="_blank" title="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften">http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften</a>
>> [2]
>>
>> he can`t insert entries.
>> If one calls:
>>
> <a href="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla" target="_blank" title="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla">http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla</a>
>> [3]
>>
>> he can.
>>
>> I know, it`s not a "save"-procedure at all, but enough for the
>> purposes of that project :-)
>>
>> the project is: <a href="http://blumige-landschaften.de" target="_blank" title="http://blumige-landschaften.de">http://blumige-landschaften.de</a> [4]
>>
>> A databse-trigger sets area and time of an entry
>>
>> CREATE OR REPLACE FUNCTION datum_einspielen()
>> RETURNS trigger AS
>> $BODY$
>> DECLARE
>>
>> the_id integer;
>> abfrage1 text;
>>
>> BEGIN
>> the_id:=max(gid) as gid from poi;
>>
>> abfrage1:='UPDATE poi SET date_favorite=TO_CHAR(CURRENT_DATE,
>> ''DD.MM.YYYY'') WHERE gid='||the_id;
>> EXECUTE abfrage1;
>> RAISE NOTICE 'Here we go........%',the_id;
>> RETURN NULL;
>> END;
>> $BODY$
>> LANGUAGE 'plpgsql' VOLATILE;
>>
>> CREATE TRIGGER Trigger_after_poi_entry
>> AFTER INSERT on poi
>> FOR EACH ROW
>> EXECUTE PROCEDURE datum_einspielen();
>>
>> CREATE OR REPLACE FUNCTION give_me_area_and_date()
>> RETURNS trigger AS
>> $BODY$
>> DECLARE
>>
>> the_id integer;
>> the_area numeric;
>> abfrage1 text;
>> abfrage2 text;
>> block text;
>> BEGIN
>> the_id:=max(gid) as gid from polygons;
>> the_area:=round(cast(st_area(st_transform(geom,31467)) as
>> numeric),2) from polygons where gid=the_id;
>>
>> abfrage1:='UPDATE polygons SET date_favorite=TO_CHAR(CURRENT_DATE,
>> ''DD.MM.YYYY'') WHERE gid='||the_id;
>> EXECUTE abfrage1;
>> abfrage2:='UPDATE polygons SET area='''||the_area||''' WHERE
>> gid='||the_id;
>> EXECUTE abfrage2;
>>
>> RETURN NULL;
>> END;
>> $BODY$
>> LANGUAGE 'plpgsql' VOLATILE;
>>
>> CREATE TRIGGER Trigger_after_polygon_entry
>> AFTER INSERT on polygons
>> FOR EACH ROW
>> EXECUTE PROCEDURE give_me_area_and_date();
>>
>> Best regards, Kai
>>
>> --
>> ---------------------------
>> Blumige-Landschaften.de
>> Dr. Kai Behncke
>> Am Wulberg 15
>> 49324 Melle
>> Tel.: 0176-84019660 (ab 18.00 Uhr)
>>
>> _______________________________________________
>> Mapbender_users mailing list
>> Mapbender_users@lists.osgeo.org
>> <a href="http://lists.osgeo.org/mailman/listinfo/mapbender_users" target="_blank" title="http://lists.osgeo.org/mailman/listinfo/mapbender_users">http://lists.osgeo.org/mailman/listinfo/mapbender_users</a> [1]
>
> --
> ---------------------------
> Blumige-Landschaften.de
> Dr. Kai Behncke
> Am Wulberg 15
> 49324 Melle
> Tel.: 0176-84019660 (ab 18.00 Uhr)
>
>
> Links:
> ------
> [1] <a href="http://lists.osgeo.org/mailman/listinfo/mapbender_users" target="_blank" title="http://lists.osgeo.org/mailman/listinfo/mapbender_users">http://lists.osgeo.org/mailman/listinfo/mapbender_users</a>
> [2]
> <a href="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften" target="_blank" title="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften">http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften</a>
> [3]
> <a href="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla" target="_blank" title="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla">http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla</a>
> [4] <a href="http://blumige-landschaften.de" target="_blank" title="http://blumige-landschaften.de">http://blumige-landschaften.de</a>
> [5]
> <a href="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla@" target="_blank" title="http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla@">http://www.blumige-landschaft.de/mapbender3/application/Blumige-Landschaften?anwender=blablablabla@</a>
>
> _______________________________________________
> Mapbender_users mailing list
> Mapbender_users@lists.osgeo.org
> <a href="http://lists.osgeo.org/mailman/listinfo/mapbender_users" target="_blank" title="http://lists.osgeo.org/mailman/listinfo/mapbender_users">http://lists.osgeo.org/mailman/listinfo/mapbender_users</a>
--
Mit freundlichen Grüßen
Astrid Emde
GIS-Consultant
-----------------------------------
Aufwind durch Wissen!
Qualifizierte OpenSource-Schulungen
bei der <a href="http://www.foss-academy.eu" target="_blank" title="www.foss-academy.eu">www.foss-academy.eu</a>
-----------------------------------
Astrid Emde
WhereGroup GmbH & Co.KG
Eifelstraße 7
53119 Bonn
Germany
Fon: +49(0)228 90 90 38 - 19
Fax: +49(0)228 90 90 38 - 11
astrid.emde@wheregroup.com
<a href="http://www.wheregroup.com" target="_blank" title="www.wheregroup.com">www.wheregroup.com</a>
Folgen Sie der WhereGroup auf twitter:
<a href="http://twitter.com/WhereGroup_com" target="_blank" title="http://twitter.com/WhereGroup_com">http://twitter.com/WhereGroup_com</a>
Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------
pgp-public key:
<a href="http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284" target="_blank" title="http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284">http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284</a>
Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen
Signed and/or encrypted mail is highly appreciated
</pre>
</blockquote></body></html>