Configuring HTML as Points

Most of the functionality in QlikMaps is accessible through simple selections from drop-down menus. See Points - Marker Type - HTML for more information.

If an older versions of QlikMaps is used or there is a need for more granular control over the map, more advanced techniques can be used.

Below are a number of examples of advanced expressions that can be used to customize 'HTML' maps.

HTML Marker

By default, QlikMaps creates a basic text HTML marker using the dimension. That HTML can be changed using an expression.

To configure different content for HTML markers:

  • Open the marker HTML expression box by clicking on the Fx.
  • Place a single quote on line 1
  • Place a single quote on line 3
  • On line 2, provide HTML code to produce the text or image to be used for the point.
  • Enclose all HTML code in two single quotes.
  • Click apply

For more information why two single quotes are necessary, please see the Qlik Sense Editor documentation.

Text on Map

HTML markers can be used to place text on the map.

The following code will put the word OfficeName on the map for every point.

'
''<b>OfficeName</b>''
'

 

The following code will put the value of the field OfficeName associated with the point on every point on the map.

'
''<b>''& OfficeName& ''</b>''
'

 

HTML Images on Map

Any HTML that can be displayed on a web page can be used as a point.

As an example, the following code embeds CSS in the expression to create a circle with a number in it that is based on a Sense expression.

'
''<div style=" position: relative;
			  border-radius: 50%;
			  padding: 8px;
			  transform: translateX(-30%) translateY(-30%);
              width: 36px;
              height: 36px;
              background: rgba(255,255,255,.6);
              border: 6px solid rgba(61,129,187,.75);
              color: #606364;
              text-align: center;
              font: bold 29px Arial, sans-serif;
              ">''&Count(DISTINCT County)&
''</div>''
'