Until Spectrum Spatial Analyst 5.0 users did not have any control on how the data is displayed
in Info Call out. All they could do was either to show all data or a summarized version
for certain common fields. With Spectrum Spatial Analyst 6.0, we are introducing Custom
Templates for Info Callouts. With this, Spectrum Spatial Analyst Admin will be able to
create custom HTML Templates (in a prescribed format) that they can map with a specific
table though a configuration file. It is not mandatory to have a custom template; and if
not specified; Table info will be shown in a default all Data format.
- HTML Template Structure. All these templates need to be pasted manually into the
customerconfigurations\analyst\theme\infotemplates
folder.
- Simple Template: All templates need to follow an Angular Template format; but the
admin need not know it for simpler solution. Let’s assume we have a
table that has multiple fields. Now as an admin I just want to show two
fields out of all- Title and Description in List format. Then we will be
using a template like the one shown below:
The text marked Blue is the field name. The portion marked
RED is the prescribed format. Rest is plain HTML on which you can
apply any inline style. Basically we can get Column Name by using a
format like {{feature.<Column>.name}} and Column value by using a
format {{feature. <Column>.value}}
-
Complex Template- Another example is the one shown below where we
are using Angular directive like ng-if. This actually ensures that the
Field is listed only if it has a value. Also you can see the CSS that
has been applied onto the template.
Note: The class="customCalloutData" is a
marker css class and is used for exporting the call
out information in the printed document.
- CalloutInfoTemplateDefinitions.xml: A sample XML is shown below:
This XML
defines three type of mapping with following order of precedence.
- Map Config-> Table -> Template.
- Table->Template
- Default Template (Not to be modified)
Therefore a user accessing Default Map Config will see a
different Template for OpenSpaces Table then a user in other map config. All
other Tables will be rendered using the default
AllOthersCalloutTemplate.html. Admin can modify all the mapping but that of
Default Template (marked RED)
Note: Spectrum Spatial Analyst 6.0 will
not honor Summary Setting, though matching fields will be shown in the
format specified in summary. That means, all data will be shown even if the
Map configuration has Summary On. But in case there are any matching fields,
they will be formatted in the way specified in the summary set tings. For
example; if there is a field which is configured to be an Image in summary
settings; it will be shown as an Image.