This is documentation of an archived release.
For documentation on the current version, please check Knowledge Base.

Sample : Set initial bounds

This example documents how you can set the initial bounds of the viewer.

What basically happens is we :

  • Disable the component loading its first view.
  • Wait until the component is started
  • We set the bounds we want to see..
  • Now we manually load a view (we disabled the first view)

Sample Setup

zoomToExtent() - zooms to the maximum extent.
zoomToBounds() - zooms to the startup bounds (happens after startup).
You need to upgrade your Flash Player.

Overview

We disable the first view. This (if we wouldn't intervene) means the flash component would show an empty view after startup. We do so specifying the SKIP_FIRST_VIEW FlashVars parameter.

We wait until the component is started and then execute the zoomToBounds function. We do so using the publicInterfaceLoaded function, that is called after the component is loaded. This function also loads the first view, which we disabled previously.

All these operations are executed as a “startup operation” which implies the following :

  • A server-side focus rectangle may be returned and will be copied to the client-side focus rectangle.
  • The client will automatically zoom to the client-side focus rectangle after execution.
 
Last modified:: 2019/03/25 11:36