Hotspots and Links.

To view this content please install Java.

ADG Java Viewer has parameter ADG, which can be used to configure hotspots and links to another webpages, panoramas and 3D models. This parameter is a long string, which represents a set of ADG script commands, delimited with semicolons. Each command is composition of tag, target name and property name, delimited with dot symbol. For instance, to add two links one can use the following HTML code:

<applet id='ADGview' code='ADGview.class' width=500 height=200>
  <param name=archive value="ADGview.jar">
  <param name=data    value="autumn.adg">
  <param name=ADG     value="; area= 25,0,25,20;; area=-25,0,25,20; 
One more sample:
Autumn Forest
Winter Forest
Summer Forest
Demo Products

To view this content please install Java.

<applet id='ADGview' code='ADGview.class' width=400 height=200>
  <param name=archive value="ADGview.jar">
  <param name=data    value="autumn.adg">
  <param name=ADG     value=" 
    port.Autumn: url=autumn.adg; info=Autumn Forest;
    port.Winter: url=winter.adg; info=Winter Forest;
    port.Summer: url=summer.adg; info=Summer Forest;
    port.Demo3D: url=shoes.adg;  info=Shoes;
   ;                area= 30,0,20,20;;                area=  5,0,20,20;; area=-25,0,25,20;
   ;                area=-20,0,20,20;;                area=  0,0,20,20;; area= 20,0,20,20;;                area=-20,0,20,20;;                area=  0,0,20,20;; area= 20,0,20,20;; object=shoes_body;; object=shoes_bod2; 

In this example, first selected line specify the port named Autumn. This port is attached to panoramic image autumn.adg and has info text "Autumn Forest" be shown in status bar. Similarly, the next three lines specify another three ports. Thus first four lines specify four ports: Autumn, Winter, Summer and Demo3D.

Next lines in parameter ADG specify a set of links for each port to another port or web page. Each link require map area. Attribute area has four parameters delimited with comma: horizontal and vertical offset, and horizontal and vertical size. Parameters are estimated in degrees. The attribute image specify the icon image. The attribute object allows to specify the 3D link.

Moreover, predefined ports can be switched using Javascript commands. Typical html code in such cases looks like:

  <a href="javascript:document.ADGview.adg('current.port=Autumn')">Autumn Forest</a>

Javascript function "adg" has single string parameter, which represent a set of adg commands, delimited with semicolons. In example above, ADG script command current.port=Autumn will switch current port to Autumn.

ADG Javascript Viewer allows to view flat panoramas without Java or QTVR plugins requirement. To insert hotspots you can use javascript function setLink(x,y,w,h,url,icon,alt). See html code and demo below:

  createPanorama(500,200,"autumn.jpg"); setVel (-0.1);
  setLink( 100,0,100,100,'','icon1.gif','text1'));

List of script functions:

function createPanorama(width,height,url) 

  width   - sets the width  of viewer window in pixels
  height  - sets the height of viewer window in pixels
  url     - sets the url of panoramic image

function setLink(x,y,w,h,url,icon,alt)

  x,y,w,h - link rectangle 
  url     - link url
  icon    - link iconic image
  alt     - link alternative text

function setVel(vx,vy,vz) - sets initial velocity
function setPos(px,py,pz) - sets initial position