Browse Source

Merge pull request #13202 from vvlladd28/improvement/shape-fill-image/use-attributte

Add example in shape fill image how to use attribute
pull/13203/head
Andrew Shvayka 1 year ago
committed by GitHub
parent
commit
2baca1dd9d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 22
      ui-ngx/src/assets/help/en_US/widget/lib/map/shape_fill_image_fn.md

22
ui-ngx/src/assets/help/en_US/widget/lib/map/shape_fill_image_fn.md

@ -42,7 +42,8 @@ In case no data is returned, default fill image will be used.
<ul>
<li>
Calculate image URL and rotation angle depending on <code>windSpeed</code> and <code>windDirection</code> telemetry values for a <code>weather station</code> device type.<br/>
Let's assume 3 images are defined in the Shape fill images section. Each image corresponds to a particular wind speed level: low (e.g., <5 m/s), medium (e.g., 5-15 m/s), and high (e.g., >15 m/s).
Let's assume 3 images are defined in the Shape fill images section. Each image corresponds to a particular wind speed level: low (e.g., <5 m/s), medium (e.g., 5-15 m/s), and high (e.g., >15 m/s).<br/>
Ensure that the <code>Type</code>, <code>windSpeed</code> and <code>windDirection</code> keys are included in the <b>additional data keys</b> configuration.
</li>
</ul>
@ -71,5 +72,24 @@ if (type === 'weather station') {
{:copy-code}
```
<ul>
<li>
Returns the image URL in the <code>image</code> attribute for a <code>weather station</code> device type.<br/>
Ensure that the <code>Type</code> and <code>image</code> keys are included in <b>additional data keys</b> configuration.
</li>
</ul>
```javascript
const type = data.Type;
const image = data.image;
if (type === 'weather station' && image !== undefined) {
return {
url: image,
opacity: 0.8
};
}
{:copy-code}
```
<br>
<br>

Loading…
Cancel
Save