if (!self._markers) self._markers = new rbush();
//_latlngMarkers contains Lat\Long coordinates of all markers in layer.
if (!self._latlngMarkers) {
self._latlngMarkers = new rbush();
self._latlngMarkers.dirty = 0;
self._latlngMarkers.total = 0;
}
if you call addMarkers with an empty list, this will cause an error here: self._markers.load(tmpMark);
We can either return early if you find an empty list or perform the creation / check at the top of addMarkers. Thoughts?
In addMarker you do the following checks
if you call
addMarkers
with an empty list, this will cause an error here:self._markers.load(tmpMark);
We can either return early if you find an empty list or perform the creation / check at the top of addMarkers. Thoughts?