Panorado Applet 2.2- Technical Reference
This documentation requires some basic knowledge of HTML and JavaScript. You may skip the technical part and look at the sample pages first. If you like, you can copy some of the sample code and insert it into your own project. |
![]() |
Recommendations |
Place a short advisory notice close to the applet explaining how to use the mouse for interactive control! For panoramic images, try these initial settings: For images with a small field of view, we recommend flat projection (which is
the default). Please notice that large images may need some time to be downloaded over the Internet, and require much more system memory than the file size might suggest.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The <applet> element and its attributes |
Within a document's HTML source code, the panorado applet is represented by a
These are the attributes of the
Remarks about the example: The If this file is not in the same folder as the refering HTML document, you have to
specify a relative or absolute path to it using a
The
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<param> elements |
The The panorado applet interprets these parameters, using a
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The applet's methods |
HTML pages can contain JavaScript code which refers to elements on this page. Thus, JavaScript can address an applet by its name and call the applet's methods. Example: <applet name="Viewer" ...>...</applet>Remarks about the example: The applet's name is "Viewer". These applet methods are provided for JavaScript calls:
Returns version, licensing and environment information.
Returns a 2-dimensional text array with parameter informations. This is only supported by Mozilla browsers and some HTML generators.
Opens the panorado.com website in a new window.
Loads a new source image.
Loads a new source image.
returns the user-friendly image description.
returns the image's projection mode: "fast", "flat", or "spherical".
Returns the source image's horizontal FOV (in degrees).
Returns the source image's vertical FOV (in degrees).
Returns the source image's width (in pixels).
Returns the source image's height (in pixels).
Returns the visible image's horizontal FOV (in degrees).
Returns the visible image's vertical FOV (in degrees).
Returns the visible image's width (in pixels).
Returns the visible image's height (in pixels).
Resets the image to the initial direction, speed, and scale values.
Resets the image. Unlike
Changes the viewing direction by the specified values (degrees).
Sets the viewing direction to the specified values (degrees).
Changes the current scale by multiplying it with the specified value.
Sets the scale to the specified value (1=100%).
Returns the current scale.
Sets the viewing direction degrees) and the scale to the specified values.
Returns the current horizontal viewing angle (0...360 degrees; left edge=0).
Returns the current vertical viewig angle (-90...+90 degrees; horizon=0).
Returns the current horizontal position of the mouse cursor (0...360 degrees; left edge=0).
Returns the current vertical position of the mouse cursor (-90...+90 degrees; horizon=0).
Sets the horizontal and vertical speed to the specified values.
Returns the current horizontal speed.
Returns the current vertical speed.
Enables or disables mouse and keyboard interaction (true=enabled, false=disabled)
Returns if mouse and keyboard interaction is currently enabled.
Sets the current mouse mode (true="grab", false="pan")
Returns the current mouse mode.
Shows or hides the compass scale (true="show", false="hide").
Returns if the compass scale is visible.
Deletes all existing track steps.
Creates a new track step.
Starts execution of the track list which has been previously set up from addTrack calls.
Defines if tracks are used, and if they are to be repeated. Options: "no", "once" oder "repeat".
Returns the way how tracks are to be used: "no", "once" oder "repeat".
Deletes all existing hotspots.
Creates a new hotspot.
Simulates clicking the specified index. i is a 0-based index.
Sets a custom hotspot image path, relative to the document path.
Shows or hides hotspots. (true="show", false="hide").
Returns if hotspots are visible.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Some test results |
The applet version presented here has been tested on various versions of Microsoft Internet Explorer, Netscape, Mozilla Firefox, and Opera, using Java v1.4 and v1.5 runtime environments. We found out that the Netscape, Firefox (< v1.5), and Opera browsers were not able to handle resizing the height of applets at runtime correctly. If you want to use this feature on the other browsers, you should make a programmatic distinction to set the window parameters. This is illustrated for the sample page below. The applet has some restrictions on Java runtime environments prior to v1.4 (which are getting rare). We recommend to inform visitors about the posiibility of a free Java update. Information about Java applet security are on the Sun Developer Network page on the Internet. Some popup blockers can prevent the applet from opening a hotspot link in a new window. You can avoid this only by disabling the popup blocker temporarily or permanently.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sample pages |
We like to present three sample HTML pages for illustrating how the applet can be integrated. Please start with opening the first page. Here the applet is right in the middle of a page, surrounded by text
elements. The applet is intended to show only one single image. As you will learn later, this
requires a simple Calling the second page from a link on the first page will require some
programming. When the link is clicked, it calls a JavaScript function with a parameter
indicating which image is to appear in that page's popup window. The second page receives the
image parameter, and a JavaScript function (again) passes the image filename to the page's
viewer applet. The third page demonstrates the use of hotspots. We suggest that you open the source code of these sample pages. You may copy the whole or parts of it and use it on your own pages. If you are familiar with HTML and/or JavaScript, you can examine the code - with the help of the following explanations.
Source code - first sample page:Please skip the There you'll find the There are many more parameters for the applet than those used here. The applet will use default values if parameters are not specified. There's a The next element is a If you click on the links at the bottom of the page, this will activate the second
sample page in a popup window. Since we want to determine the window's appearance in some
detail, we don't just use a This function's code is in the header section of the page. It computes some window parameters which depend on the screen size and the kind of browser used, and then opens a popup window showing the second sample page. Please note that a question mark and the name of the image file is appended to the page's URL. This is the usual way to pass parameters to a HTML document.
Source code - second sample page:This page basically contains a viewer applet and some buttons, much like on the first
sample page. But strange enough, the The image will be loaded as soon as the whole page is loaded. This is signaled by an That's all. Almost. We still like to notify you about the width and height attributes
of the
Source code - third sample page:The hotspots inside the image are intended to provide textual information. When a hotspot which is assigned a link is clicked, this link will be executed. The
The hotspots #01 through #06 contain a descriptive text only, hotspots #07 through #10 contain an additional link to a small image which is to be displayed in the same window, and hotspot #11 is a JavaScript command which will bring up a message box. Unlike on the other sample pages, the elements for switching hotspots on and off are
not implemented as image maps but as simple text links, calling a JavaScript function: This page also demonstrates the use of an event handler function:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mouse and keyboard interaction |
Clicking on the applet moves the input focus to it. This allows you to control the viewer... ...using the mouse:
...using the keyboard:
|