Mouseover

Mouseover bubbles are meant to display information about the elements they are pointing to. This information includes text, attribute values, hyperlinks, images, etc. The JMap administrator determines what information is displayed in the bubbles of each layer.

The content of mouseover bubbles can be formatted using HTML tags. Mouseover bubbles can also contain JavaScript programs.

The Mouseover tab of the layer configuration interface provides the tools to configure it.

Providing mouseover content

You must provide the text that will be used as the content of the bubble. This text can be comprised of static parts (displayed as is), variable parts (replaced at display time by another value), simple JavaScript programs, and HTML tags. For instance, the elementValue(city) function will be replaced at display time by the value of the city attribute for the pointed element.

Mouseover syntax

The mouseover syntax is comprised of various functions that will determine the content of the bubbles. Functions and their parameters are generally not case sensitive. For instance, ev(city) is equal to Ev(CITY).

The following table explains the various available functions:

HTML content

The content of the bubble can be formatted using simple HTML tags. Mouseover bubbles do not support CSS or advanced tags such as <DIV>. The following HTML tags are supported and frequently used in mouseover:

<B>, <I>, <U>, <A>, <IMG>, <TABLE>, <BR>

You can insert hyperlinks in mouseover bubbles. These hyperlinks can be clicked, and they allow users to open HTML pages or to open or download files.

Examples

Locating map elements or coordinates using mouseover

Mouseover supports a function to locate map coordinates or elements using a special URL syntax. A hyperlink is displayed in the bubble, and when it is clicked, the map locates the specified element(s) or region. This function is only available in JMap Pro.

Using a URL to display content

You can specify a URL that opens an HTML page to display in the mouseover bubble (only supported in JMap Pro). The HTML page will occupy 100% of the bubble. The syntax is as follows:

$URL{http://awebsite.com}

The specified URL can be static or it can come from an attribute. It can also use attribute values as parameters, as shown below:

$URL{http://awebsite.com?param1=ev(ATTRIB_A)&param2=ev(ATTRIB_B)}

Dernière mise à jour

K2 Geospatial 2024