// Override behavior of home button
viewer.homeButton.viewModel.command.beforeExecute.addEventListener(function(commandInfo) {
// Fly to custom position
viewer.camera.flyToBoundingSphere(boundingSphere);
// Tell the home button not to do anything
commandInfo.cancel = true;
});
// Set custom initial position
viewer.camera.flyToBoundingSphere(boundingSphere, {duration: 0});