[erlang-questions] Announcing erl-geocode
Hoan Ton-That
hoan@REDACTED
Mon Dec 11 11:36:27 CET 2006
Hey,
Its time for another Erlang library. erl-geocode is
a library that can find the latitude and longitude
of an address using the Google Maps API. It uses
a dets cache to minimise the number of requests.
> geocode_sup:start_link("YOUR API KEY","/tmp/geocode_cache").
{ok,<0.51.0>}
> {ok, Canberra} = geocode:position("Canberra Australia").
{ok,{location,-0.616276,2.60281,4}}
> {ok, Sydney} = geocode:position("Sydney Australia").
{ok,{location,-0.591143,2.63911,4}}
> geocode:distance(Canberra,Sydney).
249.042
And there we have found the distance from
Canberra to Sydney.
http://code.google.com/p/erl-geocode/
Hoan
More information about the erlang-questions
mailing list