Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Drawing a Map in VB.NET

Featured Replies

I know it can be done, but I've searched the web for the last couple of hours for resources on how to take GIS data and draw a simple map (that is lat/lon aware) using VB.NET without having to purchase some multi-hundred dollar product. Can't find anything good.Anyone have any resources?Thanks,

Dick,Thanks for your reply. What I'm trying to do is make a flight planner that will decode the bgl files and give the user an icon or whatever for a VOR/NDB/Airport on a map, just like all of the other flight planners do (FS Nav, FSFK, SFP, etc). I am trying to find resources on how to take raw GIS data and have VB understand it to be able to draw a map that is lat/lon aware so that, after the bgl's are decoded, I can then have VB draw them on the map in the right place.Thanks,

  • 3 months later...

This is an old thread but I thought I would follow up and see if you ever got anywhere with this?Drawing a map is something that sounds simple but turns out to be a bit complicated. What is it that you are having trouble with? Is it the actual drawing in VB.NET using GDI+, the decoding of your GIS data, everything in between?Where are you getting the raw GIS data from? The data files should come with a file format definition. I wrote a mapping tool awhile ago that used US Census data, it was quite a pain to process their data into the format I wanted (roads/rivers/etc. same data as Navteq but free from the gov't in raw form).Are you looking to just generate a flat map, or a 3D world view? Do you plan to use any kind of projection algorithm or just flatten it into lat/long. squares?What GIS data do you want to plot on your map? Just coastlines?As a start you can work on converting the units for the vertices in your GIS data from whatever units they are in to degrees/minutes/etc. Then of course you will need to scale that to the display, and you will probably want to let your user zoom in and out as well.

  • 4 months later...

I am working on an instructor station for my flight deck simulator and have come across the same situation.For now, I am attempting to use a program called BGLXML that decodes the BGL files into BGLComp compatable XML files. I am writing a program, albeit a bit complicated thus progress is slow, that turns the XML files into raw .txt files for use in loading my NAVData for my moving map.Draing the map is easy. Use a picturebox and search for tutorials in VB.NET using DirectX or OpenGL methods. I have come across a very handy VB6 tutorial found here:http://www.codearchive.com/rate.php?rid=1223&go=0212it introduces how to draw to a surface on a form (the picture box) and to format the code to render and update positions. It was a good start for me. I've been using OpenGL for C++ and it was a nice and easy transfer of methods. Plus, OpenGL renders quickly in a VB app, rather than DirectX which seems a bit slower.Once you have your map drawing initialized and data loaded, then you can start drawing your map. The center of the map is your Lat/Lon, so the edges of the map must be a certain distance away, say 5 miles up/down, 7 miles left/right. Using a scalar to convert miles to degrees lat and lon, you can figure out the max/min lats and lons to display, then loop through your data structures displaying each and every icon inside that box.Hope this helps someone.

Aaron

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.