UDMapMarkers moving when zooming out

Product: PowerShell Universal
Version: 3.8.6

Hello,

I’m trying to create a map that plots out points. I have it set up, but when I zoom out the markers move along with it and then they are off. If I zoom into one of the marks it is located exactly where it needs to be. Is there a way to stop the markers from moving as you zoom out? The URL is an icon I made to use in the map and the excel sheet is a spreadsheet of all the coordinates.

New-UDDashboard -Title ‘PowerShell Universal’ -Pages @(
New-UDPage -Name “Home” -Content{
New-UDMap -Endpoint{
New-UDMapRasterLayer -TileServer ‘https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png’
$LocationExcel=Import-Excel -Path “C:\Users\tywebb\Desktop\Powershell\ATS\ATS_Network_Monitor\OfficeLocationLatLong.xlsx”
$LocationExcel | Foreach{
New-UDMapMarker -Latitude $.Latitude -Longitude $.Longitude -Icon @{
url = ‘https://i.ibb.co/YQLY28C/Blue-Pin20px.png
}
}
} -Latitude 37.98740 -Longitude -95.51770 -Zoom 5 -Height ‘100vh’
}
)

Thank you.

Hmm…I’m using New-UDMapIcon in the -Icon parameter of New-UDMapMarker, and the -AnchorX and -AnchorY parameters are super important.

-icon (new-udmapicon -url “/img/location-dot-blue.png” -height 32 -width 24 -AnchorX 15 -AnchorY 31 )

1 Like

You the man. That worked for me, thank you. I tried putting in the X and Y anchors for the New-UDMapIcon but I was putting in the latitude and longitude coordinates. I appreciate your quick response.