我目前在我的 HTML 页面中嵌入了一个 Google map 窗口 (iframe),我想知道是否可以在用户每次点击 map 时检索坐标。这可能吗?我应该使用 JavaScript 来执行此操作吗?
我还想知道是否可以禁用单击指定地标时出现的 map 弹出窗口。
这是我正在使用的最开始:
<!DOCTYPE html>
<html>
<body>
<h1>Tour Creator</h1>
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/?ie=UTF8&ll=41.807933,-72.249892&spn=0.015754,0.033023&t=h&z=16&output=embed"></iframe><br /><small><a href="https://maps.google.com/?ie=UTF8&ll=41.807933,-72.249892&spn=0.015754,0.033023&t=h&z=16&source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>
</body>
</html>
非常感谢!
最佳答案
听起来您想使用实际的 map API,而不仅仅是嵌入式 map 。
在此处查看 API 文档 - https://developers.google.com/maps/documentation/javascript/tutorial
关于php - 从 HTML 网页中的 Google Maps iframe 获取坐标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14567565/