var markers = {};
var openedInfoWindow = null;
function addDoctorLocation(options)
{
var gm = Ext.getCmp('mygooglemap');
var mpoint = new google.maps.LatLng(options.lat,options.lng);
var marker = gm.addMarker(mpoint,options.marker,false,false, options.listeners);
markers[options.MainID] = marker;
infowindow = new google.maps.InfoWindow({
content: "Hello from this marker"
});
google.maps.event.addListener(marker, 'click', function() {
if (openedInfoWindow != null) openedInfoWindow.close(); // <-- changed this
infowindow.open(map, marker);
// added next 4 lines
openedInfoWindow = infowindow;
google.maps.event.addListener(infowindow, 'closeclick', function() {
openedInfoWindow = null;
});
});
}
点击infowindow关闭按钮时,没有任何反应 单击标记时此代码将出现此错误,但信息窗口正确显示在gmappanel
上TypeError: b.O is not a function
[Break On This Error]
(82 out of range 43)