question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

map export without window in console application

See original GitHub issue

Hello! My original application has an user interface, where I can load a background and draw polygons on top. The image export with

var stream = new Mapsui.Rendering.Skia.MapRenderer().RenderToBitmapStream(MyMapControl.Viewport, MyMapControl.Map.Layers, MyMapControl.Map.BackColor);

is working well.

Now I have the task to export the same image in a console application without user interface. I created Mapsui.Map MyMapControlMap = new Mapsui.Map(); (with two layers: 1at layer a png as background, 2nd layer polygons) Mapsui.Viewport MyMapControlViewport = new Mapsui.Viewport(); (with extent etc.) As soon as I try the export with the command:

var stream = new Mapsui.Rendering.Skia.MapRenderer().RenderToBitmapStream(MyMapControlViewport, MyMapControlMap.Layers, MyMapControlMap.BackColor);

it’s not working. It returns null, because probably the surface snapshot is not working. How can I create a stream of the map layers without a window?

I’m thankful for any advice! Thanksyou very much, Claudia

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
feclaudiacommented, Jun 13, 2022

I reloaded all nuget packages and now all dependencies are working. Problem solved! Thanks!

1reaction
charlennicommented, Jun 11, 2022

Ah, I didn’t get this. Sorry for the wrong hint.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows Desktop Export without Console Window : r/godot
Hello, I'm learning Godot, and I already fell in love, made a simple game but after exporting the .exe file it opens with...
Read more >
Show/Hide the console window of a C# console application
Just go to the application's Properties and change the Output type from Console Application to Windows Application.
Read more >
Command Line Jar Execution; Application Export
The application is called Feed_Reader.exe and when I run that, there's no output to the console. The sketch uses the following libraries and...
Read more >
ArcGIS - Export Dialog Options missing
Have you tried exporting them using the python window as a work around? You could export maps using arcpy. This website shows how...
Read more >
Export maps
With Network Topology Mapper, you can export maps as Visio, PNG, Network Atlas (SolarWinds Orion), PDF, or map (native NTM) files.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found