Modules/UniversalDashboard.Map/Scripts/baselayer.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function New-UDMapBaseLayer {
    param(
        [Parameter()]
        [string]$Id = (New-Guid).ToString(),
        [Parameter(Mandatory)]
        [string]$Name,
        [Parameter(Mandatory)]
        [ScriptBlock]$Content,
        [Parameter()]
        [Switch]$Checked
    )

    @{
        type = "map-base-layer"
        isPlugin = $true
        assetId = $AssetId
        id = $Id
        name = $Name
        content = & $Content
        checked = $Checked.IsPresent
    }
}