Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by abitkin (Monk)
on Aug 23, 2002 at 15:03 UTC ( #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
Node Status?
node history
Node Type: note [id://192351]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2020-06-02 01:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (12 votes). Check out past polls.

    Notices?