[Mapbender-users] I can not adjust SearchRouter. Please help

Charlotte Toma charlotte.toma at wheregroup.com
Fri Nov 11 04:17:59 PST 2016


Hello, 
the parameters.yml needs the name of the connection , like this: 

parameters.yml

parameters:
    *default:*
           database_driver:   pdo_pgsql
    
           database_host:     localhost
    
           database_port:     5432
    
           database_name:     mapbender3
    
           database_path:     ~
    
           database_user:     postgres
    
           database_password: [don't show your passwords!]
    
    *search_db*:
           database2_driver:  pdo_pgsql
    
           database2_host:    localhost
    
           database2_port:    5432
    
           database2_name:    search_db
    
           database2_path:     ~
    
           database2_user:    postgres
    
           database2_password: [don't show your passwords!]


Your connection is missing parameters: 
doc.mapbender3.org/en/bundles/Mapbender/CoreBundle/elements/search_router.html

class: Mapbender\CoreBundle\Component\SQLSearchEngine
class_options:
    connection: search_db
    *relation: picckad (это таблица public.**)* this looks wrong --> is this your table name? # Relation to select from, you can use subqueries 
    attributes:
        - picnum
        *- gid*
 geometry_attribute: geom
form:
    picnum:
        type: text
        options:
            required: true
*label: Name   compare: ilike #both sides are considered as result*
results:
    view: table
    count: true
    headers:
*picnum: Name**** gid: ID*
    callback:
        event: click
        options:
            buffer: 10
            minScale: null
            maxScale: null


Try this : ) 
I hope it works now

Am 11.11.2016 um 13:07 schrieb Den:
> Good day!
>
> I'm new to Mapbender. Learn how to create customize and publish applications
> but can not configure the search for their data.
>
> There search_db database. It table in which one field with values - picckad.
> The values of the numbers but the field type is Text. (I tried to give the
> field of type Integer)
> The database was created in PgAdmin and data loaded into it from a SHP file
> through Qgis
>
> config.yml Files and parameters.yml look like
>
> 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%
>             
>        search_db:
>                 
>          driver:   %database2_driver%
>                 
>          host:     %database2_host%
>                 
>          port:     %database2_port%
>                 
>          dbname:   %database2_name%
>                 
>          path:     %database2_path%
>                 
>          user:     %database2_user%
>                 
>          password: %database2_password%
>                 
>          charset:  UTF8
>                 
>          logging: %kernel.debug%
>                 
>          profiling: %kernel.debug%
>
> parameters.yml
>
> parameters:
>     
>            database_driver:   pdo_pgsql
>     
>            database_host:     localhost
>     
>            database_port:     5432
>     
>            database_name:     mapbender3
>     
>            database_path:     ~
>     
>            database_user:     postgres
>     
>            database_password: n36rp21
>     
>     
>            database2_driver:  pdo_pgsql
>     
>            database2_host:    localhost
>     
>            database2_port:    5432
>     
>            database2_name:    search_db
>     
>            database2_path:     ~
>     
>            database2_user:    postgres
>     
>            database2_password: n36rp21
>
>
> route-configuration in the configuration area
>
> class: Mapbender\CoreBundle\Component\SQLSearchEngine
> class_options:
>     connection: search_db
>     relation: picckad (это таблица public.)
>     attributes:
>         - picnum
>     geometry_attribute: geom
> form:
>     picnum:
>         type: text
>         options:
>             required: true
>         compare: exact
> results:
>     view: table
>     count: true
>     headers:
>         picnum: Name
>     callback:
>         event: click
>         options:
>             buffer: 10
>             minScale: null
>             maxScale: null
>
> The result is - No results found.
>
> The debugger Google hrome found this:
>
> Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and
> will be removed in a future version. To avoid this warning set
> 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input
> stream instead. in Unknown on line 0
>
> Warning: Cannot modify header information - headers already sent in Unknown
> on line 0
>
> Mapbender version 3.0.5.3
>
> Failed to start the session because headers have already been sent by "" at
> line 0.
>
>
>
> What am I doing wrong?
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/I-can-not-adjust-SearchRouter-Please-help-tp5295321.html
> Sent from the mapbender-users mailing list archive at Nabble.com.
> _______________________________________________
> Mapbender_users mailing list
> Mapbender_users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_users

-- 
Mit freundlichen Grüßen

Charlotte Toma
GIS-Consultant

********************************************
Where2B Konferenz 2016
15. Dezember 2016 in Bonn
www.where2b-conference.com
******************************************** 

 Charlotte Toma
 WhereGroup GmbH & Co.KG
 Eifelstraße 7
 53119 Bonn
 Germany

 Fon: +49(0)228 90 90 38 - 24
 Fax: +49(0)228 90 90 38 - 11

 charlotte.toma 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
------------------------------- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20161111/30f61b7d/attachment.html>


More information about the Mapbender_users mailing list