2024-04-29 20:56:01 发布
网友
我正在尝试使用googlemapsapi进行nearby搜索,理想情况下我会使用latlngBounds对象进行搜索。我一直在使用R,但也可以使用python,似乎遇到了相同的问题。它可以很好地与点/半径,但我想设置一个边界框,如果可能的话。对于javascript,您似乎可以输入latlngBounds对象,但如果您使用python或rapi,可能就不能了?有没有人知道这是否可能?
谢谢!
正如您所提到的,Javascript API允许您使用LatLngBounds对象,web services API则不允许。在
我可以建议几个选择
编写一些Javascript并在R中使用类似于^{}或您自己的html widget之类的东西来解析它
同样在R中,使用我的googleway包,尤其是google_palces()函数来执行nearby serach。
google_palces()
library(googleway) ## you need an API key key <- read.dcf("~/Documents/.googleAPI", fields = "GOOGLE_API_KEY") res <- 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 & 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 & Convenience Store" "Cafe Bar Mile" # [19] "The Industrial Cafe" "Park Lane Cafe"
正如您所提到的,Javascript API允许您使用LatLngBounds对象,web services API则不允许。在
我可以建议几个选择
编写一些Javascript并在R中使用类似于^{} 或您自己的html widget之类的东西来解析它
同样在R中,使用我的googleway包,尤其是
google_palces()
函数来执行nearby serach。相关问题 更多 >
编程相关推荐