WG: Mapbender3 - Konfiguration Search Router

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

WG: Mapbender3 - Konfiguration Search Router

WPGIS

Hallo zusammen,

 

ich habe in unserem Mapbender Projekt versucht Search Router zu integrieren, bekomme aber immer die Meldung „No results found“.

Die config.yml sieht so aus:

 

"doctrine:

     dbal:

         default_connections: 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%

                                 postgres:

                                                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%

 

     orm:

         auto_generate_proxy_classes: %kernel.debug%

         auto_mapping: true"

 

Die parameters.yml so:

 

"parameters:

     database_driver:   pdo_pgsql

     database_host:     *****

     database_port:     5432

     database_name:     mapbender3

     database_path:     ~

     database_user:     postgres

     database_password: *****

 

     database2_driver:   pdo_pgsql

     database2_host:     *****

     database2_port:     5432

     database2_name:     postgres

     database2_path:     ~

     database2_user:     postgres

     database2_password: *****

 

     mailer_transport:  smtp

     mailer_host:       localhost

     mailer_user:       ~

     mailer_password:   ~

 

     # locale en, de, it, es, ru, nl, pt are available

     fallback_locale:   en

     locale:            en

     secret:            ThisTokenIsNotSoSecretChangeIt

 

     fom:

         server_name:   Mapbender3

         server_version: 3.0.5.3

         server_logo:   bundles/mapbendercore/image/logo_mb3.png

 

     # framework :

http://symfony.com/doc/2.1/reference/configuration/framework.html#cookie-lifetime

     cookie_secure: false

     cookie_lifetime: 3600

 

# OWSProxy Configuration

     ows_proxy3_logging: false

     ows_proxy3_obfuscate_client_ip: true

     ows_proxy3_host: ~

     ows_proxy3_port: ~

     ows_proxy3_connecttimeout: 60

     ows_proxy3_timeout: 90

     ows_proxy3_user: ~

     ows_proxy3_password: ~

     ows_proxy3_noproxy: ~

"

 

und die Konfiguration der Suche in Mapbender wie folgt:

 

"class: Mapbender\CoreBundle\Component\SQLSearchEngine

class_options:

     connection: postgres

     relation: public.Kundenstamm

     attributes:

         - id

         - bez_gem

     geometry_attribute: geom

form:

     Gemeinde:

         type: text

         options:

             required: true

         compare: exact

results:

     view: table

     count: true

     headers:

         id: ID

         bez_gem: Name

     callback:

         event: click

         options:

             buffer: 10

             minScale: null

             maxScale: null"

 

In der prod.log steht folgende Fehlermeldung:

 

[2017-04-03 10:38:12] request.CRITICAL: Uncaught PHP Exception

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException:

"You have requested a non-existent service "doctrine.dbal.postgres_connection". Did you mean this:

"doctrine.dbal.default_connection"?" at /var/www/mapbender3/app/bootstrap.php.cache line 2048 {"exception":"[object]

(Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException(code:

0): You have requested a non-existent service \"doctrine.dbal.postgres_connection\". Did you mean this:

\"doctrine.dbal.default_connection\"? at /var/www/mapbender3/app/bootstrap.php.cache:2048)"} []

 

Ich habe ähnliche Probleme

(http://osgeo-org.1560.x6.nabble.com/connecting-a-database-td5254910.html,

http://osgeo-org.1560.x6.nabble.com/Mapbender3-Searchrouter-additional-database-connection-td5303306.html

) bereits im Forum gefunden, die dort vorgeschlagenen Lösungen haben aber nichts geändert soweit ich sie umsetzen konnte.

 

Über Lösungsansätze würde ich mich sehr freuen.

 

Freundliche Grüße

 

Markus Lütke Brintrup

 

 


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

Re: WG: Mapbender3 - Konfiguration Search Router

Jörg Thomsen (WhereGroup)
Hallo Markus,

Hast du den cache gelöscht / Dir das mit app_dev angesehen?
So dürfte es eigentlich gar nicht funktionieren, weil:

"doctrine:

     dbal:

         default_connections: default
da muss es heißen
default_connection: default

also '
default_connection' im singular.

Außerdem
willst Du sicher nicht auf der DB postgres suchen, oder? Das ist ja die Verwaltungs-DB in Postgres.

Am 03.04.2017 um 13:26 schrieb Geodaten WiplferPlan:

     database2_driver:   pdo_pgsql

     database2_host:     *****

     database2_port:     5432

     database2_name:     postgres

     database2_path:     ~

     database2_user:     postgres

     database2_password: *****


Viele Grüße,
Jörg

-- 
---------------------------------------
Aufwind durch Wissen!
Qualifizierte OpenSource-GIS-Schulungen
bei der www.foss-academy.com
--------------------------------------- 

