Welcome to GPSFileDepot!

Main Menu

Dynamically show/hide multiple IMG files on Garmin 796

Started by opie, January 08, 2013, 05:47:42 AM

Previous topic - Next topic



I am writing custom mapping tools for use with the Garmin Area 796 aviation GPS (the most recent hw/sw versions) and I have a unique requirement.

I have IMG files that define our survey lines, but depending on the day sometimes I want to see IMG 1 for an hour and then IMG 2 for a while (without being cluttered with IMG 1 anymore).

I know I could produce separate gmapsupp.img files for each use case and put them on different SD cards, but this doesn't scale to the 6 or so layers (IMG files) I want to produce and update daily before we leave the office.

The 796 has a Map Info page where you can select an 'map or mapset' by a given name (but it usually just says cGPSmapper version0100d - which I do a binary search and replace on to the name I want).

The problem is that if I load 6 IMG files into the SD:\map directory they all render ok, but only 1 of 6 show up as a show/hide option on the Map Info page. 

Has anyone run into this before?  Is there another way to load several IMG files without combining/joining them to be able hide/show them at will?



Are you using unique FID numbers for each map? If you just use the default number, they will be grouped together as you describe. I don't know anything about the aviation devices, but the new Garmin handheld models allow you to use any filename you want for a map as long as it is in the \Garmin folder and has a .img file extension.

If you use the "old" way of sending maps to these devices (select tiles from all the different maps in Mapsource and send them to the device in a single file), they will sometimes group everything together also. Try using separate names and separate FID's and see if it works.


Like Boyd my experience is limited to handhelds.  What map editor are you using?   What compiler?  All tiles with the same FID will show up on a handheld as a single selectable map.  Unfortunately, to be able to enable and disable individual tiles they will have to be compiled as separate maps with separate FIDs.  You should be able to have multiple (don't know the upper limit) of such individual tiles on the device, but all FIDs you want to show separately will need to also have separate map names (8 digit number) and file names. 

I'm only familiar with cgpsmapper and mkgmap compilers.



Hi all,

Thanks for the feedback.

Perhaps where I have been going wrong is that I am creating the maps from our internal data sources and generate a MP file by hand.  I've been compiling them with the latest version of cGPSmapper and taking the resulting IMG file and placing it on the SD card (in either 'garmin' or 'map'). 

After returning to the cGPSmapper documentation with Boyd's hint at looking at the FID I am trying to learn more about mapsets.

Can you have multiple mapsets installed (assume the newer general use handhelds)?
Can you enable one mapset at a time?

I can figure out how to compile a mapset, for just one of my [IMG] defining MP files at a time and uniquely set the FID and MapSet name - but that will be tomorrow's project.

I've tried following the steps suggested to use mapSetToolkit - but when I look at the resulting mapset-IMG file using GMapTool it doesn't appear to have set a FID at all, and the MapSet Name is missing as the Garmin 796 simply writes 'Card Map' in the Map Info Section.
see output from GMapTool 'details' below:

I also noticed that the Garmin will read the first .IMG file in the map directory (sort alphabetically) and display it, but not others.

This is all complicated stuff, but a challenge, thanks for your help guys

Below is the output from GMapTool - Details page for one of my MP Files -> IMG -> GMapTool to a MapSet (with a single IMG) - it doesn't appear to set the FID properly - am I doing something wrong?

Input file: C:/SGL-Kuwait/PilotMaps/MP_Includes/New Folder/Pads.img.
Reading file C:/SGL-Kuwait/PilotMaps/MP_Includes/New Folder/Pads.img.

File:      C:/SGL-Kuwait/PilotMaps/MP_Includes/New Folder/Pads.img, length 6144
Header:      08.01.2013 20:10:29, DSKIMG, XOR 00, V 0.00, Ms 1
Mapset:      Pads
fat:      400h - 600h - C00h, block 512
maps:      1, sub-files 3

Sub-file         fat     length
09999999 RGN    600h       491
09999999 TRE    800h       588
   map 98967f (9999999)
   date 08.00.2005 20:10:29
   priority 25, parameters 1 1 4 1
   levels [21,22], zoom [83,2]
   N: 30.091896, S: 28.792763, W: 46.577396, E: 48.273067
   cgpsmapper version0100d
09999999 LBL    A00h      1153
   CP 1252, map created with cgpsmapper

Map              length s-f  CP    prio  PID   FID  name
09999999 MPC      2232  3  1252   25   



If it has a folder named \Map then it probably supports multiple .img files - or at least this is the case on the Nuvi series. Garmin calls these "nMap devices".

Don't know where you are going wrong with MapSetToolking but it works for me when I build large maps. Do you have Basecamp or Mapsource on your computer? If you use MSTK properly, then your maps should appear as separate items on the dropdown menu. like this


I'm not familiar with MapSource or Basemap, but did download it earlier today.  I've just rerun the MSTK and they do in fact appear in Basecamp and are appropriate.  I am also downloading MapSource, but I understand it is deprecated now.


Yes, no need to use mapsource unless you are already comfortable with it. If the maps show separately in Basecamp then they *should* be listed individually on the GPS. However different devices each have their own "quirks" and I have no idea what these might be on an aviation device.


You don't have FID/PID numbers inside your img. You can add them only if you install your map for BaseCamp / Mapsource and then send this map to GPS using Mapsinstall (invoked by BaseCamp or manually) or by Mapsource. This way FID/PID settings created by MapSetToolKit will be added to img.

If you send a map with Mapsource/Mapinstall then you can get proper name in selection menu too.

Next problem you should solve is map ID. In a header of your sources you probably have commands like:


This ID should be different for each img you create. GPS ignores img with repeated ID.


Thanks guys,

I need to come up with as automated a solution as possible to generate daily updated maps for our pilots.  As it is, I have them run a DOS script, which later prompts for the SD card to be inserted, copies the files over and then repeats for X number of SD cards.  Asking the flight crews (who are not technically proficient necessarily) to also use Basecamp would be the thing that stops them from using this tool.

So if I understand right, the only way to set a FID and display name is with Basecamp or Map Source?  If yes, is there a way of scripting this step to load the files on the SD card?

Mapset Toolkit appears to allow for the setting of the FID (by way of creating the MP preview file and letting cGPSmapper compile it).  But when I look at the resulting IMG files the FID isn't set.

Today I will try and create my own preview MP files by hand and compile them using cGPSmapper.  I was reading the docs last night and believe I understand the task at hand

I have also been experimenting with the ID element, trying to make them unique.  The cGPSmapper docs talk about always setting it to 1 - which didn't strike me as right.

Thanks guys!


You have to invent your own values. FID number should be in range 1-65000, PID 1-63, map ID nearly anything you like. You simply have to select values that are different than in any other map you are using. Usually choosing at random works good enough ;)

If your map have no search index, than you can create final img using Gmaptool. Just add to your scripts command like:
> gmt -j  -f 800  -m "My map"  -o final.img   Pads.img

This example will create file "final.img" with FID=800, PID=1 and internal name "My map". gmt.exe is command line version of GMaptool and is included in installation.


Thanks so much PopeJ and Boyd.  I actually just finished doing a test exactly as you suggested and it worked... and then read your post :)

I can integrate this into my scripts now no problem and the Aera 796 works as expect (as an nMap device). 

On a side note, do you know if anyone has ever produce a test file of all POI / Polygon Type of all the possible types that INCLUDES the aviation types?  I see in the cGPSmapper folder type test for lots of marine stuff, some of which render on the Aera 796. 

If such a thing does not exist, I might endeavor to make one and post it here.

Thanks so much guys,



If you have an existing map, you could try this program and see if it will do what you want:


Thanks Boyd, that is not precisely what I'm looking to do, but it does open up lots of potential.  I'll be making a donation and getting a couple of those tools.

The Area 796 seems very selective about the TYPs it is prepared to render.  For example it does about 20 of the blocks on the marine test IMG file from cGPSmapper.  I will adapt his file to test out the various Aviation datatypes.  I'm not sure if I can extract the aviation database/IMG file from the unit itself to run backwards through the tool you suggested but I'll take a look.

I'm very happy to have found this website/resource.  I fly helicopter mostly and work on this project part time, mostly as a way to build tools to make my job easier.  My background is as a software eng but I don't get to do it much anymore.  I had been working in a bit of a black hole for the past year as I try and figure out how best to build a workflow bridge between two systems (Garmin Aera 696 and 796s and our internal geophysical processing software).



You can check objects in basemap, this is file gmapbmap.img. I think it include object types specific to aerial GPS.