Javascript API 10.1
I created a layer and a renderer.
After I add the layer to the map . . .
map.addLayer(myLayer);
. . . I generate the renderer:
generateRenderer.execute(params, ftnApplyRenderer, ftnErrorHandler);
Everything works fine, but I get an 'xhr cancelled' error in Firebug (Firefox 17.0) in the function below when refresh() is called on the layer:
function ftnApplyRenderer(renderer) {
'use strict';
myLayer.setRenderer(renderer);
myLayer.refresh();
}
If I comment out the refresh() part, the error goes away, but then the layer doesn't render.
If I clear the error console and run the above function again, the error does not occur. It seems that when the layer is added, dojo is still doing something that gets cancelled when the refresh() method is called.
Even though the application still works fine, how can I avoid this error?
Thanks.
-Dan