B.2 Display Control Functions

MapViewer provides functions to enable and disable the display of informational tips, the map legend, hidden themes, and the animated loading bar. The display control functions include the following:

  • switchInfoStatus() enables or disables the display of informational tips. (Each call to the function reverses the previous setting.)

    You can control the initial display of informational tips by using the <hidden_info> element in theme styling rule definition (see Themes: Styling Rules) and the infoon attribute in a map request (see map_request Attributes). The switchInfoStatus() function toggles (reverses) the current setting for the display of informational tips.

  • switchLegendStatus() enables or disables the display of the map legend. (Each call to the function reverses the previous setting.) The legend is initially hidden when the map is displayed.
  • showTheme(theme) sets the specified theme to be visible on the map, and hideTheme(theme) sets the specified theme to be invisible on the map.
  • showLoadingBar() displays the animated loading bar. The animated loading bar provides a visible indication that the loading of a new map is in progress. The bar is removed from the display when the loading is complete.