Dibujé marcadores en el mapa usando la biblioteca leaflet.js (son alrededor de 8500 marcadores). Pero el rendimiento fue tan bajo que usé markerCluster. Pero también lleva demasiado tiempo dibujar los marcadores. ¿Hay alguna forma de mejorar el rendimiento?
let _handler = this; //get marker data let data = _handler.getData(); //create markerCluster let markers = L.markerClusterGroup({ chunkedLoading:true, removeOutsideVisibleBounds:true, animate:false, showCoverageOnHover:false, disableClusteringAtZoom:17, iconCreateFunction:function(cluster){ let className = count >= 100 ? 'max-cluster-icon' : count < 100 && count >= 20 ? 'med-cluster-icon' : 'min-cluster-icon'; let icon = L.divIcon({ html:`<div class="cluster-icon ${className}"><div><span>${cluster._childCount}</span></div></div>` }); return icon; }}); var markerList = []; data.forEach((val)=>{ let {lat, lng} = val; if(lat && lng){ let icon = _handler.icons.get("icon-normal"); icon.options.iconSize = [30,30]; let marker = L.marker([lat, lng], {icon:icon}); let html = getPopup(val); marker.bindPopup(html); markerList.push(marker); } }); //add marker list to the markerCluster markers.addLayers(markerList); //add markerCluster to the map map.addLayer(markers);