Product: PowerShell Universal
Version: 4.2.17
I am trying to use New-UDMapVectorLayer to draw a line on the map, but I can’t seem to see the proper way to mark the positions. Here is what I have so far (fake lat/long)
New-UDMapVectorLayer -Polyline -Positions @{
[PSCustomObject]@{Latitude = "37" ; Longitude = "-75" }
[PSCustomObject]@{Latitude = "38" ; Longitude = "-76" }
}
Nothing pops up on the map though I tried doing geojson as well with no luck
$geojson = @'
{
"type": "Feature",
"geometry": {
"type": "linestring",
"coordinates": [[37, -75], [38, -76]]
},
"properties": {
"name": "testline"
}
}
'@ | ConvertTo-Json
New-UDMapVectorLayer -GeoJSON $geojson
It did give me an error though
Error rendering component (map-vector-layer)
Error: Minified React error #152; visit https://reactjs.org/docs/error-decoder.html?invariant=152&args[]=Component for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
5070/r/<@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:647200
r@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1605586
Suspense
div
a@https://universal.domain.com/MapTest/3017.18f3b2b6b19901604032.bundle.js:2:274110
5070/r/<@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:647200
r@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1605586
Suspense
main
N@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:526166
5070/r/<@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:647200
t@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1384899
t@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1386882
div
Suspense
5070/r/<@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:647200
Suspense
u@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:63935
m@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:64452
g@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:64651
s@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:77880
r@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1440560
94931/i/l/<@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1441425
Dashboard@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:574174
t@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1384899
t@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1386882
div
qe@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1618624
Ye@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1619821
Xe@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1619319
nt@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1622594
t@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1381620
t@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1376204
d@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1352813
l@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1072648
r@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1440560
94931/i/l/<@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1441425
bt@https://universal.domain.com/MapTest/index.cbc262558ed56a118b3e.bundle.js:152:1624661