Jörg Thomsen
WhereGroup GmbH & Co. KG
Gillweg 3
14193 Berlin
Germany

Fon: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 89 09 53 21

[hidden email]
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com

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

Re: WG: Mapbender3 - Konfiguration Search Router

Charlotte Toma
In reply to this post by WPGIS
Hallo,

versuch doch mal statt der exakten Abgleichfunktion ein "ilike" zu
nutzen --> vielleicht ist das AutoComplete zu genau für deine Daten.
Soweit sollte beim Aufruf mit app_dev.php auch eine genauere
Fehlermeldung kommen.


--
Mit freundlichen Grüßen

Charlotte Toma
GIS-Consultant

*********************************************************
Aufwind durch Wissen!
Qualifizierte OpenSource-GIS-Schulungen
bei der www.foss-academy.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

  [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 2017-04-03 13:26, schrieb Geodaten WiplferPlan:

> Hallo zusammen,
>
> ich habe in unserem Mapbender Projekt versucht Search Router zu
> integrieren, bekomme aber immer die Meldung „No results found".
>
> Die config.yml sieht so aus:
>
> "doctrine:
>
>      dbal:
>
>          default_connections: 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%
>
>                                  postgres:
>
>                                                 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%
>
>      orm:
>
>          auto_generate_proxy_classes: %kernel.debug%
>
>          auto_mapping: true"
>
> Die parameters.yml so:
>
> "parameters:
>
>      database_driver:   pdo_pgsql
>
>      database_host:     *****
>
>      database_port:     5432
>
>      database_name:     mapbender3
>
>      database_path:     ~
>
>      database_user:     postgres
>
>      database_password: *****
>
>      database2_driver:   pdo_pgsql
>
>      database2_host:     *****
>
>      database2_port:     5432
>
>      database2_name:     postgres
>
>      database2_path:     ~
>
>      database2_user:     postgres
>
>      database2_password: *****
>
>      mailer_transport:  smtp
>
>      mailer_host:       localhost
>
>      mailer_user:       ~
>
>      mailer_password:   ~
>
>      # locale en, de, it, es, ru, nl, pt are available
>
>      fallback_locale:   en
>
>      locale:            en
>
>      secret:            ThisTokenIsNotSoSecretChangeIt
>
>      fom:
>
>          server_name:   Mapbender3
>
>          server_version: 3.0.5.3
>
>          server_logo:   bundles/mapbendercore/image/logo_mb3.png
>
>      # framework :
>
> http://symfony.com/doc/2.1/reference/configuration/framework.html#cookie-lifetime
> [1]
>
>      cookie_secure: false
>
>      cookie_lifetime: 3600
>
> # OWSProxy Configuration
>
>      ows_proxy3_logging: false
>
>      ows_proxy3_obfuscate_client_ip: true
>
>      ows_proxy3_host: ~
>
>      ows_proxy3_port: ~
>
>      ows_proxy3_connecttimeout: 60
>
>      ows_proxy3_timeout: 90
>
>      ows_proxy3_user: ~
>
>      ows_proxy3_password: ~
>
>      ows_proxy3_noproxy: ~
>
> "
>
> und die Konfiguration der Suche in Mapbender wie folgt:
>
> "class: Mapbender\CoreBundle\Component\SQLSearchEngine
>
> class_options:
>
>      connection: postgres
>
>      relation: public.Kundenstamm
>
>      attributes:
>
>          - id
>
>          - bez_gem
>
>      geometry_attribute: geom
>
> form:
>
>      Gemeinde:
>
>          type: text
>
>          options:
>
>              required: true
>
>          compare: exact
>
> results:
>
>      view: table
>
>      count: true
>
>      headers:
>
>          id: ID
>
>          bez_gem: Name
>
>      callback:
>
>          event: click
>
>          options:
>
>              buffer: 10
>
>              minScale: null
>
>              maxScale: null"
>
> In der prod.log steht folgende Fehlermeldung:
>
> [2017-04-03 10:38:12] request.CRITICAL: Uncaught PHP Exception
>
> Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException:
>
>
> "You have requested a non-existent service
> "doctrine.dbal.postgres_connection". Did you mean this:
>
> "doctrine.dbal.default_connection"?" at
> /var/www/mapbender3/app/bootstrap.php.cache line 2048
> {"exception":"[object]
>
> (Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException(code:
>
>
> 0): You have requested a non-existent service
> \"doctrine.dbal.postgres_connection\". Did you mean this:
>
> \"doctrine.dbal.default_connection\"? at
> /var/www/mapbender3/app/bootstrap.php.cache:2048)"} []
>
> Ich habe ähnliche Probleme
>
> (http://osgeo-org.1560.x6.nabble.com/connecting-a-database-td5254910.html,
>
> http://osgeo-org.1560.x6.nabble.com/Mapbender3-Searchrouter-additional-database-connection-td5303306.html
>
> ) bereits im Forum gefunden, die dort vorgeschlagenen Lösungen haben
> aber nichts geändert soweit ich sie umsetzen konnte.
>
> Über Lösungsansätze würde ich mich sehr freuen.
>
> Freundliche Grüße
>
> Markus Lütke Brintrup
>
>
>
> Links:
> ------
> [1]
> http://symfony.com/doc/2.1/reference/configuration/framework.html#cookie-lifetime
> _______________________________________________
> 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
|

Custom element that displays the result of a SQL query

prototron
In reply to this post by Jörg Thomsen (WhereGroup)
Before spending time trying to figure out how to create my own elements,
I wanted to ask you if that would be something possible.

I simply want to display a value obtained by running a SQL query to the
PostgreSQL backend.

Something like: "Protected land (ha): [value]"


Thank you,


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

Re: Custom element that displays the result of a SQL query

useher
Hello!

You should provide a little more information what you want to do.
You can use different approches to solve this. In mapbender i think, you can use something like the search or the digitizer element. These can use a sql-query direct from mapbender. You only have to configure the database connection. But when you use a wms layer in the behind, a getfeatureinfo is maybe the better approach.

best regards
Uwe Seher
 

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

Re: Custom element that displays the result of a SQL query

prototron

I simply need to display, maybe in the toolbar or something, a single dynamic numeric value based on the result of a query made to the PostgreSQL database we use for the daily operations of the organization.

It would be preceded by a string like: "The value is:"  ([value])

Is there a currently available element/bundle that allows us to do that?


On 2017-05-24 4:30 AM, Uwe Seher wrote:
Hello!

You should provide a little more information what you want to do.
You can use different approches to solve this. In mapbender i think, you can use something like the search or the digitizer element. These can use a sql-query direct from mapbender. You only have to configure the database connection. But when you use a wms layer in the behind, a getfeatureinfo is maybe the better approach.

best regards
Uwe Seher
 


_______________________________________________
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: Custom element that displays the result of a SQL query

ruhri

Hi Pat,

 

mabybe this is what you want:

https://github.com/mapbender/query-builder

 

To be honest, I didn’t try it by myself. But I’d appreciate it, if you try it and share your experiences ;-)

 

Regards

Ben

 

Von: Mapbender_users [mailto:[hidden email]] Im Auftrag von Abrabacabra
Gesendet: Donnerstag, 25. Mai 2017 04:34
An: [hidden email]
Betreff: Re: [Mapbender-users] Custom element that displays the result of a SQL query

 

I simply need to display, maybe in the toolbar or something, a single dynamic numeric value based on the result of a query made to the PostgreSQL database we use for the daily operations of the organization.

It would be preceded by a string like: "The value is:"  ([value])

Is there a currently available element/bundle that allows us to do that?

 

On 2017-05-24 4:30 AM, Uwe Seher wrote:

Hello!

You should provide a little more information what you want to do.
You can use different approches to solve this. In mapbender i think, you can use something like the search or the digitizer element. These can use a sql-query direct from mapbender. You only have to configure the database connection. But when you use a wms layer in the behind, a getfeatureinfo is maybe the better approach.

best regards
Uwe Seher
 




_______________________________________________
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: Custom element that displays the result of a SQL query

prototron

I am a little confused on how to install the bundle and add the element in one of my applications.

I downloaded the source from the git repo and put it in /vendor/mapbender/query-builder.

Then I ran  /composer.phar require "mapbender/query-builder".

It installed a few dependencies but failed near the end (I didn't wrote down the error :/). I ran the previous command another time and now it says that nothing was installed, nothing was updated and there is no error message.

Still can't see the element though..

I backed up the whole Mapbender folder before doing it, so I could do it again and provide more information if needed.

Anyway, am I missing something? Is it that simple to install the bundle?


On 2017-05-30 1:05 AM, Schepers, Benjamin wrote:

Hi Pat,

 

mabybe this is what you want:

https://github.com/mapbender/query-builder

 

To be honest, I didn’t try it by myself. But I’d appreciate it, if you try it and share your experiences ;-)

 

Regards

Ben

 

Von: Mapbender_users [[hidden email]] Im Auftrag von Abrabacabra
Gesendet: Donnerstag, 25. Mai 2017 04:34
An: [hidden email]
Betreff: Re: [Mapbender-users] Custom element that displays the result of a SQL query

 

I simply need to display, maybe in the toolbar or something, a single dynamic numeric value based on the result of a query made to the PostgreSQL database we use for the daily operations of the organization.

It would be preceded by a string like: "The value is:"  ([value])

Is there a currently available element/bundle that allows us to do that?

 

On 2017-05-24 4:30 AM, Uwe Seher wrote:

Hello!

You should provide a little more information what you want to do.
You can use different approches to solve this. In mapbender i think, you can use something like the search or the digitizer element. These can use a sql-query direct from mapbender. You only have to configure the database connection. But when you use a wms layer in the behind, a getfeatureinfo is maybe the better approach.

best regards
Uwe Seher
 




_______________________________________________
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


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

Re: Custom element that displays the result of a SQL query

Astrid Emde (WhereGroup)
Hello.

query-manager is a nice element, that is not part of Mapbender 3.0.6.1
and will come in a future feature release.

Here you can have a look on how it looks like (slide 38 - "Analyse von
Daten über den Query Manager"):
http://www.where2b-conference.com/sites/default/files/07_Where2B_Mapbender3_Features_in_Wesseling_AEmde.compressed.pdf
(Slides from last years presentation at Where2B in Bonn
http://www.where2b-conference.com/)

So as you can see it maybe too much for your needs - you only want to
display a short info "The value is:"  ([value]). It could make sense to
write a new Mapbender element that runs your query and displays the
value. An element like this does not exist yet.

Back to your question how you can integrate new repositories
* You can integrate other repositories via composer.json
* You should to follow the git based installation

Read more at:
https://github.com/mapbender/mapbender-starter/blob/release/3.0.6/CONTRIBUTING.md
* see part Create composer package

You find the composer.json here
*
https://github.com/mapbender/mapbender-starter/blob/release/3.0.6/application/composer.json

     "require": {
          ...
         "mapbender/query-builder": "1.0.1",
     },

Read CONTRIBUTING.md to lear how to update repositories with

../composer.phar update -o or sh bootstrap

Please note that the documentation for query-builder is not online yet.

Best regards Astrid

Am 2017-05-31 01:37, schrieb Abrabacabra:

> I am a little confused on how to install the bundle and add the
> element in one of my applications.
>
> I downloaded the source from the git repo and put it in
> _/vendor/mapbender/query-builder_.
>
> Then I ran  _/composer.phar require __"mapbender/query-builder"._
>
> It installed a few dependencies but failed near the end (I didn't
> wrote down the error :/). I ran the previous command another time and
> now it says that nothing was installed, nothing was updated and there
> is no error message.
>
> Still can't see the element though..
>
> I backed up the whole Mapbender folder before doing it, so I could do
> it again and provide more information if needed.
>
> Anyway, am I missing something? Is it that simple to install the
> bundle?
>
> On 2017-05-30 1:05 AM, Schepers, Benjamin wrote:
>
>> Hi Pat,
>>
>> mabybe this is what you want:
>>
>> https://github.com/mapbender/query-builder
>>
>> To be honest, I didn’t try it by myself. But I’d appreciate it,
>> if you try it and share your experiences ;-)
>>
>> Regards
>>
>> Ben
>>
>> VON: Mapbender_users
>> [mailto:[hidden email]] IM AUFTRAG VON
>> Abrabacabra
>> GESENDET: Donnerstag, 25. Mai 2017 04:34
>> AN: [hidden email]
>> BETREFF: Re: [Mapbender-users] Custom element that displays the
>> result of a SQL query
>>
>> I simply need to display, maybe in the toolbar or something, a
>> single dynamic numeric value based on the result of a query made to
>> the PostgreSQL database we use for the daily operations of the
>> organization.
>>
>> It would be preceded by a string like: "The value is:"  ([value])
>>
>> Is there a currently available element/bundle that allows us to do
>> that?
>>
>> On 2017-05-24 4:30 AM, Uwe Seher wrote:
>>
>>> Hello!
>>>
>>> You should provide a little more information what you want to do.
>>> You can use different approches to solve this. In mapbender i
>>> think, you can use something like the search or the digitizer
>>> element. These can use a sql-query direct from mapbender. You only
>>> have to configure the database connection. But when you use a wms
>>> layer in the behind, a getfeatureinfo is maybe the better
>>> approach.
>>>
>>> best regards
>>> Uwe Seher
>>>
>>> _______________________________________________
>>>
>>> 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
> _______________________________________________
> Mapbender_users mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapbender_users

--
Mit freundlichen Grüßen

Astrid Emde
GIS-Consultant

---------------------------------------
Aufwind durch Wissen!
Qualifizierte OpenSource-GIS-Schulungen
bei der www.foss-academy.com
---------------------------------------

  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

  [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
-------------------------------
_______________________________________________
Mapbender_users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapbender_users