Baidu map API can not be displayed using a large number of dots.

topic description

Baidu Map API uses the Demo of massive points. Unable to display mass dots.

sources of topics and their own ideas

all the points where people are located need to be depicted on the map. Use the massive points of Baidu map API to achieve.

related codes

if (document.createElement ("canvas"). GetContext) {/ / determine whether the current browser supports drawing mass dots

            var points = [];  //  
            angular.forEach(result,function(data,index,array){
                if(data.longitude && data.longitude>0 && data.latitude && data.latitude>0){
                   points.push(new BMap.Point(data.longitude, data.latitude));    
                }
            });
            var options = {
                size: BMAP_POINT_SIZE_SMALL,
                shape: BMAP_POINT_SHAPE_STAR,
                color: "-sharpd340c3"
            }
            var pointCollection = new BMap.PointCollection(points, options);  // PointCollection
            pointCollection.addEventListener("click", function (e) {
                alert(":" + e.point.lng + "," + e.point.lat);  // 
            });
            map.addOverlay(pointCollection);  // Overlay
        } else {
            alert("chromesafariIE8+");
        }

what result do you expect? What is the error message actually seen?

clipboard.png
massive dots are not shown on the map.

Apr.02,2021
Menu