News Events, interesting things & other stuff

Check Out My Software

Take a look at my current selection of Mac software: ImageReel for browsing your pictures and the Google Maps plugin for your Address Book!

News Archives

News Feeds

RSS 2

June 22, 2006

Google Maps Plugin 2.5.1

Actually, quite a bit was done for this minor update to the plugins. Accented characters in addresses will now properly work with Google Earth. I was still unsuccessful with Japanese addresses though, something to do with the UTF-8 encoding in the URL. So, for now, Japanese addresses are sent to Google Earth as-is without determining their coordinates. All that’s lost is the cool fly-to effect that the other addresses get. I don’t plan on giving up on it just yet though.

Also, I’ve built my own bare-bones installer. It still installs to your home folder for now. The bundles can be relocated to your root Library folder if you choose, as long as the folder structure is left intact.

I also tried to make some of the wording in the plugins more user-friendly.

You can download the new plugins from here. Enjoy.

June 18, 2006

Installer

Apple’s Installer can be frustrating. Perhaps I’m just trying to do more than it’s designed to do.

At any rate, it’s been brought to my attention that, if you’re installing the plugins as a non-admin user, the Installer will fail when trying to write a receipt file to /Library/Receipts. If there’s already a receipt file there, it seems to work OK. The plugins do get installed just fine. The problem is that a symbolic link gets abandoned in the /tmp directory.

This can be removed simply by opening /Utilities/Terminal.app and then type rm /tmp/Brian_Toth_Google_Maps at the prompt and hit Return. Another way is, from the Finder menu, choose Go > Go to Folder… and type in /tmp. Then move the offending file to the trash.

Problem Solved

NSISOLatin1StringEncoding saves the day. I’ll write about it some more tomorrow, it’s 12:30AM here in Ohio. I’ll be putting an update together in the next day or so for the plugins so that European addresses will work properly in Google Earth. I’m going to take the opportunity to do some re-wording of some things as well.

June 16, 2006

Percent Escapes and Downloading with Cocoa

I’m not sure why I didn’t notice this before, but with the 2.5 version of the plugins, the Google Earth portion doesn’t work with characters in addresses that end up being escaped for NSURL. What users will get, instead of their maps, is an empty KML file.

KML files are the XML files that Google Earth uses to plot points on the globe. Currently, I take the URL that would normally be generated for Google Maps, tack the &output=kml string onto it and then download the resulting file. I then open that file using NSWorkspace, which usually sends the file to Google Earth if it’s installed. (The reason for using this method, rather than constructing my own KML file, is that Google Maps will generate the proper coordinates for the address, resulting in the fun-to-watch fly-to effect.)

This process works great for most addresses. The exception is very noticeable with French and German addresses, as they tend to have a lot of characters that need to be properly escaped before they can be put into a NSURL object. These escapes work fine for loading a Google Map in a web browser, so I know they’re not being escaped wrong. However, when adding the &output=kml string and then trying to retrieve the resulting data, I get an NSData object that is zero in length.

I’ve tried downloading the data multiple ways, in the 2.5 release, I simply use NSData’s dataWithContentsOfURL: method. Today I fussed around with NSURLRequest and later NSURLDownload. Each method returns the same results. If I remove the offending character from the URL, everything is fine.

There must be something I’m overlooking. =) Any insight in regards to this problem is more than welcome.

June 12, 2006

Google Earth 4 Beta… and Something Else

I took the time today to add support for Google Earth to the Google Maps Plugins. I should be putting this update here for download within the next day or two.

Last night I had a brainstorm about how to integrate it into what I already had, so of course I had to see if it would work. You will now be able to look up an address in Google Earth and get directions between two addresses as well. I’ve received quite a few emails about Google Earth through the development of these plugins, so hopefully this will fill in that gap for users that were looking for it.

Coincidentally, Google also released an updated Google Earth today. The new version has a nicer UI and some other stuff that I haven’t played with yet.

June 8, 2006

Google Maps Plugin 2.4 Beta 4

Changes in this update:

  • I “fixed” what I think was a silly assumption in the previous build. Now, if an address does not have a country specified, the country is determined simply by the formatting of the address. The default country preference is really only used to specify which localized version of Google Maps to use (if one is available for the selected country). This should be an improvement. =)
  • I’ve finally figured out how build a Universal Binary that still supports 10.3.9. So now there’s only one download for all supported systems. Please let me know about any Installer issues, especially with Intel Macs, since I’ve tested in 10.3.9 and 10.4.6 for PowerPCs.
  • I’ve temporarily removed the localizations until I’m sure I’m done editing the interface. This doesn’t mean that I don’t appreciate any translations, in part or in whole, as I will be adding them in eventually.

Try the new Beta today.