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 […]

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 […]