Is it possible to use DotNet to show a QGIS map?

I have investigated this and while it might be possible at some level by writing wrappers in C++ using them in .NET it is a hell of a lot of work because you also have to wrap the Qt framework at the same time. There might be hacks that you could use to get it to work but they will always be hacks.

My advice: Learn Qt C++ or/and PyQt Python. Qt makes life a lot easier in C++ and while you do still have to understand things like pointers and references it is really not that bad. Qt Creator is a great IDE which includes help for the full Qt framework; a UI designer; built-in quick templates; etc.

If you don't want to go down the C++ route, you can make some pretty impressive stuff with PyQt in Python. It's all just the Qt framework plus all of Pythons awesomeness.

As QGIS is written in Python and C++ you are going to get the most support on those areas if you get stuck.

I was a .NET before joining the QGIS project and while it was a little different at first C++ and Python don't take that long to pick up.


It is possible to create embed a map on any kind of Web Application, without any server-side technology.

There is a plugin called QGIS2Web which is a great way to publish GIS data and make it accessible to users.

Running example: https://storage.googleapis.com/qgis-tutorials/qgis2web/index.html

Full tutorial: http://www.qgistutorials.com/en/docs/web_mapping_with_qgis2web.html


There are two opensource possibilities if you want to embed a map with GIS capabilities using C# or VB.NET. One is MapWindow and the other is SharpMap. Here is a link:

MapWindow http://www.mapwindow.org/

SharpMap https://github.com/SharpMap

They are absolutely great libraries if the size of your data is limited. The map rendering is inversely proportional to the size, I mean literally. With my experience, I haven't gone ahead rendering a map which is above 10 MB.

MapWindow is much more stable with its Desktop libraries than SharpMap. On the other hand, SharpMap is a good choice for web map rendering using ASP.NET. Both are good with their respective capabilities provided the data size is limited.

MapWindow provides for building and embeding a map viewer with its MapWinGIS.ocx (An ActiveX component). this can be used to embed a map in a Windows Forms Application.

Tags:

.Net

Qgis