Azre-Maps: How do you upload an Indoor Maps using powershell?

Adam Porter 6 Reputation points Microsoft Employee
2020-09-22T22:07:02.18+00:00

Does anybody know how to upload an indoor map using powershell?

I would expect it to look something like this, but the documentation is a bit sparse:

$zippath = 'D:\SomeFolder\SomeBuildingDrawing.zip'
$uri = "https://us.atlas.microsoft.com/mapData/upload?api-version=1.0&dataFormat=zip&subscription-key={mysubscriptionkey}"
$body = <<something that points back to the zip file>>
$header = <<something belongs here>>
$response = Invoke-WebRequest -Method Post -Uri $uri -Body $body -Headers $header

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
736 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 34,611 Reputation points
    2020-09-25T17:12:27.847+00:00

    @Adam Porter
    Could you please try with the below approach and update if that works?

    Invoke-WebRequest -Uri $uri -Method Post -Infile $zippath -ContentType 'application/octet-stream'  
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.