To get all the markers first, you need to find the borders of the current viewport, then you need to loop all the markers and see if they are in this binding. The following is an example.
var bounds =map.getBounds();
for(var i = 0; i < markers.length; i++){
if(bounds.contains(markers[i].position))
console.log("Marker"+ i +" - matched");
}
source
share