You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2011-07-18 15:42:09

silver mapper
Member
Registered: 2008-06-26
Posts: 58

There is something wrong with an element in my .typ file

I use a .typ file of my own creation to override the default line styles in OSM data loaded on My Legend HCx.  Everything displays correctly apart from this element:
[_line]
Garmin definition: Political boundary
Mkgmap definition: Administrative boundary/admin level less than 9 and less than 7
My definition: British National Grid 1 kilometre
Colour: blue
Type=0x1c
XPM="32 1 2 1"
".    c #00ccff"
"X    c none"
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
[end]

Daytime and nighttime colours should be the same - blue.  The daytime colour displays correctly, but the nighttime colour displays as white instead of blue.  Can anyone suggest why?

Offline

#2 2011-07-19 07:55:13

csdf
Member
From: UK, living in Abu Dhabi
Registered: 2009-08-11
Posts: 313
Website

Re: There is something wrong with an element in my .typ file

Try this:
[_line]
Type=0x1c
UseOrientation=N
Xpm="32 1 2  1"
"! c #00CCFF"
"  c none"
"! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! "
;12345678901234567890123456789012
ExtendedLabels=N
[end]
Suggest that you use Typviewer for easier TYP file editing.

Offline

#3 2011-07-19 08:51:45

silver mapper
Member
Registered: 2008-06-26
Posts: 58

Re: There is something wrong with an element in my .typ file

Charlie,

My thanks for your prompt response.  I copied and pasted your suggested section into my .txt file in place of what was there, made a new .typ file and opened it in the Garmin TYP Editor at http://ati.land.cz/gps/typdecomp/editor.cgi.  It still shows the nighttime colour as white.  I haven't uploaded data to my GPSr yet to confirm that, but in previous uploads, what the editor shows is replicated in it.  Decompiling the .typ file shows the second line as white.

For the record, I have overcome the issue by entering two additional lines to represent nighttime:
[_line]
Garmin definition: Political boundary
Mkgmap definition: Administrative boundary/admin level less than 9 and less than 7
My definition: British National Grid 1 kilometre
Colour: blue
Type=0x1c
XPM="32 1 4 1"
".    c #00ccff"
"X    c none"
"3    c #00ccff"
"4    c none"
".X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X"
[end]

Last edited by silver mapper (2011-07-19 19:33:33)

Offline

#4 2011-07-19 19:35:56

wilpin
Member
Registered: 2009-11-22
Posts: 79
Website

Re: There is something wrong with an element in my .typ file

You need to be aware of  two types of polylines,those with bmp and those without.

Judging from your example, you seem to be dealing with bmp polylines:

XPM="32 1 2 1"
".    c #00ccff"
"X    c none"

This only allows for 2 day colours; it does what it says on the tin.

try

XPM="32 1 4 1"
"0   c #00ccff"
"1    c none"
"2    c #00ccff"
"3    c none"
"01010101010101010101010101010101"

Or alternatively turn it into a type 7 non-bmp polyline:
lineWidth=1
XPM="0 0 2 0"
"0   c #00ccff"
"1   c #00ccff"

for more info see my typformat manual http://www.pinns.co.uk/osm/typformat.html

Last edited by wilpin (2011-07-19 21:16:32)

Offline

Board footer

Powered by FluxBB