[Mapbender-users] Mapbender3: Searchrouter/additional database connection

Uwe Seher uwe.seher at gmail.com
Wed Jan 18 00:53:04 PST 2017


Hello!

The projection didn't match. The layer is a UTM layer from a view with a
special projection from GK. In the search router i had referenced the
original layer. Now it works great. Maybe this topic could be mentioned in
the documentation or in a comment in the config.
Thank you all for your help and your work!

Best regards

Uwe

2017-01-18 8:58 GMT+01:00 Astrid Emde <astrid.emde at wheregroup.com>:

> Hello,
>
> here is another link to the documentation.
>
> http://doc.mapbender3.org/en/bundles/Mapbender/CoreBundle/el
> ements/search_router.html#yaml-definition
>
> geometry_attribute: geom
> Make sure that your geometry_attribute is in the same projection as your
> map. This is an error that often is made.
>
> What is your EPSG-code? What are the units of your search?
>
> buffer: 1000
> Keep in mind that buffer is calutated in the units of your projection.
>
> Astrid
>
>
> Am 2017-01-17 16:15, schrieb Uwe Seher:
>
>> Hello!
>>
>> Cleaning the cache made the trick, nor the result is shown. Thank you.
>> But now the next problem:
>> I interpret the documentation of the search router eleet, that the
>> results are shown and you can click on it, then the map zooms to the
>> element and shows the found geometry/element in the configurated
>> colors.
>> If i click now on my found result it zooms sometimes to an more or
>> less erratic place (or does nothing) and no selected elements are
>> shown. Clearing the cache after changing something didn't help here.
>> The configuration is the same as above. I just post the results area:
>>
>> results:
>>     view: table
>>     count: true
>>     headers:
>>         objectid: ID
>>         name: Name
>>     callback:
>>         event: click
>>         options:
>>             buffer: 1000
>>             minScale: null
>>             maxScale: null
>>     styleMap:
>>         default:
>>             strokeColor: '#00ff00'
>>             strokeOpacity: 1
>>             fillOpacity: 1
>>         select:
>>             strokeColor: '#ff0000'
>>             fillColor: '#ff0000'
>>             fillOpacity: 0.8
>>
>> Any hint on the config or if i make some errors here would be great.
>>
>> Thank you
>>
>> Uwe
>>
>> 2017-01-16 18:01 GMT+01:00 Axel Schaefer
>> <axel.schaefer at wheregroup.com>:
>>
>> Hi Uwe.
>>>
>>> After changes in parameters.yml and config.yml you have to clear the
>>> Mapbender cache directory.
>>>
>>> The contents in: <mapbender>/(application)/app/cache.
>>> Not the cache-directory itself, but the contents of the directory.
>>>
>>> Maybe that's the missing point. Your configuration looks ok.
>>>
>>> Axel
>>>
>>> Uwe Seher writes:
>>>
>>> Hello again!
>>>>
>>>> I an trying to set up a search function in my application with the
>>>>
>>> search
>>>
>>>> router element.
>>>> For this i had setup an additional database connection following
>>>>
>>> teh
>>>
>>>> desctioption in the documentation with the following parameters:
>>>>
>>>> parameters.yml:
>>>>
>>>> parameters:
>>>> # Default-Datenbank
>>>> database_driver:   pdo_pgsql
>>>> database_host:     192.168.1.3
>>>> database_port:     5432
>>>> database_name:     mapbender3
>>>> database_path:     ~
>>>> database_user:     mapbender
>>>> database_password: xxxx
>>>>
>>>> # Rhein-Datenbank
>>>> database1_driver:   pdo_pgsql
>>>> database1_host:     192.168.1.3
>>>> database1_port:     5432
>>>> database1_name:     rhein
>>>> database1_path:     ~
>>>> database1_user:     gdi_user
>>>> database1_password: xxxx
>>>>
>>>> config.yml:
>>>>
>>>> doctrine:
>>>> dbal:
>>>> default_connection: default
>>>> connections:
>>>> default:
>>>> driver:   %database_driver%
>>>> host:     %database_host%
>>>> port:     %database_port%
>>>> dbname:   %database_name%
>>>> path:     %database_path%
>>>> user:     %database_user%
>>>> password: %database_password%
>>>> charset:  UTF8
>>>> logging: %kernel.debug%
>>>> profiling: %kernel.debug%
>>>> rhein:
>>>> driver:   %database1_driver%
>>>> host:     %database1_host%
>>>> port:     %database1_port%
>>>> dbname:   %database1_name%
>>>> path:     %database1_path%
>>>> user:     %database1_user%
>>>> password: %database1_password%
>>>> charset:  UTF8
>>>> logging: %kernel.debug%
>>>> profiling: %kernel.debug%
>>>> orm:
>>>> auto_generate_proxy_classes: %kernel.debug%
>>>> auto_mapping: true
>>>>
>>>> The search-dialog parameters look like this:
>>>>
>>>> class: Mapbender\CoreBundle\Component\SQLSearchEngine
>>>> class_options:
>>>> connection: rhein
>>>> relation: mrh_1509.engstellen
>>>> attributes:
>>>> - objectid
>>>> - name
>>>> geometry_attribute: geom
>>>> form:
>>>> name:
>>>> type: choice
>>>> options:
>>>> empty_value: 'Bitte wählen'
>>>> required: true
>>>> choices:
>>>> 1: 'Reg.Bereich 1'
>>>> 2: 'Reg.Bereich 2'
>>>> 3: 'Reg.Bereich 3'
>>>> 4: 'Reg.Bereich 3'
>>>> 5: 'Reg.Bereich 5'
>>>> 6: 'Reg.Bereich 6'
>>>> 7: 'Reg.Bereich 6'
>>>> results:
>>>> view: table
>>>> count: true
>>>> headers:
>>>> objectid: ID
>>>> name: Name
>>>> callback:
>>>> event: click
>>>> options:
>>>> buffer: 10
>>>> minScale: null
>>>> maxScale: null
>>>>
>>>> The dialog itself works fine, but no results are found. In the
>>>>
>>> logfile i
>>>
>>>> found this entry:
>>>>
>>>> [2017-01-13 08:45:04] request.CRITICAL: Uncaught PHP Exception
>>>>
>>>>
>>> Symfony\Component\DependencyInjection\Exception\ServiceNotFo
>> undException:
>>
>>> "You have requested a non-existent service
>>>> "doctrine.dbal.rhein_connection". Did you mean this:
>>>> "doctrine.dbal.default_connection"?" at
>>>> /srv/www/htdocs/mapbender3-3.0.5.3/app/bootstrap.php.cache line
>>>>
>>> 2063
>>>
>>>> {"exception":"[object]
>>>>
>>>>
>>> (Symfony\\Component\\DependencyInjection\\Exception\\Service
>> NotFoundException(code:
>>
>>> 0): You have requested a non-existent service
>>>> \"doctrine.dbal.rhein_connection\". Did you mean this:
>>>> \"doctrine.dbal.default_connection\"? at
>>>> /srv/www/htdocs/mapbender3-3.0.5.3/app/bootstrap.php.cache:2063)"}
>>>>
>>> []
>>>
>>>>
>>>> So i think, the second database connection is not etablished. If i
>>>>
>>> use the
>>>
>>>> parameters with other applications or psql everything works.
>>>>
>>> Restarting
>>>
>>>> apache has no effect. It would be great if someone has a hint what
>>>>
>>> i missed
>>>
>>>> here.
>>>>
>>>> Thanks in advance
>>>>
>>>> Uwe Seher
>>>> _______________________________________________
>>>> Mapbender_users mailing list
>>>> Mapbender_users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapbender_users [1]
>>>>
>>>
>>> --
>>> Axel Schaefer
>>> WhereGroup GmbH & Co. KG
>>> Eifelstraße 7
>>> 53119 Bonn
>>> Germany
>>>
>>> Fon: +49 (0)228 / 90 90 38 - 23 [2] (neue Durchwahl!)
>>> Fax: +49 (0)228 / 90 90 38 - 11 [3]
>>>
>>> axel.schaefer at wheregroup.com
>>> www.meldemax.com [4]
>>> www.wheregroup.com [5]
>>> Amtsgericht Bonn, HRA 6788
>>> -------------------------------
>>> Komplementärin:
>>> WhereGroup Verwaltungs GmbH
>>> vertreten durch:
>>> Olaf Knopp, Peter Stamm
>>> -------------------------------
>>> _______________________________________________
>>> Mapbender_users mailing list
>>> Mapbender_users at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/mapbender_users [6]
>>>
>>
>>
>>
>> Links:
>> ------
>> [1] http://lists.osgeo.org/mailman/listinfo/mapbender_users
>> [2] tel:%2B49%20%280%29228%20%2F%2090%2090%2038%20-%2023
>> [3] tel:%2B49%20%280%29228%20%2F%2090%2090%2038%20-%2011
>> [4] http://www.meldemax.com
>> [5] http://www.wheregroup.com
>> [6] https://lists.osgeo.org/mailman/listinfo/mapbender_users
>> _______________________________________________
>> 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
>
> *********************************************************
> FOSS Academy Winterschule 2017
> 20.-24.03.2017 in Bonn
> Alles Wichtige zur Erstellung einer GDI in nur 5 Tagen!
> *********************************************************
>
>  Astrid Emde
>  WhereGroup GmbH & Co.KG
>  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
>
> Amtsgericht Bonn, HRA 6788
> -------------------------------
> Komplementärin:
> WhereGroup Verwaltungs GmbH
> vertreten durch:
> Olaf Knopp, Peter Stamm
> -------------------------------
>  pgp-public key:
>  http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284
>  Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen
>  Signed and/or encrypted mail is highly appreciated
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20170118/63dcc0b0/attachment-0001.html>


More information about the Mapbender_users mailing list