How to Configure a Pop-Up Template for a Layer

This section explains how to configure a template for the pop-up that appears when an object in a layer is clicked on the map. Note that this configuration is not used in layers that display maps.

Each pop-up template is registered in a Template node, where it can be defined in HTML. Certain properties of the objects in the layer can be added as variables in each template by entering the variable name of the property between double braces. For details, please contact the support team.

All templates are registered within the Templates group, and each template is configured in a Template node, as in the example below.

 

<Templates>

 

 <Template id="points_of_interest_template">

  <div id="unit_popup_template" class="toolTipPin">

    <div class="toolTipPinHeader">

      <span>{{AssetTypeName}}</span>

    </div>

    <div class="toolTipPinContainer">

        <span class="labelTitle">Name:</span>

        <span class="description">{{Name}}</span>

 

        <span class="labelTitle">Description:</span>

        <span class="description">{{Description}}</span>

 

        <span class="labelTitle">Address:</span>

        <span class="description">{{Address}}</span>

 

        <span class="labelTitle">District:</span>

        <span class="description">{{District}}</span>

 

        <span class="labelTitle">Phone Number:</span>

        <span class="description">{{Phone}}</span>

 

        <span class="labelTitle">Person Responsible for Location:</span>

        <span class="description">{{Responsible}}</span>

 

        <span class="labelTitle">Website:</span>

        <span class="description">{{WebSite}}</span>

 

        <span class="labelTitle">E-mail:</span>

        <span class="description">{{Email}}</span>

 

        <span class="labelTitle">Business Hours:</span>

        <span class="description">{{BusinessHours}}</span>

    </div>

  </div>

 </Template>

 

...

 

</Templates>

 

In the XML structure of the template, the following element can be configured:

Parameter

Required?

Description

Template

Yes

Used to define the template for the pop-up. Contains the id attribute, which will identify the template when including it in layers and cannot be the same as any other template ID. This node must be completed with the HTML text to be used for the template.