There is a an existing indicator.
when you start your action do this...
dojo.byId("imgSearchLoader").style.display = "block";
when the action is done invoke this...
dojo.byId("imgSearchLoader").style.display = "none";
For panning, you might need to wire a function for onPanBegin and and onPanEnd or the equivalent events, see the JSAPI Map-Events.
Jim