Customization

From TrekBuddy Wiki

Jump to: navigation, search

Contents

Icons

You can use custom icons for waypoint (wpt.png) and POIs marks (pois.png), course (arrows.png) and navigation (naviws.png) arrows and/or crosshairs (crosshairs.png) if you put corresponding file to DataDir/resources folder. You should keep image(s) proportions. To access the original images, open trekbuddy.jar with a ZIP program and extract the subfolder resources. Users contribute icons usually in the themes forum in threds, e.g. this post.

The image format for the different custom icons should be as follows:

  • arrows.png and naviws.png Rectangular file, at best odd height and ten times that in width, for example 600x60/800x80/900x90 pixel, which provides space for 10 arrows with directing from 0° to 90° (10° step).
  • crosshairs.png Rectangular file, at best odd height and triple that in width (which gives you space for 3 icons), for example 240x80/450x150 pixel, which provides space for 3 different crosshairs ("plain", light white, grey).
  • pois.png Rectangular file, at best odd height and triple that in width (which gives you space for 3 icons), size 45x15 pixel, which provides space for three different icons. Those three icons are used for wpts yet-to-be-reached, passed wpts and missed wpts.

Pois.png (customized sample!!! original icons are small circles)

  • wpt.png Square file, at best odd edge length like 15x15 pixel

Wpt.png

  • symbols.png Rectangular icons shown when backlight and keylock is turned on. Default built-in icon set is 48x24 pixel. Drawn on semitransparent background since 1.0.17.

Symbols.png

  • zooms.png Rectangular zoom +- icons shown on map screen on touchscreen phones. Default built-in icon set is 80x40 pixel.

Zooms.png

  • guides.png since 1.0.17 Rectangular icons for menu bar shown on map screen on touchscreen phones. Default built-in icon set is 280x40 pixel.

Guides.png

Sounds, Fonts etc

To customize the sound played when reaching a waypoint, choose any *.wav, *.amr or the like, and put it into the sounds sub-folder of your cell phone trekbuddy's area. The filename is wpt.amr(wpt.wav respectively).

Since 0.9.82, "waypoint-reached" sound can be of amr, wav or mp3 format, provided your device supports it.

Since 0.9.98, it can also be mp3, m4a, aac.

Keymap

On some devices with unusual keyboard (like M600i, Blackberry 8800, etc), user has to use ALT/SHIFT/whatever to perform some action in TB. By placing keymap.txt file in resources, users can remap unknown key(codes) to those that represent numeric keys on usual devices.

To find out keycodes for the keys, one can use midlet from http://frogparrot.net/java/games.html (look for Display Key Codes). Values for keys on "standard" keyboard (KEY_xxx) can be found here: http://java.sun.com/javame/reference/apis/jsr037/javax/microedition/lcdui/Canvas.html

Midlet link dead (14.08.2015). Uploaded to TB forum: http://www.trekbuddy.net/forum/download.php?id=5723


Example keymap.txt for M600i

-3=42 
-4=35 
32=48 
101=49 
114=49 
117=51 
105=51 
120=55 
99=55 
110=57 
109=57

In the example above, 101=49 remaps keycode that represents 'e' to the value of '1' key.


Example keymap.txt for SE P1i

101=49
114=49
116=50
122=50
117=51
105=51
100=52
102=52
103=53
104=53
106=54
107=54
120=55
99=55
118=56
98=56
110=57
109=57
-3=42
32=48
-4=35

Example above in this order: 1,2,3,4,5,6,7,8,9,*,0,#

Example keymap.txt for SE P1i Russian keyboard (by vsalex)

1091=49
1082=49
1077=50
1085=50
1075=51
1096=51
1074=52
1072=52
1088=53
1087=53
1086=54
1083=54
1095=55
1089=55
1084=56
1080=56
1090=57
1100=57
-3=42
32=48
-4=35

Example above in this order: 1,2,3,4,5,6,7,8,9,*,0,#


Example for Blackberry 8300 (Curve), 8830, 9000 (Bold) and other full keyboard Blackberry devices (by shen)

The following mappings activate the numeric keyboard without the need of pressing the ALT key. Map and Compass Screen are fully controlled with the following keys, so it's comparable to numeric keypad only devices:

#123
*456
 789
  0

If a trackball is present, the map can be moved using the trackball or the keys 2-4-6-8. In compass screen, 2 and 8 will switch needle averaging, 4 and 6 will change the scale and 5 will switch compass needle north orientation (since v0.9.84 beta).

US Keyboard:

119=49
114=51
100=53
122=55
99=57
97=42
101=117
102=103 
115=104
120=106
113=35
32=0
100=32

DE Keyboard (Y and Z are swapped):

119=49
114=51
100=53
121=55
99=57
97=42
101=117
102=103 
115=104
120=106
113=35
32=0
100=32

Example for Blackberry 8800 (by lgqyqj)

113=35
119=49 
114=51 
100=53 
122=55 
99=57

Example above map (to avoid ALT-Key):

'Q'-Key to be  '#' 
'W'-Key to be  '1' 
'R'-Key to be  '3'
'D'-Key to be  '5'
'Y'-Key to be  '7' (German Keyboard should use 121=55 instead, cause Z/Y are swapped!)
'C'-Key to be  '9'

Example for Nokia E61 (by haddock)

109=48 
114=49 
116=50 
122=51 
102=52 
103=53 
104=54 
118=55 
98=56 
110=57 
117=42 
106=35 

Map Datums

TrekBuddy has a few built-in datums. Since 0.9.63, there's more convenient way to add own datums than using Datum-N attributes in JAD file. Just put datums.txt file in %DataDir%/resources folder on your memory card.

Datum definition format:

symbolic name{reference ellipsoid name, dx, dy, dz}=map:name iz Ozi

For example see datums.txt inside the jar file in resources subdirectory (remember - jar file is a zip, so you can view it using your favourite tool). The values for delta-x, delta-y and delta-z are in meters.

The program's boot sequence first loads built-in file, then tries the the file on the memory card, and finally scans JAD file.

Ellipsoid names:

  • Airy 1830
  • Modified Airy
  • Australian National
  • Bessel 1841 (Namibia)
  • Bessel 1841
  • Clarke 1866
  • Clarke 1880
  • Everest (1830)
  • Everest (Sarawak)
  • Everest (1956)
  • Everest (1969)
  • Everest (Singapur)
  • Everest (Pakistan)
  • Fischer 1960
  • Helmert 1906
  • Hough 1960
  • Indonesian 1974
  • International 1924
  • Krassovsky 1940
  • GRS 67
  • GRS 80
  • South American 1969
  • WGS 72
  • WGS 84

Default built-in datums.txt contains these datums (as Ozi names):

  • Australian Geodetic 1966
  • CH-1903
  • European 1950 (Spain and Portugal)
  • Ireland 1965
  • NAD27 CONUS
  • NTF France
  • Ord Srvy Grt Britn
  • Potsdam Rauenberg DHDN
  • Pulkovo 1942 (1)
  • Pulkovo 1942 (2)
  • Rijksdriehoeksmeting
  • Rome 1940
  • RT 90
  • S42

An example of how to create a datums.txt line for Finnish Nautical (aka. KKJ ). KKJ is based on the International 1924 ellipsoid, and the Finnish Maritime Administration has published delta-values against WGS84.

 Finnish Nautical{International 1924,-75,-230,-90}=map:Finnish Nautical

The .map file for a chart should have the same "Finnish Nautical" as the declared projection for automatic selection to work.

CMS

See CMS

Windows Phone 8 Note

On Windows Phone 8 device, customization requires extra step, because Microsoft, in its wisdom, decided that third-party applications cannot access most common file types on SD card (such as pictures, sound, XML and text files, archives etc). Moreover, SD card access is read-only. That is a really good way to drive developers away..

Workaround for WP version of TrekBuddy is to pack your custom files to tar packages (good old tar format fortunately has not been denied access by MS) and copy them to corresponding folders on SD. For example, you have datums.txt file you would normally copy to resources folder. For TrekBuddy on WP8, you have to pack datums.txt into resources.tar file (name is not important) and copy this tar file to resources folder on SD card. Another example: you have custom datums file and language localization file (language.res). You can pack each to separate tar file, or both into one tar package. The same applies to custom sounds. CMS (profiles) must be also packed. TB will synchronize the contents of tar packages in resources, sounds and ui-profiles folders with application storage in internal memory on every start.

Personal tools
Navigation