diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/marker-image-settings-panel.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/marker-image-settings-panel.component.html index ff06899a8b..d889f96ee7 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/marker-image-settings-panel.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/marker-image-settings-panel.component.html @@ -46,7 +46,8 @@ [functionArgs]="['data', 'images', 'dsData']" [globalVariables]="functionScopeVariables" functionTitle="{{ 'widgets.maps.data-layer.marker.marker-image-function' | translate }}" - helpId="widget/lib/map/marker_image_fn"> + helpId="widget/lib/map/marker_image_fn" + [helpPopupStyle]="{width: '900px'}"> diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/shape-fill-image-settings-panel.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/shape-fill-image-settings-panel.component.html index 19c83d1270..660f43a75d 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/shape-fill-image-settings-panel.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/shape-fill-image-settings-panel.component.html @@ -58,7 +58,8 @@ [functionArgs]="['data', 'images', 'dsData']" [globalVariables]="functionScopeVariables" functionTitle="{{ 'widgets.maps.data-layer.shape.fill-image-function' | translate }}" - helpId="widget/lib/map/shape_fill_image_fn"> + helpId="widget/lib/map/shape_fill_image_fn" + [helpPopupStyle]="{width: '900px'}"> diff --git a/ui-ngx/src/assets/help/en_US/widget/lib/map/shape_fill_image_fn.md b/ui-ngx/src/assets/help/en_US/widget/lib/map/shape_fill_image_fn.md index b13d612c8e..c6ea2e1ae6 100644 --- a/ui-ngx/src/assets/help/en_US/widget/lib/map/shape_fill_image_fn.md +++ b/ui-ngx/src/assets/help/en_US/widget/lib/map/shape_fill_image_fn.md @@ -39,12 +39,33 @@ In case no data is returned, default fill image will be used. ```javascript -TODO: +const type = data.Type; +if (type === 'weather station') { + const result = { + url: images[0], + opacity: 0.8, + angle: 0 + }; + const windSpeed = data.windSpeed; + const windDirection = data.windDirection; + if (typeof windSpeed !== 'undefined' && typeof windDirection !== 'undefined') { + if (windSpeed < 5) { + result.url = images[0]; + } else if (windSpeed < 15) { + result.url = images[1]; + } else { + result.url = images[2]; + } + result.angle = windDirection; + } + return result; +} {:copy-code} ```