Google Maps API v3最近是否发生了与mootools.js Java Script不兼容的更改,导致控件
Has something recently changed in Google Maps API v3 that is incompatible with mootools.js Java Script, causing controls to disappear?
我们有一个嵌入Google Maps API v3的页面,最近(今天?)缩放控件和地图背景控件丢失了。未对代码进行任何更改。当我们禁用mootools.js时,控件会返回。谷歌地图API v3最近是否发生了与mootoolsjavascript不兼容的变化,这可能会导致控件消失?
问题是由Mootools的旧版本引起的。
你能试着使用最新版本的mootools吗?
我在构建ab8ea8824dc3b24b6666867a2c4ed58ebb762cf0时使用了mootools 1.4.5,但它不起作用如果我将mootools 1.4.5与构建74e34796f5f76640cdb98853004650aea1499d69一起使用,它就可以工作了。
错误在Function.implement和方法绑定中。
首次构建:
bind: function(bind, args){
var self = this;
if (args != null) args = Array.from(args);
return function(){
return self.apply(bind, args || arguments);
};
},
第二次构建:
/*<!ES5-bind>*/
bind: function(that){
var self = this,
args = arguments.length > 1 ? Array.slice(arguments, 1) : null,
F = function(){};
var bound = function(){
var context = that, length = arguments.length;
if (this instanceof bound){
F.prototype = self.prototype;
context = new F;
}
var result = (!args && !length)
? self.call(context)
: self.apply(context, args && length ? args.concat(Array.slice(arguments)) : args || arguments);
return context == that ? result : context;
};
return bound;
},
第二个版本对错误有更多的保护。
我认为Mootools破坏了Gmaps的部分全局代码,可能是事件处理程序。
在Mootools-core.js之后加载Google Maps API Javascript,这对我有效
我今天用Gmaps API V3、Mootools 1.4和Mootools 1.5测试了这一点。
(对不起,我不会说英语:D)
这种情况以前在我身上发生过几次,所有的突然控制都很有趣,一天后就会自动修复。我搞砸了bootstrap,而不是你的mootools。
我觉得这很有帮助在你的样式表中添加这个:
#mapDiv img{ max-width: none; }
相关文章:
- TypeError:在不兼容的接收器nodejs上调用了方法Uint8Array.length
- CKJustify和Color Button插件之间的不兼容
- 在不兼容的接收器上调用的方法Set.prototype.add未定义
- 如果不兼容,则隐藏范围输入
- 谷歌图表 - 地理图表“不兼容的数据表:错误:未知地址类型
- IE11真的与getNamedItem()JS函数不兼容吗
- 与您的操作系统或体系结构不兼容:fsevents@1.0.11.
- jQuery脚本滚动在iDevices上不兼容
- three.js javascript/raycasting代码与retina显示器Mac不兼容
- TypeScript无效的重载签名-与实现不兼容
- PHP JSON编码输出与Javascript Ajax不兼容
- ACE编辑器applyDeltas似乎与setTimeout不兼容
- Element.insertAdjacentHTML与引导程序类之前和之后的::不兼容
- Geocoding和Animation.drop与超时不兼容
- 如何让我的html5功能不兼容警告使用javascript工作
- 不兼容的数据表: 错误:表包含的列数超过预期
- HTML5 不兼容的浏览器测试
- 有什么方法可以将类型指定为 self?或解决方法“属性类型不兼容”
- React 15 与 React-redux 不兼容
- Google Maps API v3最近是否发生了与mootools.js Java Script不兼容的更改,导致控件