【发布时间】:2014-06-29 09:43:56
【问题描述】:
function showpopup(lat, lng, info)
{
// Create infoWindow
var infoWindow = new google.maps.InfoWindow({
content: info
});
// Create marker
var marker = new google.maps.Marker({
position: new google.maps.LatLng(lat, lng),
title: 'Lima',
map: map.map,
infoWindow: infoWindow
});
// This opens the infoWindow
infoWindow.open(map, marker);
}
我有这个函数,它采用三个参数并在地图上创建信息窗口,但现在我希望当用户打开第二个信息窗口时,第一个信息窗口使用 javascript 和 Gmap V3 关闭
【问题讨论】:
标签: javascript html google-maps google-maps-api-3 infowindow