Select to view content in your preferred language

Export Map as emf file

457
1
09-14-2023 11:25 AM
Labels (2)
sylvainc
Emerging Contributor

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
Emerging Contributor

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