[fusion-trac] #306: Legend panel is empty with Raster/WMS data
source
Fusion
trac_fusion at osgeo.org
Thu Mar 18 06:29:54 EDT 2010
#306: Legend panel is empty with Raster/WMS data source
---------------------+------------------------------------------------------
Reporter: jennyhe | Owner: madair
Type: defect | Status: reopened
Priority: P2 | Milestone: Future
Component: Widgets | Version: 1.1.1
Severity: Major | Resolution:
Keywords: | External_id: 1263361
State: New | Browser: All
Os: All |
---------------------+------------------------------------------------------
Changes (by liuar):
* status: closed => reopened
* resolution: fixed =>
Comment:
Hi Mike,[[BR]]
[[BR]]
Jenny and I find that the DWF icon is not the displayed incorrectly which
is a disabled icon[[BR]]
In Legend.js, to create raster and DWF icon,[[BR]]
{{{
// MapGuide Raster and DWF layer
if (layer.layerTypes[0] == 4 ) {
if (style && style.staticIcon ==
Fusion.Constant.LAYER_DWF_TYPE) {
opt.image = this.imgLayerDWFIcon;
} else {
opt.image = this.imgLayerRasterIcon;
}
opt.enabled = true;
}
}}}
[[BR]]
the DWF layer type 5 is never considered. Should be update to:
{{{
// MapGuide Raster and DWF layer
if(layer.layerTypes[0] == 4){
opt.image = this.imgLayerRasterIcon;
opt.enabled = true;
} else if(layer.layerTypes[0] == 5){
opt.image = this.imgLayerDWFIcon;
opt.enabled = true;
}
}}}
[[BR]]
to create the check box for layers,
{{{
if (checkbox) {
layer.legend.treeItem.checkBox.checked =
layer.visible?true:false;
if (layer.layerTypes[0] == 4 || range.styles.length > 0) {
layer.legend.treeItem.checkBox.disabled = false;
} else {
layer.legend.treeItem.checkBox.disabled = true;
}
}
}}}
[[BR]]
which should be:
{{{
if (checkbox) {
layer.legend.treeItem.checkBox.checked =
layer.visible?true:false;
if (layer.layerTypes[0] == 4 || layer.layerTypes[0] == 5 ||
range.styles.length > 0) {
layer.legend.treeItem.checkBox.disabled = false;
} else {
layer.legend.treeItem.checkBox.disabled = true;
}
}
}}}
[[BR]]
I am not sure if it's a defect or by design, so would you please give me
your opinion?[[BR]]
Thanks,[[BR]]
Arthur
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/306#comment:10>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.
More information about the fusion-trac
mailing list