mgoulet777

Hiding/showing graphics using .hide and .show issue

Discussion created by mgoulet777 on Mar 20, 2013
Latest reply on Mar 22, 2013 by DSwingley-esristaff
Panning seems to be fairly choppy when there are numerous objects on the graphics layer (in my case, building footprints). I decided that a workaround would be to hide the graphics layer while panning, and then restore visibility.

The code, I think, should be fairly simple, but the following script does not work. I've tried setting the visibility, doing a redraw/refresh on the lyrBuildings layer. Nothing seems to bring those objects back except zooming in or out. What am I missing?


dojo.connect(map, "onPanStart", function(){
    lyrBuildings.hide();
});

dojo.connect(map, "onPanEnd", function(){
    lyrBuildings.show();
});

Outcomes