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

QGIS Server: getFeature expression does not work #20286

Closed
qgib opened this issue Jan 29, 2015 · 7 comments
Closed

QGIS Server: getFeature expression does not work #20286

qgib opened this issue Jan 29, 2015 · 7 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Server Related to QGIS server
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jan 29, 2015

Author Name: Andreas Neumann (@andreasneumann)
Original Redmine Issue: 12090
Affected QGIS version: master
Redmine category:qgis_server
Assignee: Marco Hugentobler


It seems like in current master the attribute(getFeature()) expression does not work in a maptip.

I used the following maptip on layer "Langsamverkehrszonen":


[% "objekt_projektbezeichnung" %]
Status: [% attribute(getFeature('Status Begegnungszone', 'code', status_t30_begegnungszone),'wert')%] [%COALESCE('
Inbetriebnahme: ' || year(ende_baustelle),'')%]

-------------

The attribute(getFeature()) expression works fine in QGIS desktop, but does not work in QGIS server. QGIS server does not correctly evaluate the expression.


@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2015

Author Name: Andreas Neumann (@andreasneumann)


Forgot to mention that this concerns the response of the GetFeature request.

@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2015

Author Name: Giovanni Manghi (@gioman)


Hi Andreas, is this a regression?


  • version was changed from 2.6.0 to master
  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jan 29, 2015

Author Name: Andreas Neumann (@andreasneumann)


Hi Giovanni,

I don't know if this ever worked. It is the first time I tried this expression in server context. This feature was introduced in QGIS 2.6

But Marco promised to have a look at it.

Andreas

@qgib
Copy link
Contributor Author

qgib commented Feb 5, 2015

Author Name: Marco Hugentobler (@mhugent)


I tested it here, however it seems to work here (unless I overlooked something). E.g. doing a featureinfo at the green polygon of the attached screenshot returns: 'Tempo 30 Zone Brunnenwiesenstrasse
Status: bestehend, in Betrieb Inbetriebnahme: 2012' as maptip field. Isn't this the expected outcome?


  • 8386 was configured as feature_info.png

@qgib
Copy link
Contributor Author

qgib commented Feb 7, 2015

Author Name: Andreas Neumann (@andreasneumann)


Hi Marco,

Very strange - it does not work on my QGIS server. I will try on a different machine - or we could have a look at it next week with teamviewer.

btw: hope you feel better again? Heard you are sick at home ...

Thanks,
Andreas

@qgib
Copy link
Contributor Author

qgib commented Feb 9, 2015

Author Name: Marco Hugentobler (@mhugent)


It is probably because I loaded the whole group as WMS layer into QGIS. If you load only 'Langsamverkehrszonen', it will not work, because QGIS cannot know about the two layers in Hilfstabellen.
The correct approach in the server would be to check that before the request (as it is done for joins and value relations). Difficulty is that the expression can be anywhere, not only in the displayfield.

@qgib
Copy link
Contributor Author

qgib commented Feb 10, 2015

Author Name: Marco Hugentobler (@mhugent)


Fixed in 27bf440


  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Server Related to QGIS server labels May 25, 2019
@qgib qgib added this to the Version 2.8 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Server Related to QGIS server
Projects
None yet
Development

No branches or pull requests

1 participant