Listing 1 Defining image size constants 
# Width and height of detailed aerial photograph
#
use constant ZOOM_IN_WIDTH    => 1950;
use constant ZOOM_IN_HEIGHT   => 2380;

# Width and height of the overview aerial photograph
#
use constant ZOOM_OUT_WIDTH   =>  400;
use constant ZOOM_OUT_HEIGHT  =>  488;

# Calculate scaling factors
#
use constant RATIO_X          => ZOOM_IN_WIDTH / ZOOM_OUT_WIDTH;
use constant RATIO_Y          => ZOOM_IN_HEIGHT / ZOOM_OUT_HEIGHT;

# Width and height of the cropped image. (We're using the same size as
# the overview map to maintain the same look and feel for all pages in
# the site.)
#
use constant CROP_WIDTH       => ZOOM_OUT_WIDTH;
use constant CROP_HEIGHT      => ZOOM_OUT_HEIGHT;

# Half the width and height of the cropped image, used in translating
# the coordinates to the center of the cropped image
#
use constant HALF_WIDTH       => int( CROP_WIDTH / 2 );
use constant HALF_HEIGHT      => int( CROP_HEIGHT / 2 );

# UC Icon dimensions. We use a square icon so we need to define only
# its width, i.e it's "dimension"
#
use constant ICON_DIM         => 24;
use constant HALF_ICON        => int( ICON_DIM / 2 );
