A quick hack to get a location's geo coding
require 'xml-simple'
require 'net/http'
# Enter the location to get the lat and long
#
def yahoo_geo(location)
host = "api.local.yahoo.com"
q = "http://api.local.yahoo.com/MapsService/V1/geocode"
q << "?appid=wnorrix&location=#{URI.encode(location)}"
xml = XmlSimple.xml_in(Net::HTTP.get(host, q), {"ForceArray" => false})
return xml["Result"]
end


I'm missing rails :(
Aw Man Warren,
Looking at your blog, you're reminding me how much I miss ruby on rails (now in php/ajax/perl hell)...
My kingdom for a decent hash/associative array library, grr!!!
...Rodney
Post new comment