Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
The feature can be toggled individually for groups - in layer tree view context menu.
This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
The functionality can be used in other renderers too, the only requirement
is that legend nodes need to specify their parent rule key via data().
Note that ayer tree model must have ShowLegendAsTree flag enabled, otherwise
the model will keep showing lists instead of trees.
I have managed to break that with implementation of #11369.
Obviously it is a bad idea to change selection in a slot connected to model's rowsInserted signals
because the drag'n'drop does not work properly anymore. Now registry bridge will emit a signal after
new layers have been added, so the selection change at that point should be safe.
* tree view and attribute selection for layer assigment in dialog
* support fill polygons/HATCH
* represent texts as MTEXT instead of TEXT (including font, slant and weight)
* support for RGB colors when there's no exact color match
* use AutoCAD 2000 DXF (R15) instead of R12
* remove R18 test methods
Funded-By: City of Uster
Funded-By: Ville de Morges
Funded-By: SIGE
Feature funded by Tecnostudi Ambiente, Faunalia and Andromede-oceanologie.
The legend in composition was fixed and did not represent the layers in the map.
With the work made by @wonder-sk on layer-tree and QgsComposerLegend users will be able
to configure composer legend as based on all the project layer tree with auto-update
model or filtered by map.
This commit reused these two QgsComposerLegend's properties to filter it based on map in
GetPrint Request
The issue #4003 qgis_mapserver getPrint legend options can be closed.
There is new "filter" button in layers panel that toggles this functionality
and in composer legend widget.
Related feature is that layer tree now shows symbols in map units with correct size
(even when filtering is not enabled) so as the map view changes the legend node icons
are updated too (if they use map units).
GetLegendGraphics in WMS server
-------------------------------
This is an extension of standard GetLegendGraphics request according to MapServer RFC 101.
See the document for more details: http://mapserver.org/development/rfc/ms-rfc-101.html
In summary, clients need to add BBOX and CRS/SRS parameters to get appropriate legend based on the given map view.
Parameters WIDTH and HEIGHT are also taken into account as they specify map view image size for correct calculation
of size of legend symbols (if they are based on map units).
--
This software has been commissioned by Tuscany Region (Italy),
co-funded by the European Commission and developed under the project LIFE12 ENV/IT/001054 LIFE + IMAGINE.
The software has been realized by Gis3W s.a.s.
Questo software è stato commissionato da Regione Toscana (Italia),
cofinanziato dalla Commissione Europea e sviluppato nell'ambito del progetto LIFE12 ENV/IT/001054 LIFE + IMAGINE.
Il software è stato realizzato da Gis3W s.a.s.
Visibility of a layer is not stored within the map layer, but visibility
of renderer categories (which turn into legend nodes) is stored inside renderer and
that one in turn inside map layer. This fact may result in surprising behavior
when change of visibility group for a composer map will affect other composer maps (and main canvas).
The only way to overcome the problem would be to have the possibility to use multiple renderers with one layer.