我正面临一个奇怪的问题,即谷歌地图的infobubble实用程序
当我使用click事件渲染标记以显示infbubble窗口时,渲染标记需要很长时间
以下是实时网址
http://abl-web.com/abl/map.php
以下是导致问题的代码块
function property_click_event(marker,image_url, sysid, address, price, city, bedroom, bathroom, sqft, type, realtor, mls, position){
var property_content = getPropertyContent(image_url, sysid, address, price, city, bedroom, bathroom, sqft, type, realtor, mls);
var infoBubble = new InfoBubble({
content: property_content,
padding: 10,
backgroundColor: 'white',
borderRadius: 14,
arrowSize: 20,
borderWidth: 1,
borderColor: 'white',
hideCloseButton: false,
arrowStyle: 2
});
var bounds = new google.maps.LatLngBounds();
google.maps.event.addListener(marker, 'click', function() {
if(lastOpenInfoWin)
lastOpenInfoWin.close();
lastOpenInfoWin = infoBubble;
infoBubble.open(map, marker);
map.setCenter(position);
});
marker.setMap(map);
bounds.extend(position);
}
以上功能在标记和属性内容上添加附加点击事件以显示在信息气泡
上更新:问题似乎只存在于chrome
上由于