help

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

help

Eras
Hallo, 

ich versuche seit einiger Zeit den Search Router mithilfe der mapbender.yml Datei zu erstellen. Leider bekomme ich beim einlesen Fehlermeldungen. Was mache ich falsch? Nur wenn ich searchrouter aus meiner mapbender.yml Datei entferne klappt alles problemlos. 
Ich nutze die neuste Mapbender 3.0.6.1 Version. 

Fehlermeldung: 
  > loading Mapbender\CoreBundle\DataFixtures\ORM\Application\LoadApplicationData 

                                                              
  [Symfony\Component\Debug\Exception\ContextErrorException]   
  Notice: Undefined index: class                             
                                                              

doctrine:fixtures:load [--fixtures [FIXTURES]] [--append] [--em EM] [--shard SHARD] [--purge-with-truncate] [--multiple-transactions] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] <command>


Mein Code ist wie folgt: 

            elements: 
                sidepane: 
                    searchrouter: 
                        target: map 
                        asDialog: false 
                        timeoutFactor: 3 
                        height: 500 
                        width: 700 
                        routes: 
                            poi: 
                                class: Mapbender\CoreBundle\Component\SQLSearchEngine 
                                class_options: 
                                  connection: postgis 
                                  relation: geodata.poi 
                                  attributes: 
                                    - gid 
                                    - name 
                                  geometry_attribute: geom 
                                form: 
                                  name: 
                                    type: text 
                                    options: 
                                      required: true 
                                      attr: 
                                        data-autocomplete: 'on' 
                                        data-autocomplete-distinct: 'on' 
                                        data-autocomplete-using: type 
                                    compare: ilike 
                                results: 
                                  view: table 
                                  count: true 
                                  headers: 
                                    gid: ID 
                                    name: Name 
                                  callback: 
                                    event: click 
                                    options: 
                                      buffer: 10 
                                      minScale: null 
                                      maxScale: null

_______________________________________________
Mapbender_users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: help with the searchrouter configuration

Charlotte Toma

------------------------english------------------------------------------------------------------

Hello,

The configuration of the SearchRouter looks ok. The specification of "data-autocomplete-using: type" does not work, since you have not specified a table column under attributes named "type".
So far, the error message says your class is not correct. Are the connection name, table name, and column names correct?
What does Mapbender3 say as an error message when calling app_dev.php? Here are usually more information in the log.

However, in the latest Mapbender 3.0.6.1 version, another error is known, which should be noted:
https://github.com/mapbender/mapbender/issues/543

As a comparison, here is the configuration of the SearchRouter as the export of the following application:
https://demo.mapbender3.org/application/mapbender_user_reference

(see below)

-------------------------german----------------------------------------------------------------

Hallo,

die Konfiguration des SearchRouters sieht soweit ok aus. Die Angabe von data-autocomplete-using: type funktioniert so jedoch nicht, da du keine Tabellenspalte unter attributes angegeben hast, die "type heißt".
Soweit sagt die Fehlermeldung, dass deine Class-Angabe nicht korrekt ist. Stimmen der Connection-Name, Tabellenname und Spaltennamen?
Was sagt der Mapbender3 als Fehlermeldung bei dem Aufruf über app_dev.php? Hier kommen meist aufschlussreichere Informationen im Log raus.

Bei der neusten Mapbender 3.0.6.1 Version ist jedoch ein anderer Fehler bekannt, der beachtet werden sollte:
https://github.com/mapbender/mapbender/issues/543

Als Vergleich ist hier mal die Konfiguration des SearchRouter als Export der folgenden Anwendung:
https://demo.mapbender3.org/application/mapbender_user_reference

        id: 571
        title: 'SQL Search via SearchRouter'
        class: Mapbender\CoreBundle\Element\SearchRouter
        configuration:
            tooltip: mb.core.searchrouter.class.title
            title: mb.core.searchrouter.class.title
            target: 'map'
            timeoutFactor: 3
            width: 700
            height: 500
            asDialog: false           
            routes:
                poi:
                    class: Mapbender\CoreBundle\Component\SQLSearchEngine
                    class_options:
                        connection: search_db
                        relation: qry_mapbender_user_suche
                        attributes:
                            - firstname
                            - lastname
                            - fullname
                            - usertype
                            - ergebnis
                        geometry_attribute: the_geom
                    form:
                        lastname:
                            type: text
                            options:
                                label: 'Lastname:'
                                required: false
                                attr:
                                    data-autocomplete: 'on'
                                    data-autocomplete-distinct: 'on'
                                    data-autocomplete-using: 'firstname,usertype'
                            compare: ilike
                        fullname:
                            type: text
                            options:
                                label: 'Project:'
                                required: false
                                attr:
                                    data-autocomplete: 'on'
                            compare: ilike
                        usertype:
                            type: choice
                            options:
                                label: Usertype
                                required: false
                                empty_value: 'Please Choose...'
                                choices:
                                    company: Company
                                    administration: Administration
                                    university: University
                                    user: User
                            compare: ilike
                    results:
                        view: table
                        count: true
                        headers:
                            ergebnis: Name
                            fullname: Project
                            usertype: Usertype
                        callback:
                            event: click
                            options:
                                buffer: 50
                                minScale: 500
                                maxScale: 2500
                        styleMap:
                            default:
                                strokeWidth: 2
                                strokeColor: '#00ffff'
                                fillColor: '#00f300'
                                fillOpacity: 0.5
                                pointRadius: 10
                            select:
                                strokeWidth: 3
                                fillColor: '#FF0000'
                                strokeColor: '#FF00FF'
                                fillOpacity: 1
                                pointRadius: 10

