Bug report #14187

Contextual legend

Added by Benjamin Schepers almost 9 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Web Services clients/WMS
Affected QGIS version:2.12.2 Regression?:No
Operating System:Win, 64bit Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:22189

Description

Using QGIS 2.12.3 (Win64bit) with contextual WMS-legends doesn't work!
The WMS-Counterpart is a patched and working UMNMapserver 7.0 - Examples:

Standard-Legend:
http://geodaten.metropoleruhr.de/spw/spw_web?language=ger&SERVICE=WMS&VERSION=1.3.0&SLD_VERSION=1.1.0&REQUEST=GetLegendGraphic&FORMAT=image/png&LAYER=oepnv_linien&STYLE=

Contextual-Legend (working):
http://geodaten.metropoleruhr.de/spw/spw_web?language=ger&SERVICE=WMS&VERSION=1.3.0&SLD_VERSION=1.1.0&REQUEST=GetLegendGraphic&FORMAT=image/png&LAYER=oepnv_linien&STYLE=&BBOX=361299.31917663925560191,5701245.71691642235964537,362276.95459430309711024,5701856.90441704634577036&CRS=EPSG:25832&WIDTH=148&HEIGHT=925

QGIS sends following Request with Contextual-Legends checked (grabbed from Apache-log) - non-working:
http://geodaten.metropoleruhr.de/spw/spw_web?language=ger&&SERVICE=WMS&VERSION=1.3.0&SLD_VERSION=1.1.0&REQUEST=GetLegendGraphic&FORMAT=image/png&LAYER=oepnv_linien&STYLE=&BBOX=300000,5620000,440000,5770000&CRS=EPSG:25832

In order to work well in UMN-mapserver-logic, QGIS needs to send one more parameter-set (WIDTH and HEIGHT of the mapcanvas in px).

http://www.mapserver.org/de/development/rfc/ms-rfc-101.html

Moreover the BBOX seems to be wrong, IMHO this should be an dynamic parameter in getlegend-requests, whether the one QGIS seems to be static! In my last example the requests BBOX is the mapextent from the service. For each zooming- and panning-action, there is send a requests to the service, but BBOX doesn't change.

Please Review the function. THX

See also 224b2c8 and #11859

lo3.png (958 KB) Giovanni Manghi, 2016-02-09 01:37 PM

lo4.png (910 KB) Giovanni Manghi, 2016-02-09 01:37 PM

contextual_legend.jpg (101 KB) Benjamin Schepers, 2016-02-15 10:53 PM

legends_compare.jpg (131 KB) Benjamin Schepers, 2016-02-15 10:53 PM

History

#1 Updated by Giovanni Manghi almost 9 years ago

  • Status changed from Open to Feedback

it works fine here on Master on both Linux and Windows.

#2 Updated by Benjamin Schepers almost 9 years ago

Did you use the above mentioned Service for your test?
(http://geodaten.metropoleruhr.de/spw/spw_web)

I tried OsGeo4W and Standalone on Windows and also the Ubuntu-Version - always the latest Release 2.12.3.
No success! Do you have another service to crosscheck this for me, wehether this is an issue with above service?

Maybe this relates to a WFS bug posted by me: #11968?
I know, this are different service-providers, but both have in common not to pass the new BBOX after panning to the services.

#3 Updated by Jürgen Fischer almost 9 years ago

Benjamin Schepers wrote:

Did you use the above mentioned Service for your test?

No - he said master (ie. 2.13)

#4 Updated by Benjamin Schepers almost 9 years ago

Hi,
please apologize the misunderstanding.

So I installed "qgis-dev" (2.13.0-93) with OSGeo4W - this should be the "QGIS-Master", shouldn't it?

But - sorry for that - also with this version no luck with contextual legends!

#5 Updated by Giovanni Manghi almost 9 years ago

Benjamin Schepers wrote:

Hi,
please apologize the misunderstanding.

So I installed "qgis-dev" (2.13.0-93) with OSGeo4W - this should be the "QGIS-Master", shouldn't it?

But - sorry for that - also with this version no luck with contextual legends!

see attached images (Linux and Windows, QGIS master)

#6 Updated by Benjamin Schepers almost 9 years ago

Hi,

please have a look at my screenshots.
To be clear I mean adding a WMS and checking the box "Use contextual WMS legend" (-> "contextual_legend.jpg")!
My install: OSGeo4W 64bit; master from last night - 101

See "legends_compare.jpg":
1. WMS contextual legends do not work
2. default (contextual unchecked!) legends do work

According to my experience i made with 2.12.3 (see the first post):
contextual legends can't work, because there are some missing parameters in the getlegend-request. Without theese parameters mapserver can't answer the request properly. I checked the logs on the WMS-server-side again (request from master - see incoming request at the server: [16/Feb/2016:07:42:44 +0100] "GET /spw/spw_web?language=ger&&SERVICE=WMS&VERSION=1.3.0&SLD_VERSION=1.1.0&REQUEST=GetLegendGraphic&FORMAT=image/png&LAYER=oepnv_linien&STYLE=&BBOX=300000,5620000,440000,5770000&CRS=EPSG:25832 HTTP/1.1" 200 568 "-" "Mozilla/5.0 QGIS/2.13.0-Master")!

I'm not the developer of that QGIS-code and I'm also unable to help there (THX to everyone who can and does!!!), so I can't say something about the reasons what's exactly (not) happening inside QGIS. But I can analyze the bahaviour, post errors and help debugging.

@Giovanni, your screenshots do not prove that it works (Sorry ;-)), if you zoom in, legend should have thinned out to e.g. just the Bus-lines (the green ones).

#7 Updated by Giovanni Manghi over 8 years ago

  • Status changed from Feedback to Open

#8 Updated by Giovanni Manghi over 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#9 Updated by Giovanni Manghi almost 6 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

End of life notice: QGIS 2.18 LTR

Source:
http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/

QGIS 3.4 has recently become our new Long Term Release (LTR) version. This is a major step in our history – a long term release version based on the massive updates, library upgrades and improvements that we carried out in the course of the 2.x to 3x upgrade cycle.

We strongly encourage all users who are currently using QGIS 2.18 LTR as their preferred QGIS release to migrate to QGIS 3.4. This new LTR version will receive regular bugfixes for at least one year. It also includes hundreds of new functions, usability improvements, bugfixes, and other goodies. See the relevant changelogs for a good sampling of all the new features that have gone into version 3.4

Most plugins have been either migrated or incorporated into the core QGIS code base.

We strongly discourage the continued use of QGIS 2.18 LTR as it is now officially unsupported, which means we’ll not provide any bug fix releases for it.

You should also note that we intend to close all bug tickets referring to the now obsolete LTR version. Original reporters will receive a notification of the ticket closure and are encouraged to check whether the issue persists in the new LTR, in which case they should reopen the ticket.

If you would like to better understand the QGIS release roadmap, check out our roadmap page! It outlines the schedule for upcoming releases and will help you plan your deployment of QGIS into an operational environment.

The development of QGIS 3.4 LTR has been made possible by the work of hundreds of volunteers, by the investments of companies, professionals, and administrations, and by continuous donations and financial support from many of you. We sincerely thank you all and encourage you to collaborate and support the project even more, for the long term improvement and sustainability of the QGIS project.

Also available in: Atom PDF