我有一个问题。我有一个来自测雨雷达的链接,我想将其放置在我网站的 iframe 中。这很好用,但位置不在正确的地方。我可以在文件夹中手动调整它,但我希望将位置设为标准。
这是 iframe 代码:
<iframe src="http://www.whsv.com/templates/2015_Fullscreen_Radar" frameborder="0" scrolling="no" height="700" width="1000"></iframe>
坐标:
latitude=52.005&longitude=5.55&zoomLevel=7
如何在 iframe 中包含坐标以使其正常工作?
最佳答案
那些是查询字符串变量。您将它们附加到 src url 中:
http://www.whsv.com/templates/2015_Fullscreen_Radar?latitude=52.005&longitude=5.55&zoomLevel=7
所以你的 iframe 看起来像:
<iframe src="http://www.whsv.com/templates/2015_Fullscreen_Radar?latitude=52.005&longitude=5.55&zoomLevel=7" frameborder="0" scrolling="no" height="700" width="1000"></iframe>
查询字符串变量通常有一个键和一个值。例如“纬度”(键)等于“52.005”(值)。
请注意,在第一个查询字符串变量键/值对之前有一个 ?
。这将 URL 与查询字符串分开(并且不是查询字符串的一部分)。之后,新的键值对由 &
分隔。在键和值之间,使用等号 (=
)。
关于javascript - 雨量雷达在谷歌地图中的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47541251/