The highlight interactor allows you to
highlight graphic objects when moving the mouse over them. Using
Hitmap technology, the highlighting effect can be constructed and
displayed on the client side without a round-trip to the server.
JViews provides a JavaServerâ„¢ Faces (JSF)
component for this interactor. To use the highlight interactor you
must first insert the highlight interactor tag into your JSF page.
To define one object, use the following tag:
<jvf:highlightInteractor id="highlightInteractor"/>
You can use the interactor in a
<jvf:view>
view as follows:
<jvf:view id="viewID" interactorId="highlightInteractor" />
You can use the interactor in a
<jvmf:mapView>
view as follows:
<jvmf:mapView id="mapId" interactorId="highlightInteractor" />
The highlight effects are visible when you
move your mouse over the graphic objects.
The highlight interactor works with both a
<jvf:view>
and a
<jvmf:mapView>
.
![Weather
map of west Africa with the Ghana weather icon highlighted in yellow.](../usrwebmaps/_media/jsfhighlightmap_default.jpg)
Example map with highlighting displayed.
The method described in the previous section shows you how to use
the highlight interactor with a
<jvf:view>
and a
<jvmf:mapView>
. However, you might want to have both the pan interactor and the
highlight interactor working at the same time. The interactor group
is designed for this purpose.
You can make several interactors work
together as follows:
<jvf:panInteractor id="panInteractor" /> <jvdf:selectInteractor id="selectInteractor" /> <jvf:highlightInteractor id="highlight" color="yellow"/> <jv:interactorGroup id="selectHighlight" interactors="selectInteractor panInteractor highlight"/> <jvmf:mapView id="mapID" interactorId="selectHighlight" hitmapLayers="Symbols" ... />
The attribute
hitmapLayers
is used to select which layer will generate the hitmap data from
the hitmap request. This attribute is only available in JViews Maps.
For more detail, see <installdir> /jviews-maps810/samples/jsf-maps-tiled/index.html.