Export Map as emf file

321
1
09-14-2023 11:25 AM
Labels (2)
sylvainc
New Contributor II

Hello, 

 

I just started to use the .Net SDK and I am looking for exporting my map/viewport into a vector image as I used to do in the ArcGIS software. There is no tutorial on that topic in the documentation. Is there a good example somewhere else?

 

Thank you 


Sylvain

Tags (1)
0 Kudos
1 Reply
sylvainc
New Contributor II

I have written the following code but the resolution is not good enough. I don't see how I can indicate these settings:

await WaitForRenderCompleteAsync(MyMapView);

// Export the image from the map view.
RuntimeImage image = await MyMapView.ExportImageAsync();

Stream fileStream = await image.GetEncodedBufferAsync();
string path = Path.Combine("C:\\Users\\xxx\\Documents", "testesri.emf");

using (FileStream outputFileStream = new FileStream(path, FileMode.CreateNew))
{
await fileStream.CopyToAsync(outputFileStream);
}

 

Any ideas?

0 Kudos