Mouseover

This section allows you to define mouseover settings for the layer, such as the contents to be displayed, the color of the mouseover bubble, etc.

The mouseover configuration interface is as follows:

Creating Mouseover Content

You must provide the text that will be used as mouseover content. This text can include static parts (displayed as is), variable parts (functions replaced by other values when the map is displayed), simple javascript programs as well as HTML tags. For example, the element value(city) function, or ev(city) in its abbreviated form, will be replaced by the value of the city attribute of the pointed element, when displayed.

The mouseover text can span multiple lines. Simply write the text over more than one line and the mouseover bubble will use the same formatting.

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 tags

The contents 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 bubbles:

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

You can insert hyperlinks in 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.

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