Google Maps API Python/R
<p>I am trying to use the google maps API for <a href="https://developers.google.com/maps/documentation/javascript/places#place_search_requests" rel="nofollow">nearby</a> search and ideally I'd use a <a href="https://developers.google.com/maps/documentation/javascript/reference#LatLngBounds" rel="nofollow">latlngBounds</a> object for my search. I have been using R but can do python as well and seem to run into the same issue. It's working fine with the point/radius but I'd like to set a bounding box if possible. It seems that for javascript you can input a latlngBounds object but maybe not if you're using the python or R api? Does anyone have any knowledge on if this is possible?</p>

<p>Thanks!</p>

<p>As you've alluded to, the Javascript API allows you to use a LatLngBounds object, however, the <a href="https://developers.google.com/places/web-service/search" rel="nofollow">web services API</a> does not.</p>

<p>A couple of options I can suggest</p>

<ol>
<li><p>Write some Javascript and parse it yourself in R using something like <a href="https://cran.r-project.org/web/packages/V8/index.html" rel="nofollow"><code>library(V8)</code></a>, or your own <a href="https://cran.r-project.org/web/packages/htmlwidgets/index.html" rel="nofollow">html widget</a></p></li>
<li><p>Also in R, use the development version of my <a href="https://github.com/SymbolixAU/googleway/blob/master/NEWS.md" rel="nofollow">googleway</a> package, and in particular the <code>google_palces()</code> function to do a <a href="https://developers.google.com/places/web-service/search" rel="nofollow">nearby serach</a>. </p></li>
</ol>

<hr>

<pre><code>### to install the development version
# devtools::install_github("SymbolixAU/googleway")

library(googleway)

## you need an API key
key &lt;- read.dcf("~/Documents/.googleAPI", fields = "GOOGLE_API_KEY")

res &lt;- google_places(search_string = "cafe", 
                     location = c(-37.8203155,144.9800428), 
                     radius = 2000, 
                     key = key)

# res$results$name
# [1] "CafÃ© Vue"                                              "Switch Board Cafe"                                     "The Journal Cafe"                                     
# [4] "Krimper Cafe"                                          "65 Degrees Cafe"                                       "Basement Cafe"                                        
# [7] "Cafe Domain"                                           "Druids Cafe"                                           "Cafe Kinetic"                                         
# [10] "Paris End Cafe &amp; Catering Melbourne 20 Collins street" "Mothership Cafe"                                       "THE J Walk Cafe"                                      
# [13] "Richmond Rush Cafe"                                    "Bullrun cafÃ©"                                          "Crossroads Cafe"                                      
# [16] "Espresso Cafe Richmond"                                "8 Miles Cafe &amp; Convenience Store"                      "Cafe Bar Mile"                                        
# [19] "The Industrial Cafe"                                   "Park Lane Cafe" 
</code></pre>

python google-maps