[fusion-dev] Is there a parameter missing in Fusion.Layers.MapServer.getLegendImageURL(..)?

Bernhard Schneider schneiderei at hispeed.ch
Wed Dec 16 02:58:20 EST 2009


Hello Fusioners,

Building a Fusion application on the basis of MapServer, and using the  
Fusion 2 beta version I downloaded quite a while ago, I am having  
problems with the legend rendering.

All layers that have classes defined in the mapfile are rendered in  
the legend with one line per class, including icons showing the  
symbols (line color and width, fill color and pattern, etc.) with  
which the classes are drawn in the map. In my case, only the first  
class of each layer has the correct icon, all the other have the same  
icon as the first class.

Digging into the code, I found something confusing which I think may  
be the cause for the problem:

-- The two methods  
Fusion.Widget.Legend.LegendRendererDefault.updateLayer and  
Fusion.Widget.Legend.LegendRendererDefault.createTreeItem call the  
MapServer method Fusion.Layers.MapServer.getLegendImageURL, each time  
passing three parameters for scale, layer, and style.

-- The method Fusion.Layers.MapServer.getLegendImageURL, as  
implemented in MapServer.js, accepts only two parameters, namely  
fScale and layer.

Perhaps, someone knowledgeable could have look at this?

Bernhard



More information about the fusion-dev mailing list