nearest-coffee
Client-side Google Places search for coffee shops near the given Lat/Lng.
var coffee =
Assumes google
is already a global, e.g. via:
PRs for Node version welcome.
Usage
coffee(opt[, callback])
If opt
is an array, it's assumed to be a simple [lat, lng]
. Otherwise you can pass any options for the Places API, including:
radius
in meters, defaults to 500. max is 50,000 mlocation
a Google Map, LatLng object, or simple[lat, lng]
array`keyword
a term to matchname
a name to matchrankBy
can be'prominence'
(default) or'distance'
(will ignoreradius
)types
which defaults to['cafe']
element
the Map, or a DOM element that receives attributions (required per Terms of Service)
License
MIT, see LICENSE.md for details.