Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to add table title to dbconfig.js #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MattiasSp
Copy link
Contributor

@MattiasSp MattiasSp commented May 27, 2023

Fixes #160.

Makes it possible to add a custom title to a search table in dbcobfig.js.

This makes it easier to use Origo Map's Search control option 3 (get all data from the search response). Now it's no longer required to change the underlying table, adding an unnesessary title column with a single value, in order to group results by layer/table.

Config example:

models: {
      [...]
      search: {
        search: {
           tables: [
              {
                 table: 'fastighetsytor',
                 searchField: 'fastighetsbeteckning',
                 schema: 'public',
                 geometryName: 'geom',
                 title: 'Fastigheter',
                 useCentroid: true
              },

Request for feedback: the title column is called simply title in the result at the moment, but should perhaps be renamed to make column name collision less likely. Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add title to options in search
1 participant