【发布时间】:2017-06-13 10:16:52
【问题描述】:
我为我的 GMap v3 添加了自定义 Google 地图信息窗口 当我点击 InfoWindow 内容和 InfoWindow 关闭按钮时如何禁用“点击”事件?
示例代码我放在https://codepen.io/anon/pen/rwLdxG
function InfoBox(opts) {
google.maps.OverlayView.call(this);
this.latlng_ = opts.latlng;
this.map_ = opts.map;
this.content = opts.content;
this.offsetVertical_ = -195;
this.offsetHorizontal_ = 5;
this.height_ = 165;
this.width_ = 266;
var me = this;
this.boundsChangedListener_ =
google.maps.event.addListener(this.map_, "bounds_changed", function () {
return me.panMap.apply(me);
});
// Once the properties of this OverlayView are initialized, set its map so
// that we can display it. This will trigger calls to panes_changed and
// draw.
this.setMap(this.map_);
}
【问题讨论】:
标签: google-maps google-maps-api-3