ex_google v0.2.0 ExGoogle.Places.Api View Source
API wrapper for google places
Link to this section Summary
Functions
Filter given data list to only include particular keys in each item of a list
Convenience for getting nearby places by location
Use google places to search various google places data
Link to this section Functions
Link to this function
filter_data(datalist, items \\ ["name", "id", "place_id", "vicinity", "types"])
View SourceFilter given data list to only include particular keys in each item of a list
Convenience for getting nearby places by location
Examples
ExGoogle.Places.Api.nearby(38.796012, -96.957633, 20)
Use google places to search various google places data
The first params map can consist of any field that google places API supports. While the examples below show few parameters, passing any parameters that google maps api supports works.
Examples
alias ExGoogle.Places.Api, as: Places
# place detail search
Places.search(%{placeid: "ChIJL_zTW3FdvIcR2qmNStcaCdA"})
# text search
Places.search(%{query: "Restaurant"}, :text)
# nearby search
Places.search(%{location: "38,-94", radius: 1000}, :nearby)