求助:google map v3  marker刷新问题
按下按钮后执行以下代码,在地图上显示各个marker
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 marker=new google.maps.Marker({
														position: p,
														title : '点击显示花粉信息',
														map: map
													});																						
													marker.setMap(map);											
													google.maps.event.addListener(marker, 'click', function() {
														infowindow.open(map, marker);
													});											
												})(i);
											}
问题是,第二次按下按钮时,新的marker出现,原来的marker没有消失,现在希望按下按钮时,删除已有的所有marker,然后显示新生成新的marker
------解决方案--------------------
marker.setMap(null);