gpt4 book ai didi

google-maps - 通过 SSL 的 Google map 选项

转载 作者:太空宇宙 更新时间:2023-11-03 12:38:41 25 4
gpt4 key购买 nike

我们最近发现 Google Maps API 不能很好地使用 SSL。很公平,但是其他人有效使用的克服此问题的一些选择是什么?

Will the Maps API work over SSL (HTTPS)?

At this time, the Maps API is not available over a secure (SSL) connection. If you are running the Maps API on a secure site, the browser may warn the user about non-secure objects on the screen.

我们考虑了以下选项

  1. 拆分页面,使信用卡收款(SSL 要求)与 Google map 不在同一页面上。
  2. 改用其他 map 提供商,例如 Virtual Earth。有传言说他们支持 SSL。
  3. 玩 IFRAME 的把戏。听起来很笨拙。
  4. 代理对 Google 的调用。听起来开销很大。

是否还有其他选择,或者是否有人对我们考虑过的选择有深入的了解?

最佳答案

我同意前两个答案,在这种情况下,从可用性的角度来看,将两个功能拆分到单独的屏幕中可能会更好。您真的希望您的用户专注于输入完整且准确的信用卡信息,而在同一屏幕上显示 map 可能会分散注意力。

郑重声明,Virtual Earth 确实完全支持 SSL。要启用它,您只需将脚本引用从 http://更改为 https://并将 &s=1 附加到 URL,例如

<script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1" type="text/javascript"></script>

成为

<script src="https://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1&s=1" type="text/javascript"></script>

关于google-maps - 通过 SSL 的 Google map 选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3437/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com