askChangeBoundingBox abstract method

void askChangeBoundingBox(
  1. int zoomlevel,
  2. BoundingBox boundingBox
)

Called when the map view moves to a new area at the same zoom level.

This method is invoked when the visible map area changes but the zoom level remains the same. It provides an opportunity to:

  • Load markers for the newly visible area
  • Remove markers that are no longer visible (memory optimization)
  • Update cached data for the new boundary

Important Notes:

  • The zoom level is guaranteed to be unchanged when this method is called
  • The overlay extends the visible area by MarkerDatastoreOverlay.extendMargin to reduce the frequency of these calls during map navigation
  • This method is not called if the bounding box is still contained within the previously cached extended boundary

zoomlevel The current zoom level (unchanged from previous call) boundingBox The new visible geographic area (already extended by margin)

Performance Tip: Use spatial indexing to efficiently query markers within the bounding box rather than checking all markers.

Implementation

void askChangeBoundingBox(int zoomlevel, BoundingBox boundingBox);