shouldPaint method

  1. @override
bool shouldPaint(
  1. BoundingBox boundary,
  2. int zoomLevel
)
override

returns true if the marker should be painted. The boundary represents the currently visible area

Implementation

@override
bool shouldPaint(BoundingBox boundary, int zoomLevel) {
  return minZoomLevel <= zoomLevel &&
      maxZoomLevel >= zoomLevel &&
      boundary.contains(latLong.latitude, latLong.longitude);
}