This Blog Is Not For Reading

A blog, just like any blog, only more so

  • Subscribe

  • Categories

  • RSS Bob Jonkman’s Microblog

    • New note by bobjonkman 14 January 2023
      I seem to recall there's a standard API that should be common to all the #StatusNet derivitave servers. I'm pretty sure that in its infancy Mastodon conformed to that API. But Mastodon's API expanded beyond that, and I suspect some of the common API was removed, probably around the time #OStatus was dropped from Mastodon […]
    • New note by bobjonkman 14 January 2023
      Twidere has stopped working for Twitter accounts. My Mastodon account still works nicely. I thought maybe the Twidere API keys for the developer had been revoked, or that something had gone wrong with my phone (It's a vanilla Samsung with Android 12, but I've refused to install any of the Samsung or Google apps). I […]
    • bobjonkman repeated a notice by heluecht 14 January 2023
      RT @heluecht !Friendica Admins As you might have heard, there are issues with the Twitter API. Several favourite clients stopped working, while others (still) do. By now there hadn't been any word if there is some massive Problem or if this was some deliberate action. Whatever is causing these issues, at least my connection still […]
    • Favorite 5 January 2023
      bobjonkman favorited something by lnxw48a1: https://imaginary.ca/blog/2017/06/16/top-hat/#more-231 [imaginary ca] I am glad this instructor thinks this way. Too many don't seem to care how badly a vendor's product affects students.
    • Favorite 5 January 2023
      bobjonkman favorited something by lnxw48a1: https://500ish.com/mastodon-brought-a-protocol-to-a-product-fight-ba9fda767c6a #Medium link; don't be surprised if it does weird things before showing you the article. "Mastodon brought a protocol to a product fight" > Yes, yes, the network is under immense strain as people flee the Elon strain infecting Twitter. But come on, there are folks who really believe […]
    • bobjonkman repeated a notice by lnxw48a1 5 January 2023
      RT @lnxw48a1 https://500ish.com/mastodon-brought-a-protocol-to-a-product-fight-ba9fda767c6a #Medium link; don't be surprised if it does weird things before showing you the article. "Mastodon brought a protocol to a product fight" > Yes, yes, the network is under immense strain as people flee the Elon strain infecting Twitter. But come on, there are folks who really believe this is going […]
    • Favorite 5 January 2023
      bobjonkman favorited something by lnxw48a1: > For now, I’ll just say that while I fully understand why everyone wants Mastodon to be the new Twitter. Or the better Twitter. The more ideal Twitter. Or whatever. It’s just not going to happen. Mastodon brought a protocol to a product fight. Maybe Ivory or another client can […]
    • bobjonkman repeated a notice by clacke 4 January 2023
      RT @clacke NZ PM Jacinda Ardern called ACT leader David Seymour a prick on a hot mike in parliament. She apologized, he accepted, they had a laugh, and now together they've framed and signed a transcript of the exchange, selling it to the highest bidder, currently at 100 kNZD. The proceeds will go prostate cancer […]
    • Favorite 4 January 2023
      bobjonkman favorited something by clacke: NZ PM Jacinda Ardern called ACT leader David Seymour a prick on a hot mike in parliament.She apologized, he accepted, they had a laugh, and now together they've framed and signed a transcript of the exchange, selling it to the highest bidder, currently at 100 kNZD. The proceeds will go […]
    • New comment by bobjonkman 14 December 2022
      @lnxw48a1 "Pop" is also the Canadian word for carbonated soft drinks...

How To Use OpenStreetMap with Thunderbird’s “Get Map” button

Posted by Bob Jonkman on October 9th, 2012

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!

OSM

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

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.

Screenshot of the Preferences window, Advanced tab

Click on the Config Editor… button.

Screenshot of advanced configuration warning

Click on the I’ll be careful, I promise! button.

Screenshot of Thunderbird advanced configuration window

Type mapit in the Search field,

Screenshot showing the mail.addr_book.mapit_url.format setting

Double-click on the line for the mail.addr_book.mapit_url.format parameter.

Screenshot of input dialogue

Delete what’s there, and type http://nominatim.openstreetmap.org/search.php?q=@A1,@A2,@CI,@ST,@CO

Screenshot of input box with OSM value

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).

Screenshot showing address book general info entry form

Click on the Private or Work tab to show the screen for address entry.

Screenshot showing address book work info entry form

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.

Screenshot of Thunderbird Address Book showing Bob Jonkman

With any address field filled in, the address book entry now displays a Get Map button.

Go ahead, click it!

Screenshot of OpenStreetMap

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.

All screenshots taken by Bob Jonkman, and freely available for re-use (CC0CC0).

The new OpenStreetMap logo by Ken Vermette from http://blog.osmfoundation.org/2011/05/13/new-openstreetmap-logo/, used under a Creative Commons LicenseCC BY-SA license.

The Thunderbird Logo and Wordmark are used according to the Mozilla Foundation Visual Identity Guidelines for Thunderbird.

Maps © OpenStreetMap contributors, CC BY-SA

 
Better Tag Cloud