[mapguide-trac] #167: Legend does not refresh correctly, when using the summary parameter

MapGuide Open Source trac_mapguide at osgeo.org
Tue May 29 11:04:28 EDT 2007


#167: Legend does not refresh correctly, when using the summary parameter
------------------------------------+---------------------------------------
 Reporter:  ksgeograf               |         Owner:       
     Type:  defect                  |        Status:  new  
 Priority:  medium                  |     Milestone:  1.2  
Component:  Server                  |       Version:  1.2.0
 Severity:  major                   |    Resolution:       
 Keywords:  legend summary refresh  |   External_id:       
------------------------------------+---------------------------------------
Comment (by ksgeograf):

 The above fix does not solve the problem with the missing legend labels.
 That one can be fixed by modifying Map.cpp in MapGuideCommon. In
 particular line 266 should be changed from:
 {{{
 if(layer->IsShowInLegend())
 {
     rtLayer->SetExpandInLegend(layer->IsExpandInLegend());
     rtLayer->SetLegendLabel(layer->GetLegendLabel());
 }
 }}}
 To:
 {{{
 rtLayer->SetExpandInLegend(layer->IsExpandInLegend());
 rtLayer->SetLegendLabel(layer->GetLegendLabel());
 }}}

 The same goes for the Group part at line 196.


 Since this will not be fixed in the Enterprise edition anytime soon, a
 temporary fix is:
 {{{
 Load the map definition.
 Ensure that ALL layers and groups are visible.
 Add a bogus layer, with a random resourceid, keep it invisible.
 Save map in temporary location, preferably session repository.
 Create runtime map from temporary MapDefinition.
 Update runtime map, and hide any legends that should not be shown.
 }}}

 Everytime the legend has to update, change the resourceId of the bogus
 layer, save it and call map.Refresh();

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/167#comment:2>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list