{"id":16656426,"url":"https://github.com/kociamber/ex_maps","last_synced_at":"2025-08-14T21:06:56.446Z","repository":{"id":62429179,"uuid":"127116484","full_name":"Kociamber/ex_maps","owner":"Kociamber","description":"Simple Elixir wrapper around Google Maps API","archived":false,"fork":false,"pushed_at":"2024-07-11T11:31:46.000Z","size":6178,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-04T04:52:00.209Z","etag":null,"topics":["api","coordinates","distance-matrix","elixir","google-maps","otp"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kociamber.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-28T09:26:13.000Z","updated_at":"2024-07-11T11:31:50.000Z","dependencies_parsed_at":"2024-10-28T11:27:07.514Z","dependency_job_id":"f7d6451f-4faa-4e46-b59f-3a932781b97d","html_url":"https://github.com/Kociamber/ex_maps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Kociamber/ex_maps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kociamber%2Fex_maps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kociamber%2Fex_maps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kociamber%2Fex_maps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kociamber%2Fex_maps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kociamber","download_url":"https://codeload.github.com/Kociamber/ex_maps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kociamber%2Fex_maps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270482321,"owners_count":24591340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","coordinates","distance-matrix","elixir","google-maps","otp"],"created_at":"2024-10-12T09:57:18.310Z","updated_at":"2025-08-14T21:06:56.422Z","avatar_url":"https://github.com/Kociamber.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExMaps\n\n[![Hex Version](https://img.shields.io/hexpm/v/ex_maps.svg)](https://hex.pm/packages/ex_maps)\n[![Hex Docs](https://img.shields.io/badge/docs-hexpm-blue.svg)](https://hexdocs.pm/ex_maps/)\n[![License](https://img.shields.io/hexpm/l/ex_maps.svg)](https://github.com/kociamber/ex_maps/blob/master/LICENSE)\n[![Total Download](https://img.shields.io/hexpm/dt/ex_maps.svg)](https://hex.pm/packages/ex_maps)\n[![Last Updated](https://img.shields.io/github/last-commit/kociamber/ex_maps.svg)](https://github.com/kociamber/ex_maps/commits/master)\n\n**Fast and simple Google Maps API client for Elixir applications.**\n\n## Overview\n\nCurrently the wrapper handles [Directions](https://developers.google.com/maps/documentation/directions/start) and [Distance Matrix](https://developers.google.com/maps/documentation/distance-matrix/start) Google API calls.\n\nThis API client currently supports the [Directions](https://developers.google.com/maps/documentation/directions/start) and [Distance Matrix](https://developers.google.com/maps/documentation/distance-matrix/start) Google API calls.\n\nEach coordinate entry in the parameter list spawns a separate Elixir process (task) to retrieve data from the Google API or the cache if the query has already been sent. This allows for the simultaneous execution of a large number of queries, returning results quickly. Additionally, each interface type spawns its own \"coordinator\" process to prevent long queue times when making multiple API calls simultaneously.\n\nThe application uses the super-fast generational caching library [Nebulex](https://github.com/cabol/nebulex).\n\n## Installation\n\nAdd ExMaps as a dependency to your `mix.exs` file:\n\n```elixir\ndefp deps() do\n  [{:ex_maps, \"1.1.3\"}]\nend\n```\n\n## Configuration\n\nTo use the Google API, you need a free or commercial [API key](https://developers.google.com/maps/documentation/directions/get-api-key). Set the environment variable `MAPS_API_KEY` to your key's value.\n\nIf you are using this application as a dependency in your project, add the following configuration to your `config/config.exs` file:\n\n```elixir\nconfig :ex_maps, api_key: System.get_env(\"MAPS_API_KEY\")\n\nconfig :ex_maps, ExMaps.Cache,\n  adapter: Nebulex.Adapters.Local,\n  n_shards: 2,\n  gc_interval: 3600\n```\n\nYou are now ready to go!\n\n## Basic Usage\n\nNote that a free Google API key has limitations and it's easy to exceed the query limit per second. The first parameter is a list of coordinates, and the second is a list of additional options explained on [hexdocs](https://hexdocs.pm/ex_maps/readme.html) and the [Google Dev Guide](https://developers.google.com/maps/documentation/directions/intro).\n\n```elixir\nExMaps.get_directions([%{origin: \"Warsaw\", destination: \"Amsterdam\"}], units: :metric)\n[%{\"geocoded_waypoints\" =\u003e ... }]\n```\n\nYou can mix coordinate types, such as city names and latitude/longitude pairs.\n\n```elixir\nExMaps.get_directions([\n  %{origin: \"Warsaw\", destination: \"Amsterdam\"},\n  %{origin: {52.3714894, 4.8957388}, destination: {52.3719729, 4.8903469}}\n], units: :metric)\n[%{\"geocoded_waypoints\" =\u003e ... }, %{\"geocoded_waypoints\" =\u003e ... }]\n```\n\n```elixir\nExMaps.get_distance_matrix([\n  %{origins: [\"Warsaw\", \"Kraków\"], destinations: [\"Amsterdam\", \"Utrecht\"]}\n], language: \"pl\")\n[%{\"destination_addresses\" =\u003e ...}]\n```\n\n## To do\n\n* Add [Elevation](https://developers.google.com/maps/documentation/elevation/start) service.\n* Simplify configuration.\n\n## License\n\nThis project is MIT licensed. See the [`LICENSE.md`](https://github.com/Kociamber/ex_maps/blob/master/LICENSE.md) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkociamber%2Fex_maps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkociamber%2Fex_maps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkociamber%2Fex_maps/lists"}