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.