Skip to content

wevtimoteo/ex_roads

 
 

Repository files navigation

GoogleRoads

Elixir wrapper for Google Roads API based in sntran/ex_maps

Elixir CI SourceLevel Hex Version License

  • 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

Methods

  • snap_to_roads/3
  • get/2

Development

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

Setup credentials

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.

Installation

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

Sponsor this project

Packages

No packages published

Languages

  • Elixir 100.0%