Sunday, January 02, 2011

Flying around Google Earth

Letterboxes from coast to coast!
Of all the major changes I listed yesterday, I overlooked one: maps. Most notably, KML files that work with Google Earth. The best way to see this in action is to try it for yourself. You'll need to download and install Google Earth if it's not already installed on your system to follow along with me.

Now, when a premium member runs a search for letterboxes, they'll see links for "KML" and "Network KML." KML is a specific file format and Google Earth is probably the best known program that supports it. Super cool stuff. *nodding* The original KML link has been there for years and still works the same as always. It returns a file with the first 100 boxes that your search matches, and you can zoom around Google Earth to see it. It's a static file, though, and never changes. It's still pretty cool, but has a couple of limitations--the fact that it never updates, and the fact that it will only show the first 100 boxes in your search.

The "Network KML" link gets around these limitations by specifying a special URL on Atlas Quest that Google Earth can contact to get the information it needs to display through a feature called "network links." When you click on the link and open it in Google Earth, it doesn't actually contain any information about letterboxes--just where on the Internet to get information about letterboxes.

After Google Earth loads the file, it connects to Atlas Quest and says something like, "The view of Earth is currently showing the entire United States. What boxes are there that are within this area?" And Atlas Quest will reply with the first 100 boxes that it finds in the database within the designated area.

Zooming into the San Francisco Bay area.
If, in Google Earth, you then zoom into California, Google Earth will contact Atlas Quest again and say, "Hey, my owner moved the map, and now it's only showing the area in California. What boxes should I display?" And Atlas Quest will again search through its database and reply with the first 100 boxes that it finds in California. The maximum number of boxes shown in a view is still 100--but it throws out the boxes that are no longer within that view and replaces them with new boxes that are still within the view.

If you then zoom in further, such as into the San Francisco Bay area, Google Earth will contact Atlas Quest again. "Hey, AQ, my owner just moved the view again. What boxes do you have that cover the SF area?" And Atlas Quest will give it another list of up to 100 boxes that are within that view.

You get the point. So while you'll never see more than 100 boxes listed in any given view, if you zoom around enough, you could--in theory--spot every single letterbox listed on Atlas Quest. And if you save that file and come back to it a year later, it again contacts Atlas Quest for the current boxes that match the search. If a box was deleted during that timespan, it'll stop showing up on Google Earth. Or if the box was moved, it'll move on Google Earth. Or if your search was original set to show only active boxes and a box had been retired, Google Earth will stop showing that box. The results are dynamic and always up-to-date.

This is very cool stuff. *nodding*

I zoom in even further, this time to San Jose.
Wait a minute, is that Wassa I see? Hmm... I think
I've been hacked!
And, it's mostly a premium member only feature. But if you aren't a premium member, don't feel too left out--I added a new Google Earth search to the Letterboxes menu. This link will show all active letterboxes around the entire world, and you do not need to be a premium member to use it. If you want to be able to hide plants and finds from those results, or only include boxes with a specific tag, or any number of other variations of the search, you'll need to be a premium member. But for most people, this particular link will be all you'll ever want. =)

So, that network link thing is new and pretty darned cool. And I totally forgot to mention it in my post yesterday. Too many changes in that update for me to keep track of! =)

While developing the network link feature, I discovered that Google also updated their maps API, so I upgraded the code to using their latest and greatest Google Maps API. As a result, you might notice some minor changes when you click on the "Map Results" link, but they're generally so minor you might not notice any changes. But if you think it just "looks" different but can't figure out why, you aren't going crazy. It too has been updated. =)

4 comments:

Anonymous said...

Wow, cool! I remember when geocaching.com did this, but they added some "fudge factor" so you couldn't actually grab the cache coordinates from it. I guess with letterboxes, the relative accuracy of the "location" field is already enough of a fudge factor :)

Speaking of which... on with my quest to find a way to "correct" the starting point coordinates. What do you think about allowing a special kind of personal "note" or tag within the notes for boxes that could override the posted location in a search like this?

Ryan said...

That suggestion is on my to-do list. =)

-- Ryan

Anonymous said...

Superb! That feature could make my life easier, possibly helping me live longer, and yes, I think i may just have to tack another year or two on my lifetime membership once it surfaces! :)

Jarna said...

Cool, I really like it. Thanks :)