Function zoomLevelWithinLimits