为什么地理编码不断返回错误的地址,但 Google 地图工作正常

Why does geocode keep returning the wrong address but Google Maps works correctly

我在新奥尔良地区。当我在新奥尔良地区打开 Google 地图然后搜索 "Council on Alcohol & Drug" 时,我得到了正确的坐标位置(经度 = -90.09,纬度 = 29.96)。

然而,当我使用 ggmap 中的 geocode 方法时,我不断获得一些其他坐标,即使在新奥尔良也不行。我已经尝试了很多技巧来让它工作,但仍然没有找到解决方案。

library(ggmap)
geocode(location="Council on Alcohol & Drug") # NA NA
geocode(location="Council on Alcohol & Drug New Orleans") # NA NA
geocode(location="Council on Alcohol & Drug&components=administrative_area:Louisiana") # -91.96 30.98
geocode(location="Council on Alcohol & Drug&components=administrative_area:New Orleans") # NA NA
geocode(location="Council on Alcohol & Drug&region=New Orleans") # NA NA

geocode 总的来说对我来说似乎有点古怪。关于让它正常运行有什么建议吗?

将“&”转换为 "and" 更正了问题。 (在我输入问题时解决了它,并认为它仍然值得发布。)