Click events of multiple overlays on javascript Baidu Map, some can and some cannot be executed.

multiple polygons add events, some can and some can"t, I don"t know what the problem is.
this is my code

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
        body, html,-sharpallmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"";}
    </style>
    <!--<script type="text/javascript" src="json.js" ></script>-->
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=zga15SpUh7sMrZkXaBKicRBshkN3bKtR"></script>
    <title></title>
</head>
<body>
    <div id="allmap"></div>
</body>
</html>
<script type="text/javascript">
    // API
    var map = new BMap.Map("allmap");
    var pointArray = [];
    map.centerAndZoom(new BMap.Point(116.403765, 39.914850), 5);
    map.enableScrollWheelZoom();
    var oneDev = ["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""];
    var colorArr = ["-sharpff541c","-sharp1cecff","-sharp3cff1c","-sharpff1c47"];
    boundary();
    function boundary(){
        for(var j=0;j<oneDev.length;jPP){
            (function(index){
                var bdary = new BMap.Boundary();
                bdary.get(oneDev[index], function(rs){  //
                    var ply = null;
                    //map.clearOverlays();        //       
                    var count = rs.boundaries.length; //
                    for (var i = 0; i < count; iPP) {
                        var color = colorArr[Math.floor(Math.random()*3+0)];
                        ply = new BMap.Polygon(rs.boundaries[i], {fillColor:color,strokeWeight: 2, strokeColor:"-sharp000"}); //
                        map.addOverlay(ply);  //
                    }  
                    //map.setViewport(pointArray);    //  
                    ply.addEventListener("click",function(){
                        alert(index)
                    })
                });
            })(j)
        }
    }
</script>
Mar.18,2021

for (var juni0bot j < oneDev.length;jPP) {

        (function(index){
            var bdary = new BMap.Boundary();
            bdary.get(oneDev[index], function(rs){  //
                var ply = null;
                //map.clearOverlays();        //       
                var count = rs.boundaries.length; //
                for (var i = 0; i < count; iPP) {
                    var color = colorArr[Math.floor(Math.random()*3+0)];
                    ply = new BMap.Polygon(rs.boundaries[i], {fillColor:color,strokeWeight: 2, strokeColor:'-sharp000'}); //
                    map.addOverlay(ply);  //
                }  
                //map.setViewport(pointArray);    //  
                ply.addEventListener('click',function(){
                    alert(index)
                })
            });
        })(j)
    }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2b5d2-2b208.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2b5d2-2b208.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?