handleZoomToRect

Fits the AA MapView camera to a geographic bounding box within the visible screen area.

Called by AndroidAutoSurfaceManager.zoomToRect (triggered by route preview camera fitting and recenter button). The registered handler in AndroidAutoSurfaceCallback uses MapView.zoomToRect(rect, pt1, pt2) with the visible area coordinates from onVisibleAreaChanged to precisely fit the bounding box within the map-visible portion of the AA screen.

This is safe to call even if the handler is not set (no-op).

Parameters

rect

The geographic bounding box to fit the camera to

See also