Hi,
im using the linktoview widget for showing different layergroups. The
linktoview widget produces url's with parameter for groups to show, called
SHOWGROUPS='Cities'
The maps then shows my layergroup correctly,
only problem is the checkbox in the legend for layergroup 'Cities' doesn't
get checked.
Im trying to fix this with javascript:
var mapWidget = Fusion.getWidgetById('MainMap');
var Maps = mapWidget.getAllMaps();
Maps[0].layerRoot.groups[2].groups[7].legend.treeItem.checkbox.checked = true;
The code is working when executed via button in toolbar, but I want
the code executed when loading the page and this will not work,
errormessage: "WARNING: Exception occurred in AJAX callback.Message:
Cannot read property 'treeItem' of undefined Location: undefined
(undefined)"
Im guessing it has something to do with the Legend hasn't finished
loading and i have to trigger some event when the legend has finished
load?
Am I missing something, or do I have to add my own event in legend.js
when the legend has loaded or is there some other event i could use??
Am i missing something else?
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users