Google Maps API v3 BrowserIsCompatible [英] Google Maps API v3 BrowserIsCompatible

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

问题描述

我正在更新一些使用Google Maps的v2 API的旧代码。如果(google.maps.BrowserIsCompatible()){
// if $($)
$ b

 加载地图
}

现在我已加载Google Maps API v3,收到错误

google.maps.BrowserIsCompatible不是函数



我已经阅读了Google v3 api组中的大量主题,但尚未找到有关新函数被调用或如何引用它的明确答案。

解决方案

GBrowserIsCompatibile 没有将其纳入第三版API,因此您必须自己写这段代码

这是一个列表支持v3的浏览器。


I'm updating some older code that used the v2 API for Google Maps. On domready, it would use a statement like

if(google.maps.BrowserIsCompatible()){
// load the map
}

Now that I'm loading the Google Maps API v3, I get an error

google.maps.BrowserIsCompatible is not a function

I've read a ton of threads in the Google v3 api groups, but haven't found a clear answer of what the new function is called or how to reference it.

解决方案

GBrowserIsCompatibile didn't make it into the version three API, so you will have to write this code yourself.

Here is a list of the browsers supported by v3.

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

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