Use constrainResolution function

Use the constrainResolution function when setting the initial view resolution.