Description
Elixir wrapper around Google Maps APIs
Google Maps alternatives and similar packages
Based on the "Geolocation" category.
Alternatively, view Google Maps alternatives based on common mentions on social networks and blogs.
-
topo
A Geometry library for Elixir that calculates spatial relationships between two geometries -
geoip
Elixir library to find geo location information given an IP address, hostname or Plug.Conn -
distance_api_matrix
Google Distance Matrix API Library for Elixir -
ipgeobase
Find Russian and Ukraine city by IP address and find country for other country Elixir -
srtm
Query locations for elevation data from the NASA Shuttle Radar Topography Mission -
segseg
Segment-segment intersection classifier and calculator for Elixir
Collect and Analyze Billions of Data Points in Real Time
Do you think we are missing an alternative of Google Maps or a related project?
README
Google Maps 
Elixir wrapper around Google Maps APIs
Services
- [x] Directions - Directions between multiple locations.
- [x] Distance Matrix - Travel time and distance for multiple destinations. (contributed by @bnns)
- [x] Elevation - Elevation data for any point in the world.
- [x] 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.
- [x] Place Autocomplete - can be used to automatically fill in the name and/or address of a place as you type.
- [x] Place Details - Returns more detailed information about a specific Place, including user reviews.
- [x] Place Photo - Gives you access to the millions of Place related photos stored in Google's Place database (contributed by @gVirtu)
- [x] Place Nearby Search - Returns a list of places within a specified area based on a user's location or search string. (contributed by @distortia)
- [x] Query Autocomplete - can be used to provide a query prediction service for text-based geographic searches, by returning suggested queries as you type.
- [x] Timezone - Time zone data for anywhere in the world. (contributed by @uesteibar)
Methods
directions/3
distance/3
elevation/2
geocode/2
place_autocomplete/2
place_query/2
place_nearby/3
place_details/2
place_photo/4
timezone/2
get/2
Installation
If available in Hex, the package can be installed as:
- Add
google_maps
to your list of dependencies inmix.exs
:
def deps do
[{:google_maps, "~> 0.11"}]
end
- Ensure
google_maps
is started before your application:
def application do
[applications: [:google_maps]]
end
- 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
*Note that all licence references and agreements mentioned in the Google Maps README section above
are relevant to that project's source code only.