Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elixircl/placesfind
🛰️ Use Google Places to Find Coordinates for a Given Address
https://github.com/elixircl/placesfind
elixir google places
Last synced: 4 days ago
JSON representation
🛰️ Use Google Places to Find Coordinates for a Given Address
- Host: GitHub
- URL: https://github.com/elixircl/placesfind
- Owner: ElixirCL
- License: mit
- Created: 2023-05-25T17:48:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-25T17:48:38.000Z (over 1 year ago)
- Last Synced: 2024-05-01T06:45:25.331Z (7 months ago)
- Topics: elixir, google, places
- Language: Elixir
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Google Place Coordinate Finder
Find the coordinates (latitude and longitude) using the [Places API](https://developers.google.com/maps/documentation/places/web-service/overview) for a given address.
## Usage
```elixir
iex> Find.coords("#$$$$$$")
{:error, %ElixirCL.Places.Find.Error{address: "#$$$$$$", code: "ZERO_RESULTS", message: "No results found"}}
``````elixir
iex> Find.coords("La Moneda, Santiago")
{:ok, %ElixirCL.Places.Find.Coords{address: "La Moneda, Santiago", lat: -33.4429091, lon: -70.6538699}}
```## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `elixircl_places_find` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:elixircl_places_find, github: "elixircl/placesfind"}
]
end
```## Configuration
Be sure to add [Google Maps API Key](https://console.cloud.google.com/google/maps-apis/credentials) in `config/config.exs` or set `GOOGLE_MAPS_API_KEY` env.See [Google Maps Elixir](https://github.com/sntran/google_maps) for more info.
## Credits
- Made with ♥ by Ninjas.cl.
- Special Thanks To [@takakeiji](https://github.com/TakaKeiji)