Thunderbird’s address book has a “Get Map” button to show an address location on a map. By default, Thunderbird uses Google Maps to display a location. Wouldn’t it be nice to use OpenStreetMap in Thunderbird instead? Here’s how!

OpenStreetMap
OpenStreetMap uses
Nominatim to search for and display a location. The Wiki tells us the URL query is processed left-to-right, and the example shows the address elements from greatest to least resolution:
http://nominatim.openstreetmap.org/search?q=135+pilkington+avenue,+birmingham&format=xml&polygon=1&addressdetails=1

Thunderbird
The Thunderbird Knowledgebase for
Mail and News settings gives us the following address-related parameters:
Substitution variables:
@A1: address, part 1
@A2: address, part 2
@CI: city
@ST: state
@ZI: zip code
@CO: country
Now we combine the two in Thunderbird’s configuration file prefs.js:
user_pref("mail.addr_book.mapit_url.format", "http://nominatim.openstreetmap.org/search.php?q=@A1,@A2,@CI,@ST,@CO");
If you prefer not to edit the pref.js file, here’s a step-by-step procedure to do it with the graphical interface.
If you’re using Linux, select Edit, Preferences from the Thunderbird menu. On Thunderbird for Windows select Tools, Options. Click on the Advanced toolbar button, then the General tab.
Click on the Config Editor… button.
Click on the I’ll be careful, I promise! button.
Type mapit in the Search field,
Double-click on the line for the mail.addr_book.mapit_url.format parameter.
Delete what’s there, and type http://nominatim.openstreetmap.org/search.php?q=@A1,@A2,@CI,@ST,@CO
Click OK, close the about:config window, and close the Preferences window.
Now we need to find an address book entry with enough data to generate a map.
From the Thunderbird menu, select Tools, Address Book, and double-click on an entry. Click New Contact if there’s nobody in your address book (and you can enter your own address).
Click on the Private or Work tab to show the screen for address entry.
At minimum, fill in the Country field. Adding State/Province, City and Address will improve the resolution of the map. If you do fill in higher resolution fields (Address or City) then you also need to fill in the lower-resolution fields (State/Province and Country), or the Nominatim search won’t work.
Note that the Nominatim URL query doesn’t include the @ZI variable, so the ZIP/Postal Code field isn’t used to create the map.
When all the data is entered, click OK.
With any address field filled in, the address book entry now displays a Get Map button.
Go ahead, click it!
And there we have it! An OpenStreetMap of the address in the Thunderbird address book.
If you’ve done this, or have suggestions for improving these instructions please let me know in the comments or by e-mail at bjonkman@sobac.com.
–Bob.