On Fri, Jun 5, 2009 at 10:01 PM, J.R. Mauro<jrm8...@gmail.com> wrote:
> generally useful besides a gmap helper, I suppose. I'm trying to see > if I can get something like google maps directions based on geoloc > since the yahoo site it uses seems to not fail if you give it a very > vague address, unlike most other services I've tried. I suppose I > could try to see if I can get a barebones access to google maps > directions. Like an XML page or something. If anyone knows how, I'd > appreciate some pointers. Here's a hack on top of my hack. The real suckage comes from me making geoloc separate lat and lon with '?' to appease gmap. It's a small change if you don't like it. I really want subway directions, but apparently Yahoo can't do that. I'll keep digging. #!/bin/rc # directions -- print directions from a coordinate pair to another. if (! ~ $#* 2) { echo Usage: directions lat1?lon1 lat2?lon2 exit } SLA = `{echo $1 | sed -e 's/\?.*//'} SLO = `{echo $1 | sed -e 's/.*\?//'} DLA = `{echo $2 | sed -e 's/\?.*//'} DLO = `{echo $2 | sed -e 's/.*\?//'} #echo I got: $SLA $SLO $DLA $DLO hget 'http://maps.yahoo.com/print?mvt=m&tp=1&stx=&fcat=&frat=&clat='^$DLA^'&clon='^$DLO^'&mag=10&zoom=9&trf=0&radius=134.16445&&q1='$SLA'%20'^$SLO^'&q2='^$DLA^'%20'^$DLO^'&v3=0' | htmlfmt