ii_easel.js

This library must me included in the page or frameset which contains the core of the JavaScript for your application. It provides basic services which allow your JavaScript and the remaining libraries to access the Easel applet . It's most important function is to implement a start-up sequence which allows for reliable start up of Information Overlaid applications on all platforms.

ok = easel_init(version, applet_name, window)

This function sets up Information Overlaid and must be called as the application starts, usually at the top of the onLoad function of the main application window. Version should be the version of Information Overlaid which your systems requires, for example "2.3". Applet_name should be name given to the Easel applet in the applet tag. The third parameter window is optional and indicates that the applet is in another window.

This function returns immediately, but the applet may not yet be working on some platforms. When the applet is running and everything is initialised, the callback on_easel_start will be called. You should put all Information Overlaid related initialisation (for instance creation of hotspots) in this callback.

on_easel_start(applet)

This callback is called when Information Overlaid is loaded, initialised and working. It is the place for all of your startup code.

easel_set_page_loaded()

You should call this to indicate that your application is ready to go, for instance at the end of the on_easel_start callback. Various library functions will ask the user to wait if called before easel_set_page_loaded.

easel_load_image(url), easel_load_image(url, x, y, w, h)

Load a new background image into the applet. The last 4 parameters are the real-world coordinates represented by the image. If these are not given, screen coordinates will be used.

easel_brief_time = msec

Controls how long messages are displayed in the applet window.

easel_brief_message(mes1, mes2, mes3, mes4)

Displays a message in the applet window for a brief time. Each parameter is one line of text. If a line starts with @ it is centred.

easel_message(mes1, mes2, mes3, mes4)

Displays a message in the applet window until the user clicks to make it go away. Each parameter is one line of text. If a line starts with @ it is centred.

easel_data_copyright(copyright, URL)

Tell Easel the copyright text fro the data being displayed. If URL is given it is opened in a new window if the user clicks on the copyright message.

easel_remove_area()

Removes any rectangle dragged by the user.

rect = easel_get_area()

Determine the currently selected area. This is either the area selected by the user if they have dragged a rectangle or the world-coordinates of the image if that was set. The area is `returned' by setting the variables selected_x, selected_y, selected_w, selected_h. The returned value is null if no rectangle was dragged, otherwise it is a Java object which is probably not useful except to indicate that there was a dragged rectangle.