Friday 30 November 2007

Silverlight Google Maps (inc new Topo view) now has 11 map options, including Yahoo's map tiles and the new Google Topo view. mapstraction had some helpful pointers on the Yahoo tile-names (so thanks to them).

The 'hybrid' layers don't "overlay" anything yet - that's still to come...

And finally, the design has been tweaked a bit - hopefully it looks a bit nicer?

p.s. yes, jerky panning fix to come...

p.p.s. another 'before & after' shot - check out the baseball diamond on the east side before (google) and after (virtual earth)... here it is in October.

Tuesday 27 November 2007

Silverlight Virtual Earth - now with (jumpy) drag-panning

Visit Auckland on and try out drag-panning across the map.

The dragging 'jumps' because it's currently aligning the "tile grid" to the nearest tile-boundary (256 pixels)... just a few more tweaks to get it behaving properly.

The "Link to this map" feature now includes the map type, so you can view the London Eye via (Virtual Earth) satellite, London (Virtual Earth) road map or even the London Eye on Google Maps.

And yes, it works on the Mac (Safari 3 and Firefox 2)!

Thursday 22 November 2007

Silverlight (Virtual) Earth with Ink

Thanks to Gavin's pointer to an MSDN sample, now has Ink! Click [Draw on this map] at top-right to try it out.

Sorry, I haven't figured out saving the Ink yet (although got some ideas from search sample and converting to xaml), but it's kinda fun to play with.

Still to do: drag-panning and bookmarking map-type Virtual Earth or Google Maps... so yes, it's still in beta.

Wednesday 14 November 2007

Virtual Earth 6 - new map 'shading'

Microsoft Virtual Earth 6 has been released - along with various different improvements to the "UI" (javascript and the controls that drive it), one noticable difference is the addition of 'topographical shading' in Road view. Here's the Golden Gate Recreation Area 'before' and 'after'...

Of course, now uses the new tiles - visit San Francisco and switch between (road) and (roadshade) views.

Seems to be available "down under", but only to zoom '13' and no closer...

(thanks to via windows live and Darren Neimke for the heads-up)

Monday 12 November 2007

Silverlight 'map tile client' finds a home -

While the map tile client isn't quite yet for release, I'd already paid for the domain so decided to post it anyway... which means

is now LIVE! Granted the dragging still doesn't work; but keyboard (arrows, page up, page down to zoom and pan) does, and the mouse-wheel zooms too. The search box 'searches' and the 'link to this page' does just that.

What's still to come? Well centering the search location for a start, then proper drag-panning on mouse-still-down. After that - maybe uploading some form of geo-coded Xaml to overlay directly on the map... and finally animation a-la

While I had already started working on the 'tile client' before coming across FlashEarth, that is basically the kind of result I'd like to get from Silverlight. Of course, since the Silverlight 1.0 version is (will be) Javascript-based, the code will be easily available for all to see...

Friday 9 November 2007

Add recipes to (for iPhone/iPod Touch)

Following these instructions for adding data to the Notes application for iPhone, you could add your favourite iPhone/iPod Recipes for easy reference. provides preformatted SQL to use with those instructions -- here is an example link for Sugar-grilled Banana Bagels, and how the resulting Note looks:

To 'import' any recipe as a Note, find it's ID by browing with Firefox or Safari, taking note of the URL when you find a recipe link you like

Then simply visit the link below, substituting the ID and follow the instructions.

iPhone/iPod Touch Notes - fonts and styles

Turns out there is a lot you can do once you've got pscp to grab your notes.db, and a copy of SQLite Browser.

The basic structure of notes.db seems to be:
( creation_date INTEGER
, title TEXT
, summary TEXT)

CREATE TABLE note_bodies
( note_id INTEGER
, data)
There doesn't appear to be a direct relationship between them, however the [Note] rows are always sorted by [creation_date] ASC, and the [note_bodies].[note_id] ascends in the same 'order'.

[summary] does not appear to be used on the iPhone/iPod Touch ( puts the first 50 chars of the note data in that column); and [creation_date] is iPhone_Unix_time (seconds since January 1st, 2001 UTC).

Anyway, without further ado, the steps to get this font-test source onto an iPhone/iPod Touch follow (for Windows):

1. Get required software

pscp (part of the PuTTY download) and
SQLite Browser

2. Download your notes.db

