Google 地图和 WordPress 中的短代码选项卡

发布于 2024-12-13 04:46:22 字数 253 浏览 4 评论 0原文

我遇到了 Google 地图未以图钉为中心的问题。请参阅此处的问题示例:http://www.heyheygorgeous.com/enzocoboston/test

您会看到,如果将谷歌地图放置在第一个选项卡中,它就可以工作。单击其他选项卡,谷歌地图不会以图钉为中心。

请让我们知道如何解决此问题。谢谢。

I've having an issue with Google maps not centering on the pin. See an example of the issue here: http://www.heyheygorgeous.com/enzocoboston/test

You'll see that if the google map is placed in the first tab, it works. Click on the other tabs and the google map doesn't center on the pin.

Please let us know what to do to resolve this issue. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

两仪 2024-12-20 04:46:22

为了让谷歌地图在隐藏选项卡中工作,请尝试将谷歌地图的 iframe 宽度设置为 100%,而不是使用 px 宽度。示例: width="100% height="350"

如果您使用的是 wordpress,只需使用 iframe 插件,否则当您在 VISUAL 和 HTML 视图之间切换时 WP 会删除标签。

您可以在此处查看示例:斯科茨代尔费尔蒙公主酒店(点击“地图”)

For the google map to work inside a hidden tab, try setting the iframe width of the google map to 100% instead of using a px width. Example: width="100% height="350"

If you're using wordpress, just grap an iframe plugin, otherwise WP will erase the tags when you switch between VISUAL and HTML views.

You can see an example here: Fairmont Scottsdale Princess (click "map")

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文