Customising the ArcIMS HTML Viewer
Resizing the Browser Window with the Current Map
by Andrew Eddie

Summary

The out-of-the-box html viewer allows for the adjustment of the map size when the browser window is resized. However, the map is refreshde to the start state of the viewer, thus loosing any pain-staking effort you have put in to get just where you wanted to on the map.

Tested System

Installation and Configuration

The accompanying viewer.htm contains the appropriate changes to the reloadApp() function.

First, BACKUP your current configuration so that you can roll back if something stuffs up.

Then, either replace your existing viewer.htm with the new one or just replace the reloadApp() function. A diff-and-merge utility is useful to facilitate the second option.

Reload the viewer in your browser to check that there are no errors. The viewer should load normally. Zoom in or change the map in some way. Resize the browser window. The map will stretch out while the application is waiting for the server to return the new image.

Extra Tip

The viewer.htm also contains some optimisations of the output of the frameset. System output (that is, printing stuff to the screen) is one of the most processor intensive operations that the operating system does. Therefore, limiting the number of time you call output functions can help speed the application up a little. You will notice that the frameset code is first loaded into a string (a buffer) and then a single call to the output function is made. Assemblnig the whole string, or buffer, in memory is much more efficient than outputting little bits of it at a time.

Contact or Help

It you would like to make a comment or need extra help please use the facilities at http://sourceforge.net.projects/xarcims.



Created: 12 November 2001
Revised: 29 Octobet 2002