它更多的地图,API比markerClusterer的错误中的错误,但你可以解决它在markerClusterer.js
我不知道你在哪里点击,当你(尝试)变焦设置为0 (当我使用变焦控制时不会发生这个问题),但是当我使用map.setZoom(0)
设置缩放时,会发生此问题:API报告缩放为0,但这不正确,因为缩放将被设置为1(minZoom)。
修复:
更换marcerclusterer.js的这一部分:
// Add the map event listeners
var that = this;
google.maps.event.addListener(this.map_, 'zoom_changed', function() {
var zoom = that.map_.getZoom();
if (that.prevZoom_ != zoom) {
that.prevZoom_ = zoom;
that.resetViewport();
}
});
...与:
// Add the map event listeners
var that = this;
google.maps.event.addListener(this.map_, 'zoom_changed', function() {
var zoom = that.map_.getZoom(),
minZoom=that.map_.minZoom||0,
maxZoom=Math.min(that.map_.maxZoom||100,
that.map_.mapTypes[that.map_.getMapTypeId()].maxZoom);
zoom=Math.min(Math.max(zoom,minZoom),maxZoom);
if (that.prevZoom_ != zoom) {
that.prevZoom_ = zoom;
that.resetViewport();
}
});
markerClusterer不是地图,Javascript的API的一部分,您应该通过https://code.google.com/p/google-maps-utility-library-v3/issues/entry – 2013-02-26 22:33:08
报告该错误。谢谢,我会在那里发表评论:) – Auero 2013-03-01 08:55:24