Coder Social home page Coder Social logo

ex_maps's Introduction

Google Maps

Elixir wrapper around Google Maps APIs

Build Status Hex Version License

Services

  • Directions - Directions between multiple locations.
  • Distance Matrix - Travel time and distance for multiple destinations. (contributed by @bnns)
  • Elevation - Elevation data for any point in the world.
  • Geocoding - Converts between addresses and geographic coordinates.
  • Place Add - Allows you to supplement the data in Google's Places database with data from your application.
  • Place Autocomplete - can be used to automatically fill in the name and/or address of a place as you type.
  • Place Details - Returns more detailed information about a specific Place, including user reviews.
  • Place Photo - Gives you access to the millions of Place related photos stored in Google's Place database
  • Place Nearby Search - Returns a list of places within a specified area based on a user's location or search string. (contributed by @distortia)
  • Query Autocomplete - can be used to provide a query prediction service for text-based geographic searches, by returning suggested queries as you type.
  • Timezone - Time zone data for anywhere in the world. (contributed by @uesteibar)

Methods

  • distance/3
  • directions/3
  • geocode/2
  • place_autocomplete/2
  • place_query/2
  • place_nearby/3
  • place_details/2
  • timezone/2
  • get/2

Installation

If available in Hex, the package can be installed as:

  1. Add google_maps to your list of dependencies in mix.exs:
def deps do
  [{:google_maps, "~> 0.9"}]
end
  1. Ensure google_maps is started before your application:
def application do
  [applications: [:google_maps]]
end
  1. In your application's config/config.exs, add:
config :google_maps,
  api_key: "YOUR API KEY HERE"

Or you can use GOOGLE_MAPS_API_KEY system environment variable when running in iex.

If separate API keys are needed per request, they can be set through key option, i.e.:

GoogleMaps.directions("Toronto", "Montreal", key: API_KEY_1)

Development

You'll need a Google API key with all relevant APIs (see above) enabled. Add your key to the environment as specified above.

Then run tests:

mix deps.get test

mix test

ex_maps's People

Contributors

bnns avatar dependabot-support avatar distortia avatar erneestoc avatar migbot avatar r-icarus avatar rsierra avatar sntran avatar uesteibar avatar wisq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.