Find the coordinates (latitude and longitude) using the Places API for a given address.
iex> Find.coords("#$$$$$$")
{:error, %ElixirCL.Places.Find.Error{address: "#$$$$$$", code: "ZERO_RESULTS", message: "No results found"}}iex> Find.coords("La Moneda, Santiago")
{:ok, %ElixirCL.Places.Find.Coords{address: "La Moneda, Santiago", lat: -33.4429091, lon: -70.6538699}}If available in Hex, the package can be installed
by adding elixircl_places_find to your list of dependencies in mix.exs:
def deps do
[
{:elixircl_places_find, github: "elixircl/placesfind"}
]
endBe sure to add Google Maps API Key in config/config.exs or set GOOGLE_MAPS_API_KEY env.
See Google Maps Elixir for more info.
-
Made with ♥ by Ninjas.cl.
-
Special Thanks To @takakeiji