[Mapbender-users] Mapbender3: Searchrouter/additional database connection
Uwe Seher
uwe.seher at gmail.com
Tue Jan 17 07:15:43 PST 2017
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\
> ServiceNotFoundException:
> > "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\\
> ServiceNotFoundException(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
>
> --
> Axel Schaefer
> WhereGroup GmbH & Co. KG
> Eifelstraße 7
> 53119 Bonn
> Germany
>
> Fon: +49 (0)228 / 90 90 38 - 23 (neue Durchwahl!)
> Fax: +49 (0)228 / 90 90 38 - 11
>
> axel.schaefer at wheregroup.com
> www.meldemax.com
> www.wheregroup.com
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20170117/31a084f7/attachment.html>
More information about the Mapbender_users
mailing list