Creating Rollovers

How to:

The following section describes creating rollovers using the ESRI Configuration Utility. Rollovers are useful interactive features that can be used to display additional information about key points on a map.


Top of page

x
Procedure: How to Create Rollovers

To create rollovers:

  1. Create a Map FOCEXEC in the Focexecs tab.
  2. Add an outbound layer.

    For more information on creating outbound layers, see Configuring Outbound Layers.

  3. In the Outbound Layers tab, select Yes for the Rollover property.

  4. Click the Javascript tab and create a new Javascript function called SymbolMouseEvent.

    The following syntax provides a sample of the SymbolMouseEvent Javascript function:

    function SymbolMouseEvent(type,fexId,layerId,x,y,p, currentGraphicJSON,extentGraphicJSON)
          {
             var div = document.getElementById('rollOverTextDiv');
             var windowName = "_new" ;
             var esriObject = getWfEsriObject();
             var mapWindowName = esriObject.getFexById(fexId).getWindow();
             var reportWindowName = esriObject.getFexById("fex2").getWindow();
     // just some report to get windowname 
             if(fexId == "fex0")
                      windowName = reportWindowName;
      
             switch(type)
                     {
                     case  "close" :
                     case  "mouseOut" :
                     div.style.display = "none";
                     div.style.left = -100;
                     div.style.top = -100;
                     break;
             case "click" :
             case "rollOver" :
                     div.style.display = "inline";
                     div.style.left = x;
                     div.style.top = y;
                     var s = "";
      
                    if(fexId == "fex11" || fexId == "fex12" || fexId == "fex21" || fexId == "fex22")
                      {
                      s = s + p.IBI$TEXT;
                      }
          
                      div.innerHTML = s;
                      break;
              case "mouseMove" :
                      div.style.left = x;
                      div.style.top = y;
                      break;
              case "mouseOver"  :
                      break;
              default :
                     debugWindow(type + "," + fexId + "," + layerId);
                     break;
              }
      }

    IBI$TXT refers to the value that is returned from the outbound layer node in the FOCEXEC.

    Note: Rollovers can contain HTML text.

  5. Click the Settings tab located at the top of the ESRI Configuration Utility and then click the Miscellaneous tab.
  6. Enter the name of the Javascript function (for example, SymbolMouseEvent) in the Rollover callback field.

  7. Click Save.

WebFOCUS