set the visible
-property of the panorama
to false
panorama.setVisible(false);
When you want to programmatically show the panorama again later, set the visible
-property back to true
(this will be done automatically when the user drops the pegman back to the map)