This project is read-only.

Linking dotspatial and mapwindow components

May 4, 2013 at 12:00 PM
Hi ,

I'm building a GIS application using Dotspatial components. The appmanager that dotspatial provides is not as rich as the mapwindow application manager, so I'm wondering if it's possible to work with two different components.

For example , I have a Dotspatial map and a MapWindow ApplicationManager , after adding them to my form , can I do this : = this.map1;

Hope you can help me please.
May 6, 2013 at 2:48 PM
Luffy16 -

One of the goals of DotSpatial is to provide the full capabilities of our MapWindow programming library in a more modular and DotNet style. It has taken a few years to get DotSpatial to the point it is now, though it still doesn't have all the capabilities of MapWindow just yet.

One of the driving factors behind DotSpatial was to give users of the library the ability to support plugins. So historically I used to get lots of email from people asking, "Hey I built this standalone application using the MapWinGIS ActiveX control, and now I want to support MapWindow plugins in my application. How do I do it?" This was a hard question to answer because the support for plugins in MapWindow actually is baked into the MapWindow.exe application. It was not a separate component that people could add to their own applications.

So DotSpatial deals with this by giving you an actual "ApplicationManager" component that you can put on your forms and make your application support plugins. It's not completely easy to do, but at least it's possible now. So the bottom line is that if you are going to build a plugin for MapWindow4.exe, then you should just use the MapWindow 4 application manager that is exposed to MapWindow 4 plugins. You can still use any DotSpatial components you want, but be aware that the MapWindow4 Application Manager does not recognize DotSpatial objects.

Personally I would prefer to see you move your development along into DotSpatial so that you can get the benefits of the C# library, .NET-style architecture, and the growing community around this project. If there are particular things you want to do with a plugin that don't seem possible in the DotSpatial world, let me know. You mention that the MapWindow app manager is more "rich" than the DotSpatial app manager. Can you give more explanation about that?


(MapWindow and DotSpatial founder/project leader).
May 6, 2013 at 3:00 PM
Edited May 6, 2013 at 3:00 PM
Thanks dan for your answer and explanation.

Believe me , that's what I'm doing right now , I'm enjoying discovering the new Dotspatial environment and its capabilities. I started developing my application using Mapwindow but after that I moved to Dotspatial because it's more flexible and easy to understand and use.

However I posted this question because I faced this problem : SpatialMenuStrip and SpatialStatusStrip are obsolete , so I used a normal Windows forms menu strip and status strip. After that , I wanted to implement many method like showMargin,zoomIn,zoomOut,Refresh,selectAll,selectNone,removeLayer and many other methods.
I figured that it will be easy to use the same method that you used in Dotspatial source code (_layerControl.showmargin() or whatever) but in my case _layerControl do not recognise the menuStrip or the statusStrip so I can't link them together and that's the problem I'm facing.

So do you see now why did I post this question .

And I'm sorry if I did bother you , as you know Im new in GIS programming.



May 7, 2013 at 8:57 PM
Is there any help please