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)

appdef.zip (8.4 KB ) - added by bberdel 15 years ago.
legend.PNG (50.4 KB ) - added by liuar 14 years ago.
legend for fusion2.2 (766 bytes ) - added by liuar 14 years ago.

Download all attachments as: .zip

Change History (14)

by bberdel, 15 years ago

Attachment: appdef.zip added

comment:1 by bberdel, 15 years ago

Milestone: Future2.0

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.

comment:2 by madair, 15 years ago

Status: newassigned

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 bberdel, 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:4 by madair, 15 years ago

Milestone: 2.02.1

moving the rest of this to the 2.1 milestone

comment:5 by madair, 14 years ago

Milestone: 2.12.2

comment:6 by liuar, 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 liuar, 14 years ago

Attachment: legend.PNG added

comment:7 by madair, 14 years ago

Arthur,

Can you propose a patch to fix your issue?

comment:8 by liuar, 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 liuar, 14 years ago

Attachment: legend for fusion2.2 added

comment:9 by madair, 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:10 by liuar, 14 years ago

Hi bberdel,

Do you have any updates?

Regards,
Arthur

comment:11 by madair, 14 years ago

Resolution: fixed
Status: assignedclosed

liuar's patch applied at [2363]

Note: See TracTickets for help on using tickets.