Table of Contents

Viewing

These functions allow you to get info on the current view definition and do something with the view. The following can be used to install a listener on user-initiated view events :

General view-related functions are :

Panning

The following functions can be used to pan (factor is 1/4) :

Zoom

You can control the view's zoom level by using the getScaleRangePosition() and setScaleRangePosition() functions. (the scale indicator ranges between 0 (zoomed in) and 1 (zoomed out)). Minimum and maximum scales are defined in the FlashMap map configuration file.

You can also zoom to :

Be aware that these functions won't exceed the scale limits.

All of these functions (except the zoomToFocus() and zoomToBoundingBox() which are explicit) are subject to a zoom margin parameter. This parameter, defined in system units, defines an extra margin when zooming to something. It is 0 by default and can be set or retrieved by using the setZoomToMargin() and getZoomToMargin() functions.

Zoom History

You can access OFM's zoom history or navigate between them by using these functions :

Taking over First View

The first view is often the most important one. By default, OFM zooms to a full overview of the available map data, but there are other options :

See here for an example of telling OFM to skip the first view and then setting it yourself.

Extra