Creating Rollovers

How to:

This section describes how to create 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
  1. Create a Map FOCEXEC in the Focexecs tab.
  2. Add an outbound layer.

    For more information on creating outbound layers, see the WebFOCUS Adapter for Geographic Information Systems: ESRI ArcGIS Server and ArcGIS Flex API documentation.

  3. Click the Focexecs tab located at the top of the ESRI Configuration Utility and then click the Outbound Layers tab.
  4. In the Outbound Layers tab, select Yes for the Rollover property, as shown in the following image.

  5. Click the Javascript tab and create a new JavaScript function (for example, SymbolMouseEvent).

    The following syntax provides a sample of the SymbolMouseEvent JavaScript function that you can use:

    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;
              }
      }

    In the syntax, IBI$TEXT refers to the value that is returned from the outbound layer node in the Map FOCEXEC, as shown in the following image.

    Note: Rollovers can also contain HTML text.

  6. Click the Settings tab located at the top of the ESRI Configuration Utility and then click the Miscellaneous tab.
  7. Enter the name of the JavaScript function that must be called (for example, SymbolMouseEvent) in the Rollover callback field, as shown in the following image.

  8. Click Save to save the changes that were made to the XML definition file.

WebFOCUS