Google Maps over SSL的选项 [英] Options for Google Maps over SSL

查看:85
本文介绍了Google Maps over SSL的选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近发现Google Maps API不能很好地与SSL搭配使用。公平的,但有什么办法可以克服别人有效的使用方式?


Maps API是否可以通过SSL(HTTPS)工作?



目前,Maps API不是通过安全(SSL)
连接可用的
。如果您在安全网站上运行
Maps API,则浏览器
可能会警告用户屏幕上存在不安全的
对象。




我们考虑了以下选项:


  1. 拆分页面以便信用卡收集对SSL的要求)与Google Map不在同一页面。

  2. 切换到另一个地图提供商,例如Virtual Earth。有传闻说他们支持SSL。

  3. 使用IFRAME玩弄技巧。听起来很烂。

  4. 代理Google的电话。听起来像是一个很大的开销。

是否有其他选择,还是有人对我们考虑过的选项有所了解? p>

解决方案

我同意前面两个答案,在这种情况下,从可用性的角度来看,将两个函数拆分为单独的屏幕。您真的希望您的用户专注于输入完整准确的信用卡信息,并且在同一屏幕上显示地图可能会让人分心。

尽管如此,Virtual地球当然完全支持SSL。要启用它,您只需简单地将脚本引用从http://更改为https://,然后将& s = 1添加到URL中,例如

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

变为

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


We recently discovered that the Google Maps API does not play nicely with SSL. Fair enough, but what are some options for overcoming this that others have used effectively?

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.

We have considered the following options

  1. Splitting the page so that credit card collection (the requirement for SSL) is not on the same page as the Google Map.
  2. Switching to another map provider, such as Virtual Earth. Rumor has it that they support SSL.
  3. Playing tricks with IFRAMEs. Sounds kludgy.
  4. Proxying the calls to Google. Sounds like a lot of overhead.

Are there other options, or does anyone have insight into the options that we have considered?

解决方案

I'd agree with the previous two answers that in this instance it may be better from a usability perspective to split the two functions into separate screens. You really want your users to be focussed on entering complete and accurate credit card information, and having a map on the same screen may be distracting.

For the record though, Virtual Earth certainly does fully support SSL. To enable it you simple need to change the script reference from http:// to https:// and append &s=1 to the URL, e.g.

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

becomes

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

这篇关于Google Maps over SSL的选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