Modules/UniversalDashboard.Map/Scripts/layercontrol.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function New-UDMapLayerControl {
    param(
        [Parameter()]
        [string]$Id = (New-Guid).ToString(),
        [Parameter()]
        [ValidateSet("topright", "topleft", "bottomright", "bottomleft")]
        [string]$Position = "topright",
        [Parameter()]
        [ScriptBlock]$Content
    )

    @{
        type = 'map-layer-control'
        isPlugin = $true
        assetId = $AssetId
        id = $Id
        content = & $Content
        position = $Position
    }
}