Default Templates
Default templates are used by the Local Knowledge service if a specific template for a layer is not defined. In total 5 default templates are defined:
- About My Property (AMP) and Find My Nearest (FMN) Summary Template
- FMN Full Template
- AMP and FMN Nothing Found Template
Note: Add these templates to the Templates table of the webMapLayersConfig.db.
Default AMP and FMN Summary Template
Example html:
<div>Found Stuff on {Name}<p></div>
Default FMN Summary Template
Example html:
<div class="FMNSummaryContainer"><i><b><div class="FMNOverlayName">{Name}</div></b></i> <div class="FMNItemContainer"><repeater {Items} > <div class="FMNItem"><a href="javascript:zoomToFMNItem({OverlayNo}, '{escape(Name)}')" >{Name}</a> </div></repeater></div><p></div>
Default AMP and FMN Nothing Found Template
The same Nothing Found Template can be used for the AMP and FMN templates.
Example html:
<div><i><b>There were no results found for<div class="FMNOverlayName">{Name} </div></b></i><div></br>
Setting the Default Templates for the Service
To set the templates, edits the tables in webMapLayersConfig.db:
- Add HTML code to the Templates table
- Note TemplateID
- Use the TemplateID to define the appropriate template in the ServiceTemplates table.
- Define appropriate templates using their TemplateID
Cadcorp SIS WebMap will then use the templates defined above if no specific layer templates are defined.
Defining Specific Layer Templates
Layer-specific templates are defined in a similar way to default templates.
The difference is instead of entering the TemplateID into the ServiceTemplates table, it is added to the Layer Templates table:
- Add HTML code to the Templates table.
- Note TemplateID
- Use the Template ID to define the appropriate template in the LayerTemplates table.
Ensure the string in the Name column EXACTLY MATCHES the name of the overlay in the LocalKnowledge.swd. If no ID is referenced, the service will use the default template in the ServiceTemplates table.