按下按钮后执行以下代码,在地图上显示各个er
for (i=0;i<store.getCount();i++ )
{
(function(i){
aa[i]=store.getAt(i).get('category');
bb[i]=store.getAt(i).get('standard');
x[i]=store.getAt(i).get('la');
y[i]=store.getAt(i).get('lo');

var p=new google.maps.LatLng(x[i],y[i]); var infowindow = new google.maps.InfoWindow({
content: aa[i]+'\n'+bb[i]
});

var er=new google.maps.Marker({
position: p,
title : '点击显示花粉信息',
map: map
});


er.setMap(map);

google.maps.event.addListener(er, 'click', function() {
infowindow.open(map, er);
});

})(i);
}问题是,第二次按下按钮时,新的er出现,原来的er没有消失,现在希望按下按钮时,删除已有的所有er,然后显示新生成新的er