Create this batch file somewhere on your PC, along with a Library\Notes folder tree. Run the .BAT (entering the IP address when asked). Assuming the file downloads successfully, MAKE A BACKUP COPY of it somewhere.
set IP=
set /p IP=Enter your iPod's IP address (eg:
pscp -r -pw alpine root@%IP%:/var/root/Library/Notes/* Library/Notes

3. Open notes.db in SQLite Browser

The Database Structure tab will look something like this (additional metadata may be shown)

Go to the Execute SQL tab (like this)

Execute the following four (4) SQL statements, one after the other:

-- These queries were run using

-- First, insert the 'header' for the note
-- Get the creation_date from
-- The title appears on the Notes index page; the summary
-- does not appear to be used on the iPhone/Touch (for now)

INSERT INTO Note(creation_date, title, summary) VALUES(216352013, 'Html and Font Test', 'American Typewriter')

-- Now that we've added a new header,
-- determine the new id and using it:
-- IMPORTANT : *** REPLACE the string MAX_NOTE_ID ***
-- *** in BOTH the queries below ***

SELECT MAX(note_id) + 1 FROM note_bodies

-- Then add the new row with that id
INSERT INTO note_bodies (note_id) VALUES ( MAX_NOTE_ID )

-- Finally, update the new row with the note body
UPDATE note_bodies SET data='Html Test<div><br class="webkit-block-placeholder"></div>
<div style="font-family:American Typewriter;">American Typewriter <b>bold</b> <i>italic</i> <u>underline</u></div>
<div style="font-family:Arial;">Arial <b>bold</b> <i>italic</i> <u>underline</u></div>
<div style="font-family:Courier New;">Courier New <b>bold</b> <i>italic</i> <u>underline</u></div>
<div style="font-family:Georgia;">Georgia <b>bold</b> <i>italic</i> <u>underline</u></div>
<div style="font-family:Helvetica;">Helvetica <b>bold</b> <i>italic</i> <u>underline</u></div>
<div style="font-family:Marker Felt;">Marker Felt <b>bold</b> <i>italic</i> <u>underline</u></div>
<div style="font-family:Times New Roman;">Times New Roman <b>bold</b> <i>italic</i> <u>underline</u></div>
<div style="font-family:Trebuchet MS;">Trebuchet MS <b>bold</b> <i>italic</i> <u>underline</u></div>
<div style="font-family:Verdana;">Verdana <b>bold</b> <i>italic</i> <u>underline</u></div>
<div style="font-family:Zapfino;">Zapfino <b>bold</b> <i>italic</i> <u>underline</u></div>
<div><br class="webkit-block-placeholder"></div>
<div style="font-family:Helvetica;"><sup>1</sup>/<sub>2</sub> cup</div>'

4. Save notes.db

Save the changes you have just made AND QUIT SQLite Browser. You must quite the program so that the upload will work.

5. Upload your notes.db

As with step 2 (but in reverse)
set IP=
set /p IP=Enter your iPod's IP address (eg:
pscp -r -pw alpine Library/Notes/notes.db root@%IP%:/var/root/Library/Notes/

6. Open Notes on your iPhone/iPod Touch

The new note should appear in your Notes application, and display with the complete set of fonts shown above

If you choose to send the note as an email, the formatting stays... so delete the text you don't want and start 'overtyping' in your favourite style for fancy email formatting

Thursday 8 November 2007

RecipeNow food site for iPhone/iPod now listed!

Google Analytics shows lots of inbounds from: food category
appSafari food category

Just a few more features to add before submitting to Apple's webapp list (basic emailing works now).

p.s. for iPhone 'bleeding edge' developers, it doesn't get any better than Joe Hewitt, iPhone God who now works at Facebook (and built the awesome version). Cool...

Wednesday 7 November 2007

Backup (Preferences, Notes, etc) data from jailbroken iPod Touch

If you have jailbroken your iPod Touch (not recommended, of course...) and perhaps added iPhone applications such as Maps, Notes, Mail, etc (not legal...), you might wish to back-up the data you create on said applications (given that iTunes isn't going to offer to help you out since you aren't using an iPhone).

So how to find and copy down the data to your PC?

This modmyifone thread: How to Backup lists a few of the 'data files' used by various applications. The tip that follows simply copies ALL files from /Library/ to your local disk.

Create a Windows batch file and place it in the same directory as folder named Library and a copy of pscp.exe, iBackup.bat
set IP=
set /p IP=Enter your iPod's IP address (eg:
pscp -r -pw alpine root@%IP%:/var/root/Library/* Library/

When you run this, the command prompt will appear and wait for you to enter your iPod's IP Address [Settings » Wi-Fi » (your net) » IP Address] . It will then download everything from your iPod's /Library/ directory, so you get the main data files and a whole pile of cache data as well - about 13Mb in all (on my device).

Points to note (based on an iPhone, of course):
  • /Library/Preferences/* is probably something you'd want to keep all of, just in case

  • /Library/Notes/notes.db is apparently an sqlite data file. There's an sqlite gui too (which I haven't tested yet). Hopefully it'll be possible to download/edit and upload this file.

  • /Library/AddressBook/AddressBook.sqlitedb is even named as an sqlite file. iTunes will sync this for iPod owners since it's built-in

  • /Library/Calendar/Calendar.sqlitedb - iTunes will sync this for iPod owners since it's built-in; in fact, it's one-way for the iPod because the Touch Calendar is read-only (for now)

  • /Library/Keyboard/dynamic-text.dat is apparently a mini-key-logger! I guess it's where they keyboard 'learns' (?)

  • /Library/Mail/* contains a whole pile of different bits - probably best to use IMAP and rely on your server copy for that

Please remember that I've only downloaded the data described above - I haven't had the need to upload any of it, so there's no guarantee that the copies are a perfect backup. But if you did lose your iPod for some reason, there's a chance it'd be recoverable.

I can't test on a Mac; but if you have one you can probably figure out how to use Terminal to grab the files.

UPDATE: sqlitebrowser works a treat

Monday 5 November 2007

Recipes on your iPhone/iPod Touch (Safari)

In a little break from working with Silverlight and maps, I've added an iPhone/mobile-Safari interface to, at

There is at least one other mobile-Safari recipe site (already listed on Apple's iPhone application listing) - 101 Cookbooks - iPhone edition, and I'm sure there'll be more if sites like decide to tackle the mobile space.

More iPhone/iPod Touch ideas to come... thanks to Joe Hewitt's iUI js/css package for iPhone development.

NOTE: to access the mobile recipes from a PC, use the Safari beta or FireFox; for the Mac, use Safari (of course!).