Friday 18 February 2011

Build a Desktop GIS Application Using MapWinGIS and vb.net - Part 1

This tutorial seeks to introduce beginners to the development of desktop applications using MapWinGIS and vb.net 
The MapWindow ActiveX controls setup file can be downloaded from the MapWindow download page . After installation of the ActiveX controls you should now add the controls to the visual studio toolbox, to add the map control to the the visual studio tool box you right click on you tool box and select the "Choose items" from the pop up menu strip, click on the COM components tab from the dialog box that appears. then select "map control from the list of COM components and add it. the map control now appears on your tool box and can be added to your forms as any other control.

The application can then be created by following these steps
1. Add the the map control to a form and name it appropriately (e.g mapMain)
2. Add five buttons to your form and name them as btnZoomIn, btnZoomOut, btnPan, btnZoomFullExtent and btnAdd, as shown below

3. You now have to add code to the click events of each Button and these are as follows

*for the add layer Button the code is as follows

*for the zoom to full extent the code is as follows


*for the zoom out the code is as follows
*for the zoom in  the code is as follows



The final application interface is as follows:




  

8 comments:

  1. for any questions or input feel free to leave a comment

    ReplyDelete
  2. thanks it works, are there any tutorial about mapwingis?

    ReplyDelete
  3. try this link
    http://www.mapwindow.org/downloads/documentation/UsingMapWinGIS.pdf

    ReplyDelete
  4. useful!
    Whenever you want add a few more examples :)
    cheers from Portugal

    ReplyDelete
  5. I would like to connect it to my mysql database (as a locator).. is it possible?
    kristiandiorlayno@hotmail.ph

    that would be a big help.. tnx a lot.

    ReplyDelete
  6. is it possible? I would like to connect it to my mysql database (as a locator)..
    do you have some link or tutorial how will i do it?
    rafnics_gil@yahoo.com

    ReplyDelete
  7. why may mapwingis cant load tru visual studio 2013

    ReplyDelete
  8. Hi!

    Its a Nice work you do . I ask if you can demonstrate and write some code in VB.NET Language showing how to SAVE shapefile(.shp) into SQL server Database,
    Thanks

    ReplyDelete