有没有办法只使用 lng 和 lat 坐标从 Google 地图中获取位置?

Is there a way to get a place from Google Maps using only lng & lat coordinates?

我想知道是否有一种方法可以仅使用经度和纬度坐标从 Google 地图中获取地名、地点类型或任何名称。

我有这个URL。

https://www.google.com/maps/place/@42.34,-71.10

在 Google 地图中我看到了这个。

离红色标记最近的是西蒙斯大学,但西蒙斯大学不在URL中。如果我单击显示 'Simmons University' 的文本,我会得到 URL.

https://www.google.com/maps/place/Simmons+University/@42.34,-71.1021887,17z/data=!4m13!1m7!3m6!1s0x0:0x0!2zNDLCsDIwJzI0LjAiTiA3McKwMDYnMDAuMCJX!3b1!8m2!3d42.34!4d-71.1!3m4!1s0x89e379f7e743c9c5:0xa77a577bc7bd4396!8m2!3d42.339063!4d-71.1004376

现在,西蒙斯大学在 URL。有什么方法可以提取最接近红色标记的文本吗?

我一起破解了这段代码。

from selenium import webdriver
from time import sleep
driver = webdriver.Chrome('/home/datafiles/chromedriver')
driver.get('https://www.google.com/maps/place/@42.34,-71.10')
sleep(2)

我遇到了这个错误。

WebDriverException: Message: 'chromedriver' executable may have wrong permissions.

环境实际上是 Linux,我在 Jupyter Notebook 中使用 Python。我以前从未使用过Linux。

因为你的 URL 中有特殊字符而不是

driver.get('https://www.google.com/maps/place/@42.34,-71.10')

试试这个:

driver.get(r'''https://www.google.com/maps/place/@42.34,-71.10''')

简答 - 不。 它是 canvas 并且需要其他工具