-- 
Mit freundlichen Grüßen

Charlotte Toma
GIS-Consultant

**********************************
AGIT 2017
5.-7. Juli 2017 in Salzburg
Besuchen Sie uns an Stand Nr. 31
www.agit.at
********************************** 

 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

 [hidden email]
 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
------------------------------- 
Am 24.06.2017 um 18:33 schrieb Tino Schuldt:
Hallo, 

ich versuche seit einiger Zeit den Search Router mithilfe der mapbender.yml Datei zu erstellen. Leider bekomme ich beim einlesen Fehlermeldungen. Was mache ich falsch? Nur wenn ich searchrouter aus meiner mapbender.yml Datei entferne klappt alles problemlos. 
Ich nutze die neuste Mapbender 3.0.6.1 Version. 

Fehlermeldung: 
  > loading Mapbender\CoreBundle\DataFixtures\ORM\Application\LoadApplicationData 

                                                              
  [Symfony\Component\Debug\Exception\ContextErrorException]   
  Notice: Undefined index: class                             
                                                              

doctrine:fixtures:load [--fixtures [FIXTURES]] [--append] [--em EM] [--shard SHARD] [--purge-with-truncate] [--multiple-transactions] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] <command>


Mein Code ist wie folgt: 

            elements: 
                sidepane: 
                    searchrouter: 
                        target: map 
                        asDialog: false 
                        timeoutFactor: 3 
                        height: 500 
                        width: 700 
                        routes: 
                            poi: 
                                class: Mapbender\CoreBundle\Component\SQLSearchEngine 
                                class_options: 
                                  connection: postgis 
                                  relation: geodata.poi 
                                  attributes: 
                                    - gid 
                                    - name 
                                  geometry_attribute: geom 
                                form: 
                                  name: 
                                    type: text 
                                    options: 
                                      required: true 
                                      attr: 
                                        data-autocomplete: 'on' 
                                        data-autocomplete-distinct: 'on' 
                                        data-autocomplete-using: type 
                                    compare: ilike 
                                results: 
                                  view: table 
                                  count: true 
                                  headers: 
                                    gid: ID 
                                    name: Name 
                                  callback: 
                                    event: click 
                                    options: 
                                      buffer: 10 
                                      minScale: null 
                                      maxScale: null


_______________________________________________
Mapbender_users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapbender_users


_______________________________________________
Mapbender_users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapbender_users
Reply | Threaded
Open this post in threaded view
|

Re: help with the searchrouter configuration

Eras
Also wenn ich den Code über die Weboberfläche eingebe, dann geht es komischerweise ohne Fehler.

Wenn ich aber über die mapbender.yml einlesen kommt dieser Fehler in app_dev.php

 1/1 ContextErrorException in MapbenderYamlCompilerPass.php line 113: Warning: array_key_exists() expects parameter 2 to be array, string given

    in MapbenderYamlCompilerPass.php line 113
    at ErrorHandler->handleError('2', 'array_key_exists() expects parameter 2 to be array, string given', '/var/www/mapbender3/mapbender/src/Mapbender/CoreBundle/DependencyInjection/Compiler/MapbenderYamlCompilerPass.php', '113', array('filePath' => '/var/www/mapbender3/app/config/mapbender.yml', 'container' => object(ContainerBuilder), 'fileResource' => object(FileResource), 'yml' => '/var/www/mapbender3/app/config/mapbender.yml'))
    at array_key_exists('parameters', '/var/www/mapbender3/app/config/mapbender.yml') in MapbenderYamlCompilerPass.php line 113
    at MapbenderYamlCompilerPass->loadAndMergeYamlParameters('/var/www/mapbender3/app/config/mapbender.yml') in MapbenderYamlCompilerPass.php line 71
    at MapbenderYamlCompilerPass->process(object(ContainerBuilder)) in Compiler.php line 104
    at Compiler->compile(object(ContainerBuilder)) in ContainerBuilder.php line 598
    at ContainerBuilder->compile() in bootstrap.php.cache line 2754
    at Kernel->initializeContainer() in bootstrap.php.cache line 2529
    at Kernel->boot() in bootstrap.php.cache line 2560
    at Kernel->handle(object(Request)) in app_dev.php line 28