Private VisibleWidth, degCircle, Ratio As Double
Private OriginalZoom, Zoom As Float
Private LatLngB As LatLngBounds
OriginalZoom = gmap.CameraPosition.Zoom
LatLngB = gme.GetProjection(gmap).GetVisibleRegion.LatLngBounds 'Visible region bounds
VisibleWidth = Abs(LatLngB.SouthWest.Longitude - LatLngB.NorthEast.Longitude) 'width of the visible region on the screen
degCircle = 360 / 40075000 * radius * 2 / CosD(latitude) ' circle diameter in degrees
Ratio = Logarithm(VisibleWidth / degCircle, 2) 'ratio visible width / circle diameter
Zoom = OriginalZoom + Ratio 'optimum zoom