Opened 15 years ago
Closed 14 years ago
#376 closed defect (fixed)
Fusion Legend Issues
Reported by: | bberdel | Owned by: | madair |
---|---|---|---|
Priority: | P2 | Milestone: | 2.2 |
Component: | Widgets | Version: | 2.0.0-RC1 |
Severity: | Major | Keywords: | |
Cc: | Browser: | All | |
External ID: | Operating System: | All | |
state: | New |
Description
I am getting a couple error in the SVN version using Sheboygan data / standard templates or my own templates. When opening the Map with Two Maps (Using one as a base map) I get ‘LegendLabel’ is null or not an object in legend.js (Line 9 in createTreeItem) and the variable style is coming in as null.
1 createTreeItem: function(layer, style, scale, bCheckBox) { 2 var opt = {}; 3 opt.statusIsDefault = layer.statusDefault; 4 5 if (bCheckBox ) { 6 opt.label = layer.legendLabel == ? ' ' : layer.legendLabel; 7 opt.draw = this.renderItemCheckBox; 8 } else { 9 opt.label = style.legendLabel == ? ' ' : style.legendLabel;
opt.draw = this.renderItem;
The Base map is also displayed on open even though I have the layer set to off and the check box for the layer is also not checked. So I have to check it and then uncheck to turn it off.
Also the following occurs with one or two maps.
Clicking on the map name check box also throws an error.
Line: 1038 of Mapguide.js
Error: 'this.oLayerOL2' is null or not an object
Attachments (3)
Change History (14)
by , 15 years ago
Attachment: | appdef.zip added |
---|
comment:1 by , 15 years ago
Milestone: | Future → 2.0 |
---|
comment:2 by , 15 years ago
Status: | new → assigned |
---|
at rev 2127: this includes a fix for the oLayerOL2 issue and toggling the map root. Also includes a fix for the legendLabel issue but I'm unable to test this. Brian: can you please test with your dataset and either report the error behaviour or close the ticket if it is fixed.
comment:3 by , 15 years ago
Nice, it did fix those issue. The only remaining issue is that although "Group is visible at startup is unchecked" the base layer still appears on startup. the layer checkbox is unchecked though.
comment:5 by , 14 years ago
Milestone: | 2.1 → 2.2 |
---|
comment:6 by , 14 years ago
Hi Mike,
The rev [2127] causes a problem in Fusion legend.
The themed layer's styles in legend are followed with the legendlabel of their parent group(see the attached image).
I can't test the appdef.zip without the testset, however, do you think it's needed to update the legend.js file?
Thanks,
Arthur
by , 14 years ago
Attachment: | legend.PNG added |
---|
comment:8 by , 14 years ago
My fix is to revert the change in [2127] for legend.js. Not sure if this would cause bberdel's issue back.
--Arthur
by , 14 years ago
Attachment: | legend for fusion2.2 added |
---|
comment:9 by , 14 years ago
Arthur,
I don't want to just revert the change because it did solve the original issue but your patch is slightly different than just reverting the change, and I can't really test this without knowing more of the parameters involved. bberdel, does Arthur's patch still work in your use-case?
comment:11 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
liuar's patch applied at [2363]
I have confirmed that the issue with selecting the root map, and it not turning the map back on after has it been turned off Still exists with the Standard template / Appdef / Sheboygan dataset. So that does not appear to be package dependent:
Line: 1038 mapguide.js Error: 'this.oLayerOL2' is null or not an object
However the other error does not occur on the tiled Sheboygan example, but that is also not a raster dataset. I am using a MrSID dataset…
'LegendLabel' is null or not an object in legend.js (Line 9 in createTreeItem) and the variable style is coming in as null.