Mapper Map Module of Frelardia, Seattle

Josh Burker
November 13, 2006

I dusted off the source code for Adam Tow's Mapper package for the Newton and built myself a cool new Mapper Map Module:

http://www.tow.com/software/newton.shtml

Fortuitously, Adam lets us download the source NTK Mac project files that include a sample Mapper Module template with extremely easy-to-follow directions within the project file that will have you customizing your own Mapper module without too much difficulty. There were two areas, however, that gave me a little trouble and which I thought I would explain here in an effort to get a couple more people to produce their own Mapper modules, whether for their own use or for public consumption.

Adam's web page from which you can download Mapper also has Brisbane and Denmark Modules and a link to Peter Belanger's web site, where he has many Mapper Modules. In fact, I would characterize Peter Belanger as the king of Mapper:

http://peterbelanger.com/newton.html

These modules give you a great sense of the power of the Mapper package and the possibilities offered by such an application. I am most enchanted by the package because it allows the Newton to display over-sized images with effortless scrolling. I prefer not to use the "scroller" and instead drag the stylus in the direction I need to expose on the map. Additionally, the thought of having on-hand detailed maps of a particular location is also charming as it fits with an original intention of the Newton, a digital assistant on whom one could store information that was needed in a portable, on-the-road situation. Maps are a perfect object of which to have digital copies, and maps that have free wifi hotspots are particularly 21st century versions of this ancient art.

I decided to make a Mapper Map Module of wifi spots in the Frelardia section of Seattle: that unique point in time and space between Fremont, Ballard, and Greenwood. I thought I would use a popular mapping web-app to churn out a couple different maps of the area at street-level detail and have it mark the free wifi hot spots with open WEP that are in the neighborhood. The project probably violates the APIs and copyright, but it's mostly for personal use, and for the inhabitants of Frelardia, where jurisdiction over such matters are murky at best.

I loaded up the maps by searching by neighborhood, state, zip code, and what I was looking for: Ballard, WA 98107 wifi hot spot. Et voilà a map of part of Frelardia with a bunch of cafes and businesses that have open and in some cases paid Wifi. It becomes clear that WIFI tends to blanket chunks of the urban core, so the maps need not identify precisely the location of the WIFI hot spot so long as it is relatively close: we're dealing with radio waves here, after all. Curiously, multiple searches show different locations of spots as well. I captured screenshots of the maps that I wanted, which were saved as .png files. I started with five maps, one of which was really a sub-view of another map (a closer view of the particular area).

Next, I opened the map images using Adobe Photoshop. This step is probably specific to using a Mac, but so is using Adam's Mapper NTK project. You need to create a PICT Resource file, different from a standard PICT data file that has a MacPaint picture in it, for example. You can accomplish what I'm going to walk you through, the first of the unclear steps in the process I referred to earlier, using Terminal and the command that Paul Guyot uses, on an OS X Mac with the Developer Tools installed, and which can be found in the documentation Grant Hutchinson and I wrote about the Binary Server, available here:

http://npds.free.fr/docs/new/BinaryServerHowTo.html

Look for the part about creating a PICT resource in your home directory.

If you prefer the pure GUI goodness of Photoshop, you can open your screenshot. First, convert it to Grayscale. Next, 'Save As' the file as a PICT Resource. There will be several options presented to you: give your resource a name (one of my maps was called 'Fremont'); choose 4-bits/pixel; the compression will automatically set itself to 'no compression.' Either way you choose to create them, whether using Photoshop or the Developer Tools, you'll have PICT resource ready to get ready to use with a Newton (I never said this was going to be straight forward, but I hope you'll find this tutorial makes it a little easier).

You need to take the PICT resource file you just created and get it into the tempate that Adam Tow created and distributed. You use ResEdit. Apple is so far beyond ResEdit at this point that the Developer site doesn't even list it in a search; it shouldn't be too hard to find with a google search, but make sure you are using version 2.1.3. Also, allocate more memory to ResEdit since we are dealing with graphic files; Get Info in the Finder and crank both the minimum and maximum up to 12000K.

After ResEdit's Jack-in-the-Box pops out (one of the best splash screens ever, in my opinion) open up a copy of the Mapper Module Sample file from the Mapper Source archive (you will want to have a backup of the original in case you need to compare your work to a copy that actually works). The name of the file you are looking for is Resources. Double-click on the PICT resource inside the Resources file and you will see a 1-bit map of the USA (black and white) and a color map of the world. Single-click on the imaged and Get-Info on them (Apple-I on the keyboard) to see how they are set up and which options are selected. You can then delete them by closing the Info window and single-clicking on the image then pressing the Delete key on the keyboard. Next, open one of the PICT resource files you created in the previous section and open the PICT resource, where you will find the graphic that you gave a number to when you saved it in Photoshop as well as another copy of the same graphic with a different number. We're only concerned with the graphic that you numbered earlier, which you can copy by single-clicking and selecting Copy from the Edit menu. Switch back to the Resources file and paste the PICT into the PICT resource window; it will bring in its number and name. Continue to open the additional PICT resource files in ResEdit and copy and paste them into the Resources template where we are working.

You now have a customized Resources file with your graphics ready to reference from the NTK project. Within NTK double-click on the text part of the project. Use Adam Tow's directions on how to customize and build a Newton package from the template. It's as easy as that!

The second issue I ran into was when I built my original map with five subviews. It refused to load and prevented Mapper from opening. I'm not sure if it had to do with lack of heap as my memory card is getting a little full. Time to do some housekeeping!

Without further ado, here is the Mapper Map Module for Frelardia. Download it and spend some time wandering around Frelardia, whether virtually or in the flesh. Take advantage of the free WEP to post a message on my NPDS server and to drop Hiroshi Noguchi an email asking him to please pretty please open registration for his wireless Newton driver again, as I have two Newtons I would love to license.

http://homepage.mac.com/senorwences/FileSharing47.html

And I throw down the gaunlet and challenge all Newton users with the means of running NTK to create new Mapper Map Modules for all of us to use. Try experimenting with the "buildings" feature in the template: it probably behaves similarly to Adam Tow's Stanford packages. Push it beyond Maps: think "Adventure of Little Nemo." Attempt to do something to keep the Modules small in memory size. Have fun!

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License.