You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. add a layer to the toc widget using code.
2. Load the application
3. Step through TOC.js _RootLayerTOC _getLegendInfo function
What is the expected output? What do you see instead?
Expected to load legend from the layer instead of the arcgis legend tools.
What version of the product are you using? On what operating system?
2.09, Windows 7.
Please provide any additional information below.
I updated the "postCreate" function to make sure the rootLayer is loaded before
calling the _getLegendInfo function.
Here is the new code that fixes the bug in TOC.js line 620.
-------------------------------------------------------------
// extenstion point called by framework
postCreate: function () {
if ((this.rootLayer instanceof (ArcGISDynamicMapServiceLayer) ||
this.rootLayer instanceof (ArcGISTiledMapServiceLayer))) {
//check if the layer is loaded yet, if not, add a listener to wait
if (this.rootLayer.loaded) {
if (this._legendResponse) {
this._createRootLayerTOC();
} else {
this._getLegendInfo();
}
}
else {//layer not yet loaded, add listener
this.rootLayer.on("load", lang.hitch(this, this._getLegendInfo));
}
} else { //not servicelayer
this._createRootLayerTOC();
}
},
-----------------------------------
Original issue reported on code.google.com by gref...@gmail.com on 10 Apr 2014 at 8:02
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
gref...@gmail.com
on 10 Apr 2014 at 8:02The text was updated successfully, but these errors were encountered: