B.3.2.1 Map-Level Functions

Map-level mouse event control functions can be defined for mouse-click events and mouse-move events.

A mouse-click event function is called whenever a click occurs anywhere in the SVG map, if both theme feature selection and window selection are disabled. The name of the function is defined by the onclick attribute in the map request (see map_request Attributes).

A mouse-move event function is called whenever the mouse moves anywhere in the SVG map. The name of the function is defined by the onmousemove attribute in the map request (see map_request Attributes).

These JavaScript functions must be defined in the web page that has the SVG map embedded. Mouse-click and mouse-move event functions must accept two parameters, x and y, which specify the coordinates inside the SVG viewer window where the mouse click or move occurred. The coordinate is defined in the local SVG viewer window coordinate system, which starts from (0,0) at the upper-left corner and ends at (width, height) at the lower-right corner.