Opened 8 years ago

Closed 7 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 8 years ago.
legend.PNG (50.4 KB) - added by liuar 7 years ago.
legend for fusion2.2 (766 bytes) - added by liuar 7 years ago.

Download all attachments as: .zip

Change History (14)

Changed 8 years ago by bberdel

Attachment: appdef.zip added

comment:1 Changed 8 years ago by bberdel

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 Changed 8 years ago by madair

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 Changed 8 years ago by bberdel

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 Changed 8 years ago by madair

Milestone: 2.02.1

moving the rest of this to the 2.1 milestone

comment:5 Changed 7 years ago by madair

Milestone: 2.12.2

comment:6 Changed 7 years ago by liuar

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

Changed 7 years ago by liuar

Attachment: legend.PNG added

comment:7 Changed 7 years ago by madair

Arthur,

Can you propose a patch to fix your issue?

comment:8 Changed 7 years ago by liuar

My fix is to revert the change in [2127] for legend.js. Not sure if this would cause bberdel's issue back.

--Arthur

Changed 7 years ago by liuar

Attachment: legend for fusion2.2 added

comment:9 Changed 7 years ago by madair

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 Changed 7 years ago by liuar

Hi bberdel,

Do you have any updates?

Regards,
Arthur

comment:11 Changed 7 years ago by madair

Resolution: fixed
Status: assignedclosed

liuar's patch applied at [2363]

Note: See TracTickets for help on using tickets.