Zoom Control panel

The Zoom Control panel bean is represented by the IlvJAdvancedZoomControl class. This bean enables users to zoom in and zoom out on a map at a rate determined by the displacement of the pointer.
An example of the Zoom Control panel is shown in Zoom Control panel .
zoompanel.png
Zoom Control panel

Including the bean in an application

To include the Zoom Control panel in your application, write the following lines of code:
IlvJAdvancedZoomControl zoomer = new IlvJAdvancedZoomControl();
zoomer.setView(view);

Adding the bean to a Swing container

You can then add this bean to a Swing container:
panel.add(zoomer, BorderLayout.WEST);

Customizing the appearance and behavior

This bean can be presented in horizontal or vertical layout, using:
zoomer.setOrientation(SwingConstants.VERTICAL);
By default, this bean zooms in or out of the view at a maximum rate of 6% every 40ms. You can change these default values to better suit your needs using, for example:
zoomer.setMaxZoomingRatio(1.1);
zoomer.setZoomDelay(100);