自定义覆盖物的点击事件
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <title>自定义覆盖物的点击事件</title> 6 <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.2"></script> 7 </head> 8 <body> 9 <div style="width:520px;height:340px;border:1px solid gray" id="container"></div> 10 <p> 11 <input type="button" value="移除覆盖物" onclick="mySquare.hide();" /> 12 <input type="button" value="显示覆盖物" onclick="mySquare.show();" />