This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-UDMap -Endpoint { | |
New-UDMapLayerControl -Id 'layercontrol' -Content { | |
New-UDMapBaseLayer -Name "Mapnik" -Content { | |
New-UDMapRasterLayer -TileServer 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' | |
} -Checked | |
New-UDMapOverlay -Name "Day 1" -Content { | |
New-UDMapVectorLayer -Polyline -Positions $Cache:Day1 -Color Red | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Xml]$Gpx = Get-Content (Join-Path $PSScriptRoot 'day3.gpx') | |
$Cache:Day3 = $Gpx.gpx.trk.trkseg.trkpt | ForEach-Object { | |
,@($_.lat , $_.lon) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<gpx creator="StravaGPX" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd" version="1.1" xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3"> | |
<metadata> | |
<time>2019-09-17T05:00:51Z</time> | |
</metadata> | |
<trk> | |
<name>Morning Run</name> | |
<type>9</type> | |
<trkseg> | |
<trkpt lat="12.9662620" lon="77.6015510"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Pages = @() | |
$Pages += New-UDPage -Name 'Test' -Endpoint { | |
New-UDInput -Title "What should we do today?" -Endpoint { | |
param($WhatShouldWeDo) | |
# This could load any page (doesn't have to be UD) | |
Invoke-UDRedirect -Url "/todo/$WhatShouldWeDo" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Dashboard = New-UDDashboard -Title "PowerShell Conference Asia 2019" -Content { | |
New-UDMap -Id 'map' -Endpoint { | |
New-UDMapLayerControl -Id 'layercontrol' -Content { | |
New-UDMapBaseLayer -Name "Bing" -Content { | |
New-UDMapRasterLayer -Bing -ApiKey '11111111' -Type Road | |
} -Checked | |
New-UDMapOverlay -Name "Cluster" -Content { | |
New-UDMapMarkerClusterLayer -Id 'cluster-layer' -Markers @( | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$item = Invoke-RestMethod "https://geocoder.cit.api.here.com/6.2/geocode.json?searchtext=Hailey, Idaho&app_id=1111111&app_code=222222222&gen=8" | |
$position = $item.response.view.result.location.displayposition |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param($Staging) | |
Copy-Item ./ud-chatroom.psd1 $Staging | |
Copy-Item ./ud-chatroom.psm1 $Staging | |
Copy-Item ./dashboard.ps1 $Staging | |
Save-Module -Name UniversalDashboard -Path $Staging -AcceptLicense -RequiredVersion 2.6 | |
Copy-Item -Path "$Staging/UniversalDashboard/2.6.0/*" -Destination $Staging -Container -Recurse | |
Remove-Item -Path "$Staging/UniversalDashboard" -Force -Recurse | |
Save-Module -Name UniversalDashboard.CodeEditor -Path $Staging -RequiredVersion 1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger: | |
- master | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- script: pwsh -File './deploy.ps1' -Staging $(Build.ArtifactStagingDirectory) | |
displayName: 'Copy and Download UDs' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$EndpointInit = New-UDEndpointInitialization | |
$Path = Split-Path (Get-Module UniversalDashboard).Path -Parent | |
$EndpointInit.ImportPSModulesFromPath($Path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module "$PSScriptRoot/UniversalDashboard.psd1" | |
Import-Module "$PSScriptRoot/UniversalDashboard.CodeEditor/1.0.0/UniversalDashboard.CodeEditor.psd1" | |
Import-Module "$PSScriptRoot/ud-chatroom.psd1" | |
Start-UDChatroom -Wait |