Tiler 1.0 =========== Tiler is a tool for automatically cutting a big map file into smaller tiles as recommended for making maps for use with MP2x00. Up to yet it has been necessary to do this manually and elaborately by using a tool such as Photoshop. Tiler has been developed as a multi-platform application runnung on both Power-Macintosh and PC. Because there are much more PC users than Mac users, and because it is simple to work wth, Tiler supports only map files in uncompressed Windows BMP format with either 4 or 8 bits per pixel. If you are using the Macintosh version you must first save your map file in BMP format by using Adobe Photoshop or Graphics Converter. After startup Tiler will ask you for the path expression where to find the original BMP file and where to store the tile files. On Macintosh you should enter a string similar to "Harddisk:GPS Map:myMap:", on PC you should use the usual form such as "C:\GpsMap\myMap\". You can avoid entering a path string by copying Tiler into the directory containing the BMP file. Next enter the original BMP file name including its file extension. Tiler will display the number of pixels in x- and y- direction, calculate and display the optimal tile size, calculate and display the tile offset co-ordinates, and generate the tiles as seperate BMP files named in the format "T_y_x.BMP", where y is the vertical tile address and x is the horizontal tile address (Tile addresses start at zero). The resolution of the resulting files will be automatically set to 72 dpi as requested by NTK. That was it already for PC users. Macintosh users must finally convert all the BMP tile files back to PICT resource files as necessary for importing into NTK. The simlpest and fastest way is using the "Multiple Conversion" command wthin Graphics Converter, where you can select all BMP files at once and then automatically convert them into PICT resource files. Please note that Graphics Converter uses the PICT resource file name also as the PICT resource name. Finally go into NTK and load the tiles as usually. ------------------------------------------------------------- The following example code snippet shows how to import the PICT tile files within Map_Main.afterScript by using Mac-NTK: ------------------------------------------------------------- dX := [0,610,1220,1830,2440]; // tile offsets in x direction dY := [0,620,1240]; // tile offsets in y direction BMAP_1 := {Tiles: []}; // prepare an empty graphics structure FOR Y := 0 TO 2 DO // step through tile rows FOR X := 0 TO 4 DO BEGIN // step through tile columns LOCAL TileName := "T_" & NumberStr (Y) & $_ & NumberStr (X) & ".RSRC"; TRY print ("Importing File " & TileName); rf := OpenResFileX (HOME & TileName); // open resource file Tile := MakePixFamily (NIL, NIL, TileName); // get PICT resource CloseResFileX (rf); // close resource file // shift tile to the right place within the map CALL SetOffset WITH (Tile.bounds, dX[X], dY[Y]); // add new tile to graphics structure AddArraySlot (BMAP_1.Tiles, Tile); ONEXCEPTION |evt.ex| DO print ("Error with File " & TileName); END; // calculate total map size and store it within graphics structure BMAP_1.bounds := CALL calcBounds WITH (BMAP_1.Tiles); thisView.MapList := [ { Name : "myMap", Comment : "my first tiled map", theBits : BMAP_1, ........ ----------------------------------------------------------- The following example code snippet shows how to import the BMP tile files within Map_Main.afterScript by using PC-NTK: ----------------------------------------------------------- dX := [0,610,1220,1830,2440]; // tile offsets in x direction dY := [0,620,1240]; // tile offsets in y direction BMAP_1 := {Tiles: []}; // prepare an empty graphics structure FOR Y := 0 TO 2 DO // step through tile rows FOR X := 0 TO 4 DO BEGIN // step through tile columns LOCAL TileName := "T_" & NumberStr (Y) & $_ & NumberStr (X) & ".BMP"; TRY print ("Importing File " & TileName); Tile := GetBmpAsBits (HOME & TileName, NIL); // shift tile to the right place within the map CALL SetOffset WITH (Tile.bounds, dX[X], dY[Y]); // add new tile to graphics structure AddArraySlot (BMAP_1.Tiles, Tile); ONEXCEPTION |evt.ex| DO print ("Error with File " & TileName); END; // calculate total map size and store it within graphics structure BMAP_1.bounds := CALL calcBounds WITH (BMAP_1.Tiles); thisView.MapList := [ { Name : "myMap", Comment : "my first tiled map", theBits : BMAP_1, ........ ----------------------------------------------------------- Release notes: Version 1.0b1: initial release Version 1.0b2: * Now supports also BMP files with 8 bits per pixel. * Improved screen handling for Macintosh ----------------------------------------------------------- Tiler is an exclusive tool for use with GPS Map and GPS Map Lite only. It is not allowed to use Tiler for other aplications. New versions and other GPS Map additions will be distributed through: http://www.soaring.de/gps/GPS_Map.html. Tiler is copyrighted 1998 by: Gerd Staudenmaier Software Development & Marketing Germany e-mail: gerd.staudenmaier@gmx.de