Difference between revisions of "SvgMap"
| Line 1: | Line 1: | ||
[[Category:FastNet Controls]] | [[Category:FastNet Controls]] | ||
| − | == | + | == Dynamic Style & Tooltip == |
| + | This functionality allows to customize style and tooltip for each item on map. It is defined by two string expressions: | ||
| + | *Conditional Item Style | ||
| + | *Conditional Item Tooltip | ||
| + | |||
[[File:svgmap options.png]] | [[File:svgmap options.png]] | ||
| + | |||
| + | String expressions are evaluated for each item on map. Each expression is using Conditional Item Table Name during evaluation as base table. If Conditional Item Table is child table than all expressions will be evaluated for each child. Results will be applied to item when any child item returns not null value. | ||
| + | |||
| + | Result of conditional style is appended to item definition as class name: | ||
| + | <pre> | ||
| + | if(pmAsset.TempCode="SUBLOCATION”, "fill: #0000ff !important; fill-opacity: 0.2;") Attrib(name="style") | ||
| + | </pre> | ||
| + | |||
| + | Sample Conditional Item Tooltip definition: | ||
| + | <pre> | ||
| + | pmAsset.Code + " - " + pmAsset.TempCode | ||
| + | </pre> | ||
| + | |||
| + | Warning! Attrib is assigned for whole expression, not for particular expression part. It means that if expression is appended with Attrib(name=”style”) then each part of expression should return inline style (not class). | ||
=== Auto Refresh Delay === | === Auto Refresh Delay === | ||
Revision as of 15:37, 26 July 2016
Dynamic Style & Tooltip
This functionality allows to customize style and tooltip for each item on map. It is defined by two string expressions:
- Conditional Item Style
- Conditional Item Tooltip
String expressions are evaluated for each item on map. Each expression is using Conditional Item Table Name during evaluation as base table. If Conditional Item Table is child table than all expressions will be evaluated for each child. Results will be applied to item when any child item returns not null value.
Result of conditional style is appended to item definition as class name:
if(pmAsset.TempCode="SUBLOCATION”, "fill: #0000ff !important; fill-opacity: 0.2;") Attrib(name="style")
Sample Conditional Item Tooltip definition:
pmAsset.Code + " - " + pmAsset.TempCode
Warning! Attrib is assigned for whole expression, not for particular expression part. It means that if expression is appended with Attrib(name=”style”) then each part of expression should return inline style (not class).
Auto Refresh Delay
Periodically refresh map by given number of seconds. Auto Refresh is disabled when value is empty or less than 1. Auto refresh is active only in enquire mode.
Warning! Whole map is not reloaded (for performance reasons), automatically recalculated are only conditional styles of map items.
