<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  
    
    <title>My JSP 'Marker.jsp' starting page</title>
    
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> 
    <script type="text/javascript">
var map;
function initialize()
{
        var mapcenter=new google.maps.LatLng(38.03403076,114.49813842);
        
var options={
    center:mapcenter,
    zoom:13,
    mapTypeControl:true,
    mapTypeControlOptions:{
    style:google.maps.MapTypeControlStyle.DROPDOWN_MENU
    },
    scaleControl:true,
    overviewMapControl:true,
    streetViewControl:true,
    mapTypeId:google.maps.MapTypeId.ROADMAP
};
map=new google.maps.Map(document.getElementById("mapcontent"),options);
}
function add()
{
    var icon=new google.maps.MarkerImage('images/color.png');
    var point=new google.maps.LatLng(38.03403076,114.49813842);
    var er=new google.maps.Marker({
        position:point,
        icon:icon,
        flat:true});
    er.setMap(map);
   setTimeout(function(){er.setMap(null);add();},100);
}
</script>
  </head>
  
  <body onload="initialize();", onunload="GUnload()",style="margin:0px">
   <div id="mapcontent" style="width:500px;height:774px;"></div>
   <input id="dd" type="button" value="ok" onclick="add()"/>
  </body>
  
</html>
这是一段测试代码,为什么我在做叠加删除标记的时候会出现闪烁的效果,如果调整计时器的时间只能控件叠加删除标记的快慢,但还是有闪烁的显象,原来v2版的google map api没有这种现象