logo separator

[mkgmap-dev] Can you set background colour in a TYP file?

From Adrian ar2988-os at yahoo.co.uk on Sat Jan 30 21:00:59 GMT 2010

I believe I have a solution for this.

The default background colour of a Garmin map is yellow. You would
expect to be able to change this by setting the colour of polygon type
0x4b, using a .TYP file. But some Garmin devices refuse to change the
background colour.

I have done some tests with an etrex Legend HCx, and in addtion to type
0x4b, you cannot change the colour of 0x27, 0x31, 0x52 and 0x010100.
(All of these, except 0x52, can be changed in RoadTrip.) But you _can_
change the colour of type 0x010100 on the etrex if you specify it with a
bitmap! You can have all pixels the same colour in the bitmap, and you
can have different colours for day and night. This is the solution used
by the creator of openmtbmap, although he did not explain it. [You
always have to list two colours for the bitmap. The openmtbmap bitmaps
contain one pixel of the second colour. Perhaps his .TYP compiler
insisted that both colours must be used.] This trick does not work with
polygon type 0x4b.

If you are using --generate-sea=no-mp [as in openmtbmap], you can use
type 0x010100 for your land polygons and the problem is solved. I have
just learned from "[mkgmap-dev] Commit: r1524: Let the background
polygon (type 0x4b) cover the whole map area" that mkgmap draws
background polygons of type 0x4b automatically. So we are very close to
a solution for those who are not using --generate-sea or who are using
--generate-sea=multipolygon.

Therefore I have a suggestion - to have an option in mkgmap, either on
the command line or as a style rule, for the user to choose the type of
the background polygons.



      



More information about the mkgmap-dev mailing list