shouldPaint method

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

returns true if this marker is within the visible boundary and therefore should be painted. Since the initResources() is called only if shouldPoint() returns true, do not test for available resources here.

Implementation

@override
bool shouldPaint(BoundingBox boundary, int zoomLevel) {
  if (_boundingBox == null) return false;
  return minZoomLevel <= zoomLevel &&
      maxZoomLevel >= zoomLevel &&
      _boundingBox!.intersects(boundary);
}