====== Example : Prevent the default startup location ======
This example assumes you have successfully [[example_embed|embedded the component]] and [[example_checklicense|validated the license]].
When implementing an integration it may be useful to prevent the default startup location from being loaded. You may want to restore a previous location. This can be done quite easily using a setting.
Steps to take :
- Configure the client
- Load a publication
- Open your own startup location
===== Configure the client =====
viewer.setSetting("ApplyStartupParametersOnLoad","false");
===== Load a publication. =====
To load a publication, we must first configure which server to use, which credentials to use and load a publication using the ''setServer()'', ''setCredentials()'' and ''loadPublication()'' methods.
If you don't specify credentials, the system will ask for them.
viewer.setServer("http://developer.orbitgt.com/service");
viewer.setCredentials("dev","dev");
viewer.loadPublication("Sint-Niklaas_31370");
===== Open your own startup location =====
viewer.addEventListener(orbit.webclient.LoadPublicationEvent.SUCCESS,
function(e)
{
viewer.getPanorama().openViewerAtXY(133860,206211,"31370",{pan:180,tilt:20});
});
More on photo loading settings here : [[example_loadphoto]].
===== Result =====