[mapguide-internals] Patch for ticket 2380 (GETMAPLEGENDIMAGE should skip groups with no visible layers)
jumpinjackie at gmail.com
Fri Nov 22 06:40:10 PST 2013
I've attached a patch for ticket 2380 (GETMAPLEGENDIMAGE should skip groups
with no visible layers)
This adds a "compilation" step to the legend rendering where we compile the
following information about the MgMap to avoid repeated linear searches for
- The number of visible layers for each group (as a typedef'd
std::map<STRING, int> )
- The list of child groups for each group (as a typedef'd std::map<STRING,
Then for each child group we find in
MgLegendPlotUtil::ProcessLayersForLegend(), we check if that group has any
visible child layers using the above compiled information. If there are no
visible layers for that group, we skip the recursive call back into
MgLegendPlotUtil::ProcessLayersForLegend() for that particular group.
The net result is that visible groups that have no visible child layers are
not drawn into the legend, reducing the clutter of empty groups in the
Please review. Thanks.
View this message in context: http://osgeo-org.1560.x6.nabble.com/Patch-for-ticket-2380-GETMAPLEGENDIMAGE-should-skip-groups-with-no-visible-layers-tp5090688.html
Sent from the MapGuide Internals mailing list archive at Nabble.com.
More information about the mapguide-internals