Product: PowerShell Universal
Version: 3.4.3
I can’t find any examples of setting a custom marker on a UDMap. There’s an -Icon parameter, but if I set it the marker just doesn’t show up.
Product: PowerShell Universal
Version: 3.4.3
I can’t find any examples of setting a custom marker on a UDMap. There’s an -Icon parameter, but if I set it the marker just doesn’t show up.
This is a gap in the docs. Here’s an example.
New-UDDashboard -Content {
New-UDMap -Endpoint {
New-UDMapRasterLayer -TileServer 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
1..100 | ForEach-Object {
$Random = Get-Random -Minimum 0 -Maximum 100
$RandomLat = $Random + 400
New-UDMapMarker -Latitude "51.$RandomLat" -Longitude "-0.$Random" -Icon @{
url = 'https://ironmansoftware.com/img/ps-logo.png'
}
}
} -Latitude 51.505 -Longitude -0.09 -Zoom 13 -Height '100vh'
}
I’ve updated the docs to include some more info on markers: https://docs.powershelluniversal.com/userinterfaces/dashboards/components/data-visualization/map#markers