Categories
Randomness

GeoLocation Technology is Frightening Me.

Firefox 3.5 added support for “My Location”; Google Maps added a feature “Show My Location.”

One random day I thought I’d try it out and see how well it does. I’m only using a laptop with no real GPS technology built in.  I have a phone, but it doesn’t support anything fancy. It’s just a phone.

When I first clicked the “Show My Location” circle on Google maps, Firefox was kind enough to ask me if it was OK for Google to know this. I said yes, because I wanted to know.  To my surprise, awe, and WTF? It had my location closer than I could have ever imagined.

Categories
PHP

Geocodes Made Easy

Using my Google Maps API key I can geocode almost anything*.

And with Zend Framework, it’s f’n damn simple!

Zend_Loader::loadClass('Zend_Rest_Client');
$rest = new Zend_Rest_Client('http://maps.google.com/maps/geo');
//?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&output=json&oe=utf8&sensor=true_or_false&key=your_api_key

$rest->key('YOUR_API_KEY');
$rest->q('1600 Amphitheatre Parkway, Mountain View, CA');
$rest->output('xml');
$rest->oe('utf8');

$result =  $rest->get();
// the whole $result is a SimpleXML object
print_r((string)$result->Response->Placemark->Point->coordinates);

And that’s it.  Save the results someplace useful so you don’t have to hammer the shizzle out of Google (there are query limitations per key).

* I mean almost anything, because you cannot geocode a UK Postal Code, because the Queen and her Royal Mail owns the copyrights on it. Silly, I know.

Categories
Coding Java

Google I/O 2008

I had the pleasure of attending Google I/O in San Francisco this year.  I’m only getting to posting about it now because work has been far too insane for me to even stop and think about all the glorious things I heard about during the conference.

In fact, I still find it hard to come up with any one outstanding part of the conference.  It was all so awesome, and all so in depth.

If there is anything that I brought out of it, it’s a desire to learn more Java and figure out some ideas to deal with GWT and Android.  Those are two pretty hot topics in my mind right now.

I was also impressed with the Google Earth and Google Maps API integration.  That’s a pretty sweet package right there.  I love maps, and man making maps with Google is fun.

Hopefully I’ll be able to put together some cool things for work in the near future.  I’ve got one project requiring maps and travel data right now, so we’ll see what that brings.

I also have a desire to actually figure out a Rubiks Cube.  Thanks Google, it was a blast.  See you next year, I hope.