Elixir wrapper for Google Roads API based in sntran/ex_maps
- Snap to roads - Best-fit road geometry for a given set of GPS coordinates
- Nearest roads - Closest road segment for a given set of GPS coordinates
- Speed limits - Posted speed limit for a given road segment
snap_to_roads/3get/2
You'll need a Google API key with all relevant APIs (see above) enabled. Add your key to the environment as specified above.
Install dependencies:
mix deps.get
Then run tests:
mix test
In your config/config.exs:
config :google_roads,
api_key: "your_api_key"Is recommended to create a config/prod.exs or even set an environment variable for GOOGLE_ROADS_API_KEY.
If available in Hex, the package can be installed
by adding ex_roads to your list of dependencies in mix.exs:
def deps do
[
{:ex_roads, "~> 0.0.2"}
]
end