[Mapbender-users] Setting Search Router fails

karsten karsten at terragis.net
Tue Jan 5 11:42:32 PST 2021


Hi Hardy,
 
did you copy / import the data from a previous (lower PostGIS version)
database ? 
Possibly in that process you may have also added multiple (additional and
now obsolete) versions of the st_asgeojson function to the public schema.
 
You could verify that by running a query on the function such as
select * from pg_proc where proname = 'st_asgeojson';
and compare that to a virgin installation of PostgreSQL ...
In my case I have 5 entries for the 'st_asgeojson' function for example
 
One way to fix this could be to remove the obsolete versions of the
function...
A possible way of avoiding such trouble in the future would be to avoid
using the public schema for any of your project data and instead a dedicated
db schema for those, 
then the functions would not be accidentally copied over to a new database
with a database dump ...
 
Cheers
Karsten

  _____  

From: Mapbender_users [mailto:mapbender_users-bounces at lists.osgeo.org] On
Behalf Of treckmann at gisme.de
Sent: Tuesday, January 05, 2021 08:18
To: mapbender_users at lists.osgeo.org
Subject: [Mapbender-users] Setting Search Router fails



Hi all,
trying to setup a search like
##########
class: Mapbender\CoreBundle\Component\SQLSearchEngine
class_options:
  connection: mydb
  relation: mytable
  attributes:
    - gid
    - text01
  geometry_attribute: the_geom
form:
  text01:
    type: text
    options:
      required: false
      label: Nummer
      attr:
        data-autocomplete: 'on'
    compare: ilike
results:
  view: table
  count: true
  headers:
    text01: Nummer
    gid: bezeichnung
  callback:
    event: click
    options:
      buffer: 10
      minScale: null
      maxScale: 10000
  styleMap:
    ...
###################
The Table which holds the Geometries and the values are epsg:25832 same as
map definition
When using I'm getting error in log like:
....Funktion st_asgeojson(geometry) ist nicht eindeutig....
...HINT:  Konnte keine beste Kandidatfunktion auswählen. Sie müssen
möglicherweise ausdrückliche Typumwandlungen hinzufügen....

I'm using PG 10.5 and PostGIS 2.5 on Windows 10 running x64
MapBender iversion is 3.2.3 installed with MS4W (current release)

Any tip?

Regards
Hardy

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


More information about the Mapbender_users mailing list