Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: Put yourself on the Map -- correction

by abitkin (Monk)
on Aug 23, 2002 at 15:03 UTC ( [id://192351]=note: print w/replies, xml ) Need Help??


in reply to Re: Put yourself on the Map -- correction
in thread Put yourself on the Map -- correction

Once you zoom in, the query string changes so that it includes the lat and long.
http://www.mapblast.com/myblast/map.mb?CMD=LFILL&CT=45.3974961%3A-122.727504%3A20000&GAD1=... No need to show it all and expand the node. Anyways, here is some code for conversion, go ahead and optimize away:
#!/usr/local/bin/perl -w use strict; sub convert { $_ = shift; my $a; my $b; /^([0-9-]+)\.([0-9]+)$/; ($a,$_) = ($1,("0." . $2)*60); /^([0-9-]+)\.([0-9]+)$/; ($b,$_) = ($1, ("0." . $2)*60); s/\..*$//; return "$a.$b.$_"; } while(<stdin>){ my $lat; my $lon; if(/.*&CT=([0-9.-]+)%3A([0-9.-]+).*/){ my $lat = $1; my $lon = $2; print "\n\n<!-- location:latitude=" . convert($lat) . ",longit +ude=" . convert($lon) . " -->\n"; } }

Perhaps, this could be included on the site, somehow.

Edited, added last idea.
==
Kwyjibo. A big, dumb, balding North American ape. With no chin.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://192351]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-26 00:